Subnetting VLSM and Summarization

May 6, 2018 | Author: Anonymous | Category: Documents
Report this link


Description

FICT Presentation TCP/IP Network Fundamentals Subnetting, VLSM and Summarization UEEN2013 (Topic 03) 1 IP Subnet Rule #1 Every IP address within the “closed” network has to be unique. There can’t be two same IP addresses in the network Same applies to the Public IP addresses in the Internet PC0 and PC2 can’t have the same IP in this network IP Subnet Rule #1 The following networks is okay (for having same IP addresses) since they are separated. There are two “closed” network in the diagram. IP Subnet Rule #2 The function of a subnet mask is to divide the IP address into two parts: The Network ID and the Host ID. The more important part is to produce the Network ID Subnet mask by itself is meaningless. It has to “work” with an IP address. The process of getting the networking ID is the perform a bitwise AND operation between the IP and subnet mask. IP Subnet Rule #2 An example of the process of getting the network ID and host ID: IP address = 128.143.137.144 Subnet mask = 255.255.0.0 Network ID = (128.143.137.144 & 255.255.0.0) => 128.143.0.0 Host ID = 137.144 (of network 128.143.0.0) This is just a simplified demonstration, in fact you need to convert the decimal form to binary form, order to perform the ANDING operation: 128.143 137.144 IP address Network ID Host ID IP Subnet Rule #2 Another example to determine what the network ID is, for any given IP address you have to convert both octal addresses into binary, and do a bitwise AND operation. An example using an IP address of 156.154.81.56 used with a network mask of 255.255.255.240 follows: This translate to a network ID of 156.154.81.48 Sometimes, network ID is also called network address or subnet address #Quick Quiz# What is the subnet address for IP address 150.215.17.9, given the subnet mask as 255.255.240.0? If the network ID = 192.168.48.0, and the host ID = 9.83, what should be the subnet mask? Answer The subnet address is 150.215.16.0 192.168.48.0 = 192.168.“001100002”.0 9.83 = “000010012”.83 Subnet mask = 255.255.“11110000”.0 = 255.255.240.0 IP Subnet Rule #3 Network address within a “closed” network is preferred to be unique. Network ID= 192.168.4.0 Network ID= 192.168.1.0 Network ID= 192.168.2.0 Network ID= 192.168.3.0 Packet Tracer Example In the following network, though every IP address is unique, but the network ID is not unique, hence the following network won’t work. You may try to build this network in Packet Tracer. IP Subnet Rule #4 For a correct and valid 32 bits subnet mask: Left all ‘1’ and right all ‘0’ 1111111.11110000.00000000.00000000 (valid) 11111111.11101101.00000000.00000000 (not valid) Subnet mask can’t have a ‘0’ between two ‘1’s or a ‘1’ between two ‘0’ There are only 32 valid subnet masks (theoretical maximum). 255.0.0.0, 255.128.0.0, 255.192.0.0, ……. 255.255.255.255 Can be represented by ‘/’ notation e.g. /9, /24, etc /10 means ten ‘1’ from the left, and the remaining 22 bits are ‘0’ 192.168.1.15/24 => This interface has an IP = 192.168.1.15 The subnet mask = 255.255.255.0 Belongs to network 192.168.1.0 #Quick Quiz# Which of the following are valid subnet masks (choose all that apply)? A. 255.128.0.0 valid B. 255.255.224.0 valid C. 255.255.64.0 invalid D. 255.255.255.244 invalid E. 255.240.0.0 valid F. 255.255.236.0 invalid Answer A (valid) 255.128.0.0 11111111.10000000.00000000.00000000 B (valid) 255.255.224.0 11111111.11111111.11100000.00000000 C (invalid) 255.255.64.0 11111111.11111111.01000000.00000000 D (invalid) 255.255.255.244 11111111.11111111.11111111.11110100 E (valid) 255.240.0.0 11111111.11110000.00000000.00000000 F (invalid) 255.255.236.0 11111111.11111111.11101100.00000000 #Quick Quiz# What is conversion from one form to the other for the following subnet masks? /19 /23 255.255.192.0 255.255.255.248 Answer /19 = 11111111.11111111.11100000.00000000 = 255.255.224.0 /23 = 11111111.11111111.11111110.00000000 = 255.255.254.0 255.255.192.0 = 11111111.11111111.11000000.00000000 = /18 255.255.255.248 = 11111111.11111111.11111111.11111000 = /29 Rule #4: Variable Network ID bits Since functional subnet masks can range from /8 to /30, which means the network ID bits are also varies depending on the subnet mask. This will cause the network ID to be the same for some subnet masks but different in some other cases. Be careful on your design. 192.168.12.1/30 => 192.168.12.0 192.168.12.1/29 => 192.168.12.0 192.168.12.1/28 => 192.168.12.0 192.168.12.1/27 => 192.168.12.0 192.168.12.1/26 => 192.168.12.0 192.168.12.1/25 => 192.168.12.0 192.168.12.1/24 => 192.168.12.0 192.168.12.1/23 => 192.168.12.0 192.168.12.1/22 => 192.168.12.0 192.168.12.1/21 => 192.168.8.0 192.168.12.1/20 => 192.168.0.0 192.168.12.1/19 => 192.168.0.0 192.168.12.1/18 => 192.168.0.0 192.168.12.1/17 => 192.168.0.0 192.168.12.1/16 => 192.168.0.0 192.168.12.1/15 => 192.168.0.0 192.168.12.1/14 => 192.168.0.0 192.168.12.1/13 => 192.168.0.0 192.168.12.1/12 => 192.160.0.0 192.168.12.1/11 => 192.160.0.0 Network ID Network ID Rule #4: Size of Host ID bits From the subnet mask, not only we know that size of network ID bits, but also the size of the host bits. 32 bits = network ID bits + host ID bits For example, /25 => 25 network ID bits with (32-25) = 9 host ID bits. #Quick Quiz# How many host bits are there for the following cases: 18.9.110.7 / 18 192.168.3.17 / 26 188.9.7.66 (255.255.255.224) Answer Based on the question, we can ignore the IP address and just focus on the subnet mask. It is the subnet mask that determine the number of network ID bits and host ID bits. Total size of IP and subnet mask = 32 bits. 18.9.110.7 / 18 32 -18 = 14 bits (host ID) 192.168.3.17 / 26 32 – 26 = 6 bits (host ID) 188.9.7.66 (255.255.255.224) 255.255.255.224 => /27 32 – 27 = 5 bits (host ID) 19 IP Subnet rule #5 In order to communicate within the “LAN”, the IP address of all hosts and gateways must have the same network ID. All IP in the same subnet should be designed to have the same network ID. That includes PC IP, server IP, and gateway IP. For the following example: If subnet mask = /16, all PC IP, server0 IP, and gateway IP will be able to communicate with each other If subnet mask = /24, gateway IP of Router0, and PC2 WON’T be able to communicate with the rest. IP Subnet rule #5 Design guideline: In order to communicate with each other in a LAN, any IP connecting to a switch should share a same network address PC0 can ping PC1 PC0 can’t ping PC3 #Quick Quiz# Can PC0 ping PC1? Answer Both have the same network ID. 192.168.10.241/28 = 192.168.10.241 & 255.255.255.240 = 192.168.10.240 192.168.10.242/30 = 192.168.10.242 & 255.255.255.252 = 192.168.10.240 240 = “11110000” #Quick Quiz# Which of the following IP addresses belong to this network ID: 192.168.152.0, given the subnet mask = 255.255.248.0 (a)192.168.184.71 (b)192.168.159.200 (c)192.168.157.3 (d)192.168.140.56 24 Answer 192.168.184.71/21 = 192.168.184.0 (no) 192.168.159.200/21 = 192.168.152.0 (yes) 192.168.157.3/21 = 192.168.152.0 (yes) 192.168.140.56/21 = 192.168.136.0 (no) 25 Application of Rule #5 in Gateway IP Remember that gateway IP has to be in the same network ID with the rest of the host IP. Otherwise, your subnet won’t work properly. So, please DON’T design your gateway IP as the following example. This is okay. Don’t do this. Don’t do this. IP Subnet rule #6 If the data’s destination IP does not have the same network ID as the source IP, the data have to be sent to the gateway (router). In most cases under Windows XP, the data with destination IP that does not have the same network ID will be sent to default gateway. The default gateway IP will be utilized in ARP. Destination MAC address of default gateway will be used. If PC0 wants to: ping 192.168.2.1 ping 180.7.4.3 ping 10.0.1.1 The data has to be sent to the gateway IP Subnet rule #6 Example for rule #6: PC0 (192.168.1.1) ping 10.0.1.1 Check for source IP network ID 192.168.1.1 & 255.255.255.0 = 192.168.1.0 Check for destination IP network ID 10.0.1.1 & 255.255.255.0 = 10.0.1.0 The source IP network and the destination IP network mismatch The host need to send the packet to the default gateway The subnet mask used in both cases, is the subnet mask of source IP’s PC IP Subnet rule #6 The algorithm for rule #6: Command destination_IP (e.g. ping 10.10.1.1) If (destination_IP & my_PC_subnet_mask == source_IP & my_PC_subnet_mask) This means the destination IP is within same LAN, Check arp_table for this IP address for MAC address. (if not send out arp to get this IP’s MAC address) Send the frame out to the IP address which is in the same LAN If (destination_IP & my_PC_subnet_mask != source_IP & my_PC_subnet_mask) This means the destination IP is not in the same LAN Check OS for default_gateway_IP Check arp_table for the MAC address of default_gateway_IP Send the frame to the default gateway. #Quick Quiz# How many gateways are there in the figure? Answer This LAN has 4 gateways This LAN has 1 gateway IP Subnet rule #7 Router MUST be used in order for two hosts with different network address (or network ID) to communicate. Communication will not happen between hosts with different subnets address that are connected to a switch A switch only provides communication for the PCs with the same network ID Two different subnets has to be communicated via a router. Rules #7 in Router Based on rule #7, IP addresses set in a router ports have to be in different subnet. Meaning IP addresses set in router ports can’t be in the same subnet The router IOS will complain. The router won’t allow you to set it. The following example won’t work. Example network of IP Subnet Rules #7 The following example WORKS, despite a little strange. The network does not violate any subnet rule. In fact, it embrace them. (1 LAN 2 IP subnets) The following network embraces IP subnet rule 5, rule 6 and rule 7 Rule 5: Two PC can’t communicate with different subnet address within a LAN Rule 6: Data need a gateway to exit to another subnet. Rule 7: You need a router for communication between 2 subnets. IP Subnet Rule #8 Two special cases on host ID bits which are all ‘0’s and all ‘1’s When Host ID bits are all ‘0’s, it is a network address. When Host ID is all ‘1’s, it is a broadcast address, we don’t use it as a host address too. These two addresses represent the “head” and the “tail” of the given IP address block range. We CAN’T use both of these IP addresses as host IP and gateway IP. Example, IP address = 192.168.1.1, Subnet mask = 255.255.255.0 Network address of the subnet = 192.168.1.0 Broadcast address of the subnet = 192.168.1.255 Rule 8 in Router Router won’t accept network address and broadcast address as its port IP address. In the following example, the router will “complain” in both cases and won’t accept the IP addresses with the given subnet mask: IP = 192.168.1.0 subnet mask = 255.255.255.0 IP = 192.168.1.255 subnet mask = 255.255.255.0 Packet Tracer Example Study the following example and see why the router won’t accept IP address from /30 to /23. #Quick Quiz# 201.110.93.25/20 => Network address : ________________ Broadcast address :___________________ Answer 201.110.93.25/20 => There are (32 - 20) = 12 (host ID bits) /20 = 255.255.240.0 = 255.255.“111100002”.0 201.110.“01011101”.25/20 = 201.110.“0101xxxx.xxxxxxxx” x = host ID bits. Network address (host ID bits = ‘0’) 201.110.“01010000.00000000” = 201.110.80.0 Broadcast address (host ID bits = ‘1’) 201.110.“01011111.11111111” = 201.110.95.255 What is a broadcast address? A broadcast address is a network address that allows information to be sent to all nodes on a LAN, rather than to a specific network host. Broadcast is used in ARP and DHCP. Router will stop broadcast from reaching other subnets. Sometimes, IP subnets is also called a broadcast domain. IP subnet rule #9 The first usable IP and the last usable IP. Usable IP addresses mean they can be used in hosts, PCs, printers, gateways, and servers. The first usable IP = network address + 1 More precisely, host ID = 1 If network adress = 192.168.3.0, first usable IP = 192.168.3.1 The last usable IP = broadcast address – 1 More precisely, host ID = All ‘1’s – 1 If broadcast address = 192.168.3.255, last usable IP = 192.168.3.254 Cisco guidelines (not rules): Last usable IP is preferred to be router IP address = gateway IP First usable IP is preferred to be server, printer any host that requires static IP #Quick Quiz# What is the first usable and last usable IP for 172.16.185.3/22 ? Answer What is the first usable and last usable IP for 172.16.185.3/22 ? IP = 172.16.“10111001.00000011” SM = 255.255.“11111100.00000000” Network address = 172.16.“10111000.00000000” = 172.16.184.0 Broadcast address = 172.16.“10111011.11111111” = 172.16.187.255 First usable IP 172.16.184.1 Last usable IP 172.16.187.254 LAN IP design guideline Given a range of IP address: First IP addresses are preferred to be used for setting static IP for servers and printers Starting from the first IP and counting down e.g: 192.168.1.1 for DHCP server; 192.168.1.2 for printer Last IP addresses are preferred to be used for setting router IP (gateway IP) Starting from the last IP and counting up. e.g. 192.168.1.254 for gateway 1, 192.168.1.253 for gateway 2. Mid-range IP addresses are preferred to be set as the DHCP range for the PCs e.g 192.168.1.10 to 192.168.1.250 In this range, we reserve 10 first IP for servers and printer and 5 last IPs for gateways e.g. 192.168.1.1 e.g. 192.168.1.254 Static IP Dynamic IP Static IP Static IP First IP Last IP Mid-range IP Why Last Usable IP for Gateway? Case study: Router locked with password, you don’t know the password and the router IP, and you are new to the job. What do you assign? Do you have to test 254 IP to find the IP? Provided that you know the subnet mask is /24. Technically, you can assign any usable IP in the range for the default gateway IP. If last usable IP rule is followed, you can guess it easily. If the gateway IP is set in the beginning of the range (e.g. 192.168.1.3), chances is very high that you set an host IP which is the same as the default gateway IP. IP Subnet Rules #10 When Internet addresses were standardized (in early 1980s), the IP addresses were divided up into 5 classes: Class A: Network prefix is 8 bits long. Default mask: 255.0.0.0. or /8 Class B: Network prefix is 16 bits long. Default mask: 255.255.0.0 or /16 Class C: Network prefix is 24 bits long. Default mask: 255.255.255.0 or /24 Class D: is multicast address Class E: Experimental IP Subnet Rules #10 We can only use class A, B, and C for host IP address. Class A, B, C IP addresses are called unicast IP address We CAN’T use class D and E IP address for “normal” IP address. Class D IP addresses are called multicast IP addresses Class D IP usage is quite different from class A, B, C. Broadcast, Multicast, Unicast Broadcast One to all Used in DHCP, ARP Multicast One to many Class D IP Normally used in streaming IP TV or streaming radio Unicast One to one Class A, B, C IP What we have been using… IP Subnet Rules #10 Unicast IP = 1 device 1 IP Multicast IP = all devices that “tune into that channel” share the IP Unicast IP and multicast IP can be used at the same time in 1 host. Example in the following diagram: Two streaming servers with multicast IP (224.0.0.112 and 224.0.0.113) For example streaming web cam videos. All PCs and servers still require their unique IP address If all PC “tune in” the “channel” of 224.0.0.112, all PCs and Streaming Server 1 will share the same multicast IP (224.0.0.112) on top of their own unicast IP address. IP Subnet Rules #11 The range of private IP addresses which is NOT used in public IP address for global Internet. The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets (local networks): 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 IANA has reserved private the following IP addresses for Automatic Private IP Addressing (APIPA) for Windows platform (except NT). 169.254.0.0 - 169.254.255.255 APIPA is used in Windows where the IP address (169.254.x.x) is assigned automatically by the OS (after sometime) when the DHCP service is not available (and the option of “Obtain an IP address automatically” is on). If the DHCP service is working fine in your LAN, and you still get the IP 169.254.x.x for your Windows IP, that only means your cable, connection or NIC is having problem. Private and Public IP Address Private IP addresses are the IP addresses that use at home (and at school), as your source IP. You need to pay money for an Public IP address (monthly subscription). And the domain name too (e.g. www.utar.edu.my, www.intel.com) Public IP is global, and you need to apply and obtain it through IANA (maybe via Tmnet) The range of Private IP (IMPORTANT !!!) 10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.16.255.255 192.168.0.0 to 192.168.255.255 Private IP is not unique. There are thousands of 192.168.1.1 in the world Special IP = 127.0.0.1, is reserved to be the loopback IP address To test the network software The domain name localhost = 127.0.0.1 #Quick Quiz# You key in the primary DNS IP address as 202.188.0.5 and your secondary DNS IP address as 202.190.3.4. However, you later found out that both IP addresses point to the same PC/host/server. Is this possible? Why and why not? IP Subnet Rule #12 A host can have different IP addresses according to the number of network interface cards installed. IP is an Network Interface address A PC with 1 NICs requires 1 IP address A PC with 3 NICs requires 3 IP addresses One IP for each NIC A router with 2 Fast Ethernet ports and 2 T1 serial ports need 4 IP address One IP for each ports A DNS server can have 2 NICs with 2 different IP addresses Answer for the previous slide From now on, “adjust” your previous thought on IP address is a network “host” address. Meaning 1 IP = 1 host. #Quick Quiz# 1. How many IP addresses are required in Router0? 2. How many IP addresses are required in PC5? 3. How many IP addresses are required in PC9? 4. How many LAN/IP subnets are there in this network? Answer: (1) 3 (3) 1 (2) 2 (4) 9 IP Rule #13 Host ID bits as LAN design parameter for allocating the number of PCs/hosts in a LAN. For example: For a subnet with a mask of 255.255.255.128, how many hosts that we can allocate in that subnet? 255.255.255.128 => /25 => 32-25 = 7 host bits 27 => 128 host ID => theoretically 128 IP address. Actual allocation of PC/host IP = 128 – 1 – 1 – 1 = 125 IP address Can’t use network address, broadcast address, and gateway address for PC/hosts. (Assuming 1 gateway in the LAN) Host includes laptops, servers and printers. If a LAN is desired to have 27 PCs, what should be the subnet mask? Formula: 2H ≥ “number of hosts” + 3; H = host ID bits 3 = 1 network address + 1 broadcast address + 1 gateway 2H ≥ 27 + 3 => 25 ≥ 30 => H = 5; Subnet mask = /(32-5) = /27 => 255.255.255.224 IP Subnet Rules #14 The principle of IP design in subnetting and supernetting Subnetting 1 bigger network split into a few smaller networks. Supernetting 2 or more smaller networks are joined into a larger network. subnetting supernetting IP Subnet Rules #14 Supernetting Subnetting IP Subnet Rules #14 Split the host number portion of an IP address into a subnet number and a (smaller) host number. Result in a few blocks of IP addresses. The subnet mask will be extended with more ‘1’ The subnet mask will get larger. network prefix host number subnet number network prefix host number extended network prefix IP Subnetting example (1) Perform subnetting for the following LAN. 172.16.0.0/16 Specification: Subnet number = 8 bits. IP Subnetting example (2) Original subnet mask = /16 New extended subnet mask = /(16 + 8) = /24 172.16 0.0 8 bits Subnet # network prefix 8 bits hosts 16 bits 16 bits New network prefix 8 bits hosts extended network prefix (24 bits) IP Subnetting example (3) Implementation Subnet 1 network into 3 LAN 1 network ID (172.16.0.0/16) becomes 3 network ID (172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24) All subnet mask has been changed from /16 to /24 1 gateway -> 3 gateways Subnetting and Supernetting The principle of IP design in subnetting and supernetting Subnetting 1 bigger IP subnet split into a few smaller IP subnets. Supernetting 2 or more smaller IP subnets are joined into a larger IP subnet. subnetting supernetting Supernetting Subnetting Quick Quiz: Subnet and Supernet Subnetting or supernetting will produce more hosts within a subnet? Subnetting or supernetting will require more routers? Supernetting will require more switch ports or less switch ports? Supernetting will result in longer network ID or shorter network ID? Answer Supernetting Subnetting More switch ports Shorter network ID Split the host number portion of an IP address into a subnet number and a (smaller) host number. Result in a few blocks of IP addresses. The subnet mask will be extended with more ‘1’ The subnet mask will get “larger”. (e.g: /16 => /20) network prefix host number subnet number network prefix host number extended network prefix IP Subnetting example (1) Perform subnetting for the following LAN. 172.16.0.0/16 Specification: Subnet number = 8 bits. IP Subnetting example (2) Original subnet mask = /16 New extended subnet mask = /(16 + 8) = /24 172.16 0.0 8 bits Subnet # network prefix 8 bits hosts 16 bits 16 bits New network prefix 8 bits hosts extended network prefix (24 bits) IP Subnetting example (3) General Implementation: Subnet 1 network into 3 LAN 1 network ID (172.16.0.0/16) becomes 3 network ID (172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24) All subnet mask has been changed from /16 to /24 1 gateway -> 3 gateways Quick Quiz: If you have a network 170.100.0.0/16, the number of subnet bits allocated is 6, then: What will be the new subnet mask? How many more gateway IP addresses do you require? Answer /16 + 6 = /22 = 255.255.252.0 Assume that originally you need 1 gateway IP address. 6 subnet bits will require 26 gateway addresses = 64 Maximum you need (64 – 1) = 63 more gateway IP address. 170.100 0.0 6 bits Subnet # network prefix 10 bits hosts 16 bits 16 bits New network prefix 10 bits hosts extended network prefix (22 bits) Types of Subnetting Traditional classful subnetting Based on the IP class to perform subnetting Design with equal size subnet mask across “the network” VLSM (variable subnet mask) Design a network with subnets of different “size” of subnet mask More efficient use of the IP addresses CIDR & VLSM Prior to 1981, IP addresses used only the first 8 bits to specify the network portion of the address In 1981, RFC 791 modified the IPv4 32-bit address to allow for three different classes IP address space was depleting rapidly the Internet Engineering Task Force (IETF) introduced Classless Inter-Domain Routing (CIDR) CIDR uses Variable Length Subnet Masking (VLSM) to help conserve address space. VLSM is simply subnetting a subnet Traditional classful Subnetting First, determine which class does the IP belongs to Class A (24 host bits), B (16 host bits) or C (8 host bits) Second, determine how many subnet bits you want to allocate. Third, compute the new subnet mask. Fourth, plan the IP range of each subnet. Traditional Classful Subnetting In this subnetting scheme, you can’t use the subnet bits which is all ‘0’s and all ‘1’s There is a way to “overcome” this, will discuss later in the slides. In fact, you will “lose” a lot of usable host IP addresses in the form of Subnetwork network ID (all host bits = ‘0’) Subnetwork broadcast address (all host bits = ‘1’s) Gateway IP addresses The subnetworks with all bits which ‘0’s and ‘1’s Subnet bits = “00..” or “11..” Original Network bits Host bits Traditional Classful Subnetting There are two ways to determine the subnet bits (you can choose either one the following): The number of subnets that you want to have in the network that you are going to “split” For example, you want 10 subnets in the network, then you need S subnet bits. (2S >= 10) The maximum number of hosts that you want to allocate For example, if you have a class B IP address, and you need maximum1000 hosts in any one of the subnet, then you need N subnet bits where ( 32 = 16 + S + H bits) 2H >= 1000 => H = 10 bits. Then N = 32 – 16 – 10 = 4 bits. 16 is the original host bits for class B IP address. Quick Quiz If I have a class B address, and I need 11 subnets, what should be my Subnet bits Host bits Max number of hosts in each subnet New subnet mask? Answer: Subnet bits = 4 Host bits = 12 Max # of host = 212 – 2 New mask = /20 Quick Quiz: Number of subnet bits How many departments can you design if your company: has a class C IP address; 1 department = 1 subnet; max host in any one of the department = 18; Answer Class C IP has 8 bits host 18 host requires 2S > 18 => S = 5 8 – 5 = 3 (subnet bits) 23 = 8 8 – 2 = 6 subnets => 6 departments 2 represents subnet bits with all ‘0’s and all ‘1’s. Steps to Subnetting (1) Case Study: You have a Class C address of 192.168.100.0 /24. You need nine subnets. What is the IP plan of network numbers, broadcast numbers, and valid host numbers? What is the subnet mask needed for this plan? Steps to Subnetting (2) Since the subnet mask is /24, we only need to focus on the 4th octet. The 4 octet is the host bits, represented by ‘H’ The ‘N’ bits is the new “subNet” bits. Steps to Subnetting (3) Steps to Subnetting (4) Steps to Subnetting (5) Steps to Subnetting (6) Steps to Subnetting (7) Steps to Subnetting (8) Steps to Subnetting (8) Continue next page Steps to Subnetting (9) Steps to Subnetting (10) Quick Quiz: How many host IP addresses are there in 192.168.100.0/24? How many host IP addresses are there in all the “valid” subnets, if 4 bits is used as subnet bits? Assume host only consist of end devices PCs, servers, and printers. Answer: 28 – 2 = 254 hosts 28 – 16 – 16 – 14 – 14 – 14 = 182 16 = subnet with all ‘0’ subnet bits 16 = subnet with all ‘1’ subnet bits 14 = subnet network address 14 = subnet broadcast address 14 = gateway IP for the subnets Compare to the original “supernet”, the subnetting has lost (254-182) = 72 “useful host IP addresses”. Quick Quiz: Subnetting You have address of 172.16.0.0 /16. You need nine subnets. What is the IP plan for these 9 subnets? Answer Quick Quiz: Subnetting You are being assigned to a network 10.0.109.2/19, and 4 bits are being allocated for subnets. You are asked to configure your PC to be the 8th host in the 5th subnet (0 subnet is not the 1st subnet). The gateway is the last usable host address. So, what will be your IP address, subnet mask, and gateway address? Answer 10.0.109.0 = 10.0. 01101101. 2/19 => 10.0. 011 < 0110 >< 1.2> => 10.0.011 < 0101>< 0.00001000> = 5th subnet. = 8th host. So IP = 10.0. “01101010 . 00001000” = 10.0.106.8 Subnet mask = /23 = 255.255.254.0 Gateway address = 10.0. 011 = 10.0.107.254 VLSM (1) Variable-length subnet masking (VLSM) is the more realistic way of subnetting a network to make for the most efficient use of all of the bits. VLSM is the process of “subnetting a subnet” and using different subnet masks for different networks in your IP plan. What you have to remember is that you need to make sure that there is no overlap in any of the addresses. VLSM (2) Remember that when you perform classful (or what I sometimes call classical) subnetting, all subnets have the same number of hosts because they all use the same subnet mask. This leads to inefficiencies. For example, if you borrow 4 bits on a Class C network, you end up with 14 valid subnets of 14 valid hosts. (instead of 16 subnets) A serial link to another router only needs 2 hosts, but with classical subnetting, you end up wasting 12 of those hosts. IP Subnet Zero (1) When you work with classical subnetting, you always have to eliminate the subnets that contain either all zeros or all ones in the subnet portion. Hence, you always used the formula 2N– 2 to define the number of valid subnets created. However, Cisco devices can use those subnets, as long as the command “ip subnet-zero” is in the configuration. IP Subnet Zero (2) This command is on by default in Cisco IOS Software Release 12.0 and later; if it was turned off for some reason, however, you can re-enable it by using the following command: Router(config)#ip subnet-zero Now you can use the formula 2N rather than 2N – 2. VLSM Example #1 (1) Given the following network 192.168.1.0/24, how is it going to be subnetted? We only need to take care of the 10 hosts subnet, 11 hosts subnet, and 30 hosts subnet. Assume IP subnet-zero is implemented. Assume that there won’t be expansion on the number of host per subnet. VLSM Example #1 (2) Using the traditional subnetting methodology. There are 3 subnets and the maximum # host in a subnet is 30. Either we have 2 subnet bits or 5 host bits. If we choose 2 subnets bit design (6 bits host), there won’t be much expansion on subnets but growth on hosts. In this case, we choose 5 bits host design (3 subnet bits), as specified in the question. VLSM Example #1 (3) Since we have “ip subnet-zero, we can use the range 192.168.1.1 to 192.168.1.30 192.168.1.225 to 192.168.1.254 You can pick any three of these 8 subnets. VLSM Example #1 (4) With traditional classful subnetting 192.168.1.0/27 192.168.1.32/27 192.168.1.64/27 VLSM Example #1 (5) However, the traditional classful subnetting in this case, is not “IP address efficient”. Given that there won’t be expansion on the number of host per subnet. 10 hosts subnet and 11 hosts subnet will have around 20 IP addresses (per subnet) that are not utilized. VLSM Example #1 (6) If we use VLSM scheme, this is how we are going to do it. 1st we choose the largest network 30 hosts Host bits is still 5 We can still use the subnet of 192.168.1.1 to 192.168.1.30, which is 192.168.1.0/27 2nd we “group” the 10 hosts subnet and 11 hosts subnet into one “30 hosts” subnet. We can use the subnet of 192.168.1.33 to 192.168.1.62, which is 192.168.1.32/27 VLSM Example #1 (7) Now, we perform subnetting the subnet. We subnet the 192.168.1.32/27 into two subnets. With the help of IP calculator (using CIDR), we have: 192.168.1.32/28 Usable IP range 192.168.1.33 to 192.168.1.46 192.168.1.48/28 Usable IP range 192.168.1.49 to 192.168.1.62 VLSM Example #1 (8) With VLSM subnetting 192.168.1.0/27 192.168.1.48/28 192.168.1.32/28 VLSM Example (1) A Class C network—192.168.100.0/24—is assigned. You need to create an IP plan for this network using VLSM. VLSM Example (2) The steps to create an IP plan using VLSM for the network illustrated are as follows: Step 1: Determine how many H bits will be needed to satisfy the largest network. Step 2: Pick a subnet for the largest network to use. Step 3: Pick the next largest network to work with. Step 4: Pick the third largest network to work with. Step 5: Determine network numbers for serial links. VLSM Example (3) VLSM Example (4) Continue Next page VLSM Example (5) Continue Next page VLSM Example (6) Continue Next page VLSM Example (7) Continue Next page VLSM Example (8) Continue Next page VLSM Example (9) VLSM Example (10) Continue Next page VLSM Example (11) Continue Next page VLSM Example (12) VLSM Example (13) Continue Next page VLSM Example (14) Continue Next page VLSM Example (15) VLSM Conclusion Looking at the plan, you can see that no number is used twice. You have now created an IP plan for the network and have made the plan as efficient as possible, wasting no addresses in the serial links and leaving room for future growth. This is the power of VLSM. Quick Quiz: VLSM Design Given the address of a network is 214.97.254.0/17. This network is going to be subnetted into 3 subnets with 900 hosts, 100 hosts and 500 hosts. Design the IP ranges consecutively, one net after the other, starting with the lowest IP address in 214.97.254.0/17. Design using the VLSM scheme, put the largest subnet first down to the smallest subnet. Answer (900-500-100) arrangement 900 hosts is rounded to 1024 (0x3FF), occupying 0x000 to 0x3FF. New subnet 3-1 = 214.97.128.0 to 214.97.131.255 => 214.97.128.0/22 (lower two octets) 10000000.00000000 to 10000011.11111111 500 hosts => rounded to 511 (0x1FF), occupying 0x400 to 0x5FF. New supernet = 214.97.132.0 to 214.97.133.255 => 214.97.132.0/23 (lower two octets) 10000100.00000000 to 10000101.11111111 100 hosts is rounded to 128 (0x7F), occupying 0x600 to 0x67F. New subnet 3-2 = 214.97.134.0 to 214.97.134.127 => 214.97.134.0/25 (lower two octets) 10000110.00000000 to 10000110.01111111 Quick Quiz: Subnetting Given the following network 192.168.1.0/24, how is it going to be subnetted with 50 hosts, 60 hosts, and 70 hosts? Answer 1: Traditional subnetting With traditional method, the network requires 2 subnet bits (assume with ip subnet-zero). That leave only 6 host bits (max # of host 62), then we can’t “fit” 70 hosts with only 6 host bits. Therefore, we can’t subnet this network with traditional method. Answer 2: VLSM subnetting Start with largest network, 70 hosts, require 7 host bits, left with 1 subnet bit. Which make the new subnet mask /25 We can put the 70 hosts in either 192.168.1./25 (192.168.1.0/25) or 192.168.1./25 (192.168.1.128/25) We choose the first subnet, which is 192.168.1.0/25 The rest of the two subnets will be fit into 192.168.1.128/25 Follow with the second largest network, 60 hosts, require 6 host bits. We need to perform subnetting the subnet (192.168.1.128/25), which leave us with 1 new subnet bit Which make the new subnet mask /26 We can put the 60 hosts in either 192.168.1./26 (192.168.1.128/26) or 192.168.1./26 (192.168.1.192/26) We choose the 60 hosts in the subnet of 192.168.1.128/26 We put the remaining 50 hosts in the subnet of 192.168.1.192/26 Quick Quiz: Subnetting (again) Given the following network 192.168.1.0/24, how is it going to be subnetted with 70 hosts, 60 hosts, and 70 hosts? (previously it was 50, 60 and 70 hosts) Answer: This network can NOT be subnetted with traditional subnetting or VLSM with 192.168.1.0/24. Though 70+60+70 = 200 hosts (which are less than 254 host, which is 8 host bits) Reason: There are two largest subnet with 70 hosts which require 7 host bits, which leave us with 1 bit subnet (# of subnets = 2). After fitting the two 70 hosts subnet, there is no more subnet left for the 60 hosts. You can either fit in 2 of the 3 subnets. Route Summarization Route summarization, is needed to reduce the number of routes that a router advertises to its neighbor. Router summarization make the “combined” subnets appear to be a “supernet” For every route you advertise, the size of the update and routing table grows. Route summarization greatly reduces the size of the routing table It has been said that if there were no route summarization, the Internet backbone would have collapsed from the sheer size of its own routing tables back in 1997. CIDR CIDR (Classless Inter Domain Routing) is also known as supernetting as it effectively allows multiple subnets to be grouped together for network routing. CIDR was adopted to help ease the load imposed on internet and large network backbone routers by the increasing size of routing tables. Large routing tables have several adverse effects: Routers require more memory in order to store and manipulate their routing tables which increases operation costs. Routing latency is increased due to the large amount of data contained in the routing tables. Network bandwidth usage is increased by routing updates when routers exchange their routing tables. CIDR CIDR (Classless Inter-Domain Routing) encompasses: the VLSM technique of specifying arbitrary-length prefixes. An address in CIDR notation is written with a suffix indicating the number of bits in the prefix, such as 192.168.0.0/16, where /16 is the suffix, and 192.168.0.0 is the prefix. the aggregation of multiple contiguous prefixes into supernets, thus reducing the number of entries in the global routing table. Aggregation hides multiple levels of subnetting from the Internet routing table, and reverses the process of subnetting with VLSM. Route Summarization Example (1) Route Summarization Example (2) Route Summarization Example (3) Route Summarization Example (4) Route Summarization Example (5) Try this supernetting with UTAR IP calculator (yourself) Route Summarization Example (6) Supernetting & Route Summarization Supernet and route summarization use the same IP address computation that combines a few IP of a few subnets into one. The difference is that supernetting will physically combine a few subnets together whereas route summarization only compute the supernet network ID (in router) without changing the network. Supernetting & Route Summarization Both route summarization & supernetting produce the same summarized IP network ID. However supernetting changes the network topology. 172.16.128.0/22 Original supernetting Route Summarization Pros and Cons of subnetting Pros: Better security and management More host IP being utilized within the subnet. Cons: Waste some host IP in the form of network address, broadcast address, and gateway IPs Network design is more complex in order to perform the IP planning.


Comments

Copyright © 2025 UPDOCS Inc.