170 likes | 400 Views
Chapter 12. Subnetting CIS 1140. Subnetting. Subnetting: taking a single network address issued from a registrar or an ISP and creating two or more subnetworks A subnet is a network created by borrowing bits from the host portion of an assigned network IP address.
E N D
Chapter 12 Subnetting CIS 1140
Subnetting • Subnetting: taking a single network address issued from a registrar or an ISP and creating two or more subnetworks • A subnet is a network created by borrowing bits from the host portion of an assigned network IP address. • Binary number system is used for IP addressing. • Even though binary number system is used for addressing, IP addresses are typically written in dotted decimal format. • Ex. 172.16.15.3
Subnetting (cont.) • 1. Determine the class of the IP address to be used and all accompanying information: • 0 – 127 Class A • N – H – H – H • 255.0.0.0 • 128 – 191 Class B • N – N – H – H • 255.255.0.0 • 192 – 223 Class C • N – N – N – H • 255.255.255.0
Subnetting (cont.) • 2. Determine how many bits to “borrow” for subnetting based on the number of networks or hosts that must be accommodated • You must leave at least 2 bits for hosts. • 2n - 2 ≥ number of subnets needed (where n is the number of bits borrowed for subnetting) • 2n - 2 ≥ number of hosts needed (where n is the number of bits left for addressing hosts)
Subnetting (cont.) • How many bits would need to be borrowed to produce 7 subnets? 2n - 2 ≥ 7 2n ≥ 9 n = 4 (remember 24=16) • How many bits would need to be borrowed to produce 25 subnets? 2n - 2 ≥ 25 2n ≥ 27 n = 5 (remember 25=32)
Subnetting (cont.) • How many bits would need to be borrowed to produce 220 subnets? 2n - 2 ≥ 220 2n ≥ 222 n = 8 (remember 28=256) • How many bits would need to be used to produce 12 hosts per subnet? 2n - 2 ≥ 12 2n ≥ 14 n = 4 (remember 24=16)
Subnetting (cont.) • How many bits would need to be used to produce 35 hosts per subnet? 2n - 2 ≥ 35 2n ≥ 37 n = 6 (remember 26=64) • How many bits would need to be used to produce 500 hosts per subnet? 2n - 2 ≥ 500 2n ≥ 502 n = 9 (remember 29=512)
Subnetting (cont.) • How many bits are borrowed for subnetting a class B address if 10 must be used for hosts? 8 bits from the 3rd octet + 8 bits from the 4th octet give 16 bits for hosts + subnets 16 – 10 = 6 • How many bits are borrowed for subnetting a class C address if 3 must be used for hosts? 8 bits from the 4th octet give 8 bits for hosts + subnets 8 – 3 = 5
Subnetting (cont.) • 3. Determine the actual subnet mask of the newly created networks • Start with the default subnet mask and add in the bits that were “borrowed” or set during the subnetting process • If three bits were borrowed from a class C address: 128 64 32 16 8 4 2 1 1 1 1 0 0 0 0 0 = 224 (128+64+32) The mask would be 255.255.255.224
Subnetting (cont.) • If four bits are borrowed from a class C address: 128 64 32 16 8 4 2 1 1 1 1 1 0 0 0 0 = 240 (128+64+32+16) The mask would be 255.255.255.240 • If four bits are borrowed from a class B address: 128 64 32 16 8 4 2 1 1 1 1 1 0 0 0 0 = 240 (128+64+32+16) The mask would be 255.255.240.0
Subnetting (cont.) • 4. Determine what value you are ranging on. The last bit turned on in an octet will determine the range. • Borrow 3 bits for subnetting 192.168.3.0 128 64 32 16 8 4 2 1 1 1 1 0 0 0 0 0 This would range on 32. 192.168.3.0 192.168.3.128 192.168.3.32 192.168.3.160 192.168.3.64 192.168.3.192 192.168.3.96 192.168.3.224 *Note the equation 2n - 2 ≥ subnets When n = 3 it is predicted that 6 useable subnets will be produced. When the first and last subnet are thrown out this is true. This would leave 5 bits for hosts. 2n - 2 ≥ hosts would predict 30 useable hosts which is also true.
Subnetting (cont.) • The first address in a network or subnet is used to identify the subnet/network and cannot be used to address hosts. • The last address in a network or subnet is used as the broadcast for the subnet/network and cannot be used to address hosts. • When a subnet is created, we typically throw out the first and last subnet to avoid confusion: • In the previous example: • Does 192.168.3.0 identify the entire 192.168.3.0 network or just the first subnet? • Does 192.168.3.255 create a broadcast for the entire 192.168.3.0 network or just the subnet 192.168.3.224? • This throwing out of two subnets and two addresses in each subnet explains the – 2 in the equation 2n - 2 ≥ number of hosts/subnets
Subnetting (cont.) • Borrow 4 bits for subnetting 192.168.3.0 128 64 32 16 8 4 2 1 1 1 1 1 0 0 0 0 This would range on 16. 192.168.3.0 192.168.3.128 192.168.3.16 192.168.3.144 192.168.3.32 192.168.3.160 192.168.3.48 192.168.3.176 192.168.3.64 192.168.3.192 192.168.3.80 192.168.3.208 192.168.3.96 192.168.3.224 192.168.3.112 192.168.3.240 *Note the equation 2n - 2 ≥ subnets When n = 4 it is predicted that 14 useable subnets will be produced. When the first and last subnet are thrown out this is true. This would leave 4 bits for hosts. 2n - 2 ≥ hosts would predict 14 useable hosts which is also true.
Variable Length Subnet Mask • Variable Length Subnet Mask (VLSM): a subnet mask that is not expressed in standard 8-bit or one-byte values. A VLSM occurs when a subnet is further divided into smaller subnets, which are not equal to the original subnet in length or in the number of hosts. • Subnetting a subnet • Avoids wasting addresses when subnets vary greatly in size • Ex. Point-to-point links really require only 4 address: 1 ID 1 Broadcast 2 one address for each side of the link • Fixed Length subnet Mask (FLSM): subnets are equal in range and have an equal number of hosts
Advantages of Subnetting • Creates a more secure network by placing hosts on separate networks. • Breaks up broadcast domains. Broadcast traffic from one network does not “bleed” over into other networks. • Fewer collision occur because of reduced broadcasts and segmentation reduces the size of the collision domains.
Disadvantages of Subnetting • Subnetting can become confusing as networks grow larger. • Subnetting itself is not an easy process if the administrator does not practice. • Not all device and protocols can use all types of subnetting. • Ex. Not all routing protocols support VLSM.