Subnetting
Efficiency Examples Configurator | Exercise Answers Exercise 1: Class B with 500 subnets Exercise 2: 155.70.144/20 with 100 subnets Given - Class B addresses 119.48.0.0 (in CIDR-speak, 119.48./16)
- 500 subnets are required
Calculate subnet mask - How many bits are required to create 500 subnets?
- The number of subnets available is 2n - 2, where n is the number of 'borrowed' bits. The 2 subtracted is to allow for the network address (which cannot be a subnet) and the network broadcast (which cannot be a subnet). For more information see Subnetting Efficiency
- 28 - 2 = 253. Not enough.
- 29 - 2 = 510. Bingo!
- The first 16 bits are assigned, the next 9 are subnetwork addresses. Any differences in these first 25 bits means the addresses are on different networks (and must be routed by the router).
- The subnet mask is 25 1's followed by 7 0's:
11111111 . 11111111 . 11111111 . 10000000 Subnet mask is 255.255.255.128 - The number of host addresses available on each subnet is 2m - 3, where m is the number of host bits (n + m + assigned bits = 32). The 3 subtracted is to allow for the network address (which cannot be a host), the broadcast (which cannot be a host) and the gateway (which cannot be a host). For more information see Subnetting Efficiency
27 - 3 = 125 Calculate the settings of a host on subnet 300 - 300th usable 9-bit subnet is 10010110 0.
- The subnet 300 address is
119 . 48 . [ 1 0 0 1 0 1 1 0 .  0 ] { 0 0 0 0 0 0 0 } - Gateway will be the first usable address on subnet 300:
119 . 48 . [ 1 0 0 1 0 1 1 0 .  0 ] { 0 0 0 0 0 0 1 } Gateway address is 119.48.150.1 - Subnet mask is 255.255.255.128 (from above)
- Host addresses start from the second usable address (the first is the router)
119 . 48 . [ 1 0 0 1 0 1 1 0 .  0 ] { 0 0 0 0 0 0 1 } First host's address is 119.48.150.2 Given - CIDR addresses 155.70.144/20
- 100 subnets are required
Calculate subnet mask - How many bits are required to create 100 subnets?
- The number of subnets available is 2n - 2, where n is the number of 'borrowed' bits. The 2 subtracted is to allow for the network address (which cannot be a subnet) and the network broadcast (which cannot be a subnet). For more information see Subnetting Efficiency
- 26 - 2 = 62. Not enough.
- 27 - 2 = 126. Bingo!
- The first 20 bits are assigned, the next 7 are subnetwork addresses. Any differences in these first 27 bits means the addresses are on different networks (and must be routed by the router).
- The subnet mask is 27 1's followed by 5 0's:
11111111 . 11111111 . 11111111 . 11100000 Subnet mask is 255.255.255.224 - The number of host addresses available on each subnet is 2m - 3, where m is the number of host bits (n + m + assigned bits = 32). The 3 subtracted is to allow for the network address (which cannot be a host), the broadcast (which cannot be a host) and the gateway (which cannot be a host). For more information see Subnetting Efficiency
25 - 3 = 29 Calculate the settings of a host on subnet 3 - 3rd usable 7-bit subnet is 0000 011.
- The subnet 3 address is
155 . 70 . 1 0 0 1 [ 0 0 0 0 . 0 1 1 ] { 0 0 0 0 0 } - Gateway will be the first usable address on subnet 3:
155 . 70 . 1 0 0 1 [ 0 0 0 0 . 0 1 1 ] { 0 0 0 0 1 } Gateway address is 155.70.144.97 - Subnet mask is 255.255.255.224 (from above)
- Host addresses start from the second usable address (the first is the router)
155 . 70 . 1 0 0 1 [ 0 0 0 0 . 0 1 1 ] { 0 0 0 1 0 } First host's address is 155.70.144.98 Send email to Guy@ProfessorGuy.com © Copyright 2000 Guy T. Schafer, Cisco-Certified Network Associate Last updated January, 2000 |