Advanced Subnetting
From Jaymzworld
Contents |
Class B Subnetting
Class B subnetting is the same as class C, except you will start subnetting in the third octet. These subnets in the third octet are the exact same numbers we used in the foruth octet when subnetting class C.
This means that the network address for a classB, when subnetting in the third octet, will always be 0.
- For example, 172.16.10.0
- The broadcast address will always be 255 in the fourth octet.
- For example, 172.16.10.255
- The broadcast address will always be 255 in the fourth octet.
All possible class B subnet masks
Let's look at all the possible Class B subnet masks first. Notice that we have a lot more possible subnets than we do with a Class C network address:
| Mask | Subnet |
|---|---|
| 255.255.0.0 | |
| 255.255.128.0 | /17 |
| 255.255.192.0 | /18 |
| 255.255.224.0 | /19 |
| 255.255.240.0 | /20 |
| 255.255.248.0 | /21 |
| 255.255.252.0 | /22 |
| 255.255.254.0 | /23 |
| 255.255.255.0 | /24 |
| 255.255.255.128 | /25 |
| 255.255.255.192 | /26 |
| 255.255.255.224 | /27 |
| 255.255.255.240 | /28 |
| 255.255.255.248 | /29 |
| 255.255.255.252 | /30 |
We know the Class B network address has 16 bits available for host addressing. This means we can use up to 14 bits for subnetting because we have to leave at least two bits for host addressing.
The process of subnetting a Class B network is pretty much the same as it is for a Class C, exept that you just have more host bits. Use the same subnet numbers you used with Class C, but add a zero to the network portion and a 255 to the broadcast section in the fourth octet.
Class B subnetting - /17
- 172.16.0.0
- 255.255.128.0
- 21 = 2 subnets
- 215 = 32,766
- 256 - 128 = 128
| 0.0 | 128.0 | Network |
|---|---|---|
| 0.1 | 128.1 | First Host |
| 127.254 | 255.254 | Last Host |
| 127.255 | 255.255 | Broadcast |
Class B subnetting - /18
- Network address
- 172.16.0.0
- Subnet mask
- 255.255.192.0 - /18
- Subnets?
- 22 = 4 subnets
- Hosts?
- 214 -2 = 16,382
- Valid subnets?
- 0, 64, 128, 192
- Broadcast address for each subnet?
- See table
- Valid hosts?
- See table
| 0.0 | 64.0 | 128.0 | 192.0 | Network |
|---|---|---|---|---|
| 0.1 | 64.1 | 128.1 | 192.1 | First Host |
| 63.254 | 127.254 | 192.254 | 255.254 | Last Host |
| 6.255 | 127.255 | 192.255 | 255.255 | Broadcast |
Class B subnetting - /25
This is one of the hardest subnet masks, but it is a good one to use because it creates over 500 subnets with 126 hosts for each subnet.
- Network address
- 172.16.0.0/25
- Subnet mask
- 255.255.255.128
- Subnets?
- 29 = 512
- Hosts?
- 27 - 2 = 126
- Valid subnets?
- See table for the first four and last two
- Broadcast address for each subnet?
- See table
- Valid hosts?
- See table
| 0.0 | 0.128 | 1.0 | 1.128 | ... | 255.0 | 255.128 | Network |
|---|---|---|---|---|---|---|---|
| 0.1 | 0.129 | 1.1 | 1.126 | ... | 255.1 | 255.129 | First Host |
| 0.126 | 0.254 | 1.126 | 1.254 | ... | 255.126 | 255.254 | Last Host |
| 0.127 | 0.255 | 1.127 | 1.255 | ... | 255.127 | 255.255 | Broadcast |
Class B subnetting - /26
Since the third octet has a 255 in the mask section, whatever number is listed in the third octet is a subnet number. However, now that we have a subnet number in the fourth octet, we can subnet this octet just like we did with Class C subnetting. Let's try it out:
- Network address
- 172.16.0.0/26
- Subnet mask
- 255.255.255.192 - /26
- Subnets?
- 210 = 1024 subnets
- Hosts?
- 26 - 2 = 62
- First eight valid subnets?
- See table
- Broadcast address for each subnet?
- See table
- Valid hosts?
- See table
| 0.0 | 64.0 | 128.0 | 192.0 | 1.0 | 1.64 | 1.128 | 1.192 | Network |
|---|---|---|---|---|---|---|---|---|
| 0.1 | 0.65 | 0.129 | 0.193 | 1.1 | 1.65 | 1.129 | 1.193 | First Host |
| 0.62 | 0.126 | 0.190 | 0.254 | 1.62 | 1.26 | 1.191 | 1.254 | Last Host |
| 0.63 | 0.127 | 0.191 | 0.255 | 1.63 | 1.127 | 1.191 | 1.255 | Broadcast |
Quick Questions
- What subnet and broadcast address is the IP address 172.16.10.33 255.255.255.224 a member of?
- Answer: 172.16.10.32 subnet and broadcast 10.63. The block size is 32 and 33 is between 32 and 64. However, remember that the third octect is considered part of the subnet, os the answer would be the 10.32 subnet. The broadcast is 10.63, since 10.64 is the next subnet.
- What subnet and broadcast address is the IP address 172.16.90.66 255.255.255.192 a member of?
- Answer: 172.16.90.64 subnet and broadcast 90.127.
- What subnet and broadcast address is the IP address 172.16.50.97 255.255.255.224 a member of?
- Answer:172.16.50.96 subnet and broadcast 50.127.
- What subnet and broadcast address is the IP address 172.16.10.10 255.255.255.192 a member of?
- Answer: 172.16.10.0 subnet and broadcast 10.63.
- What subnet and broadcast address is the IP address 172.16.10.10 255.255.255.252 a member of?
- Answer: 172.16.10.8 subnet and broadcast 10.11.
- What is the subnet and broadcast address of the host 172.16.88.255/20?
- Answer: What is a /20? If you can't answer this, you can't answer this question, can you? A /20 is 255.255.240.0, which gives us a block size of 16 in the third octet, and since no subnet bits are on in the fourth octet, the answer is always 0 and 255 in the fourth octet. So the subnet is 80.0 and the broadcast address is 95.255.
A few more questions
For these questions, start at 255.255.255.0, which provides 256 subnets, each with 254 hosts. Then move right if you need more subnets, or left if you need more hosts.
- If you had a Class B address of 172.16.0.0, which mask would you use that will provide about 100 hosts with over 300 subnets?
- 255.255.255.128
- The network 172.16.0.0 needs to be divided into subnets where you have over 400 hosts in each subnet. What is your mask?
- 255.255.254.0
- The network 172.16.0.0 needs to be divided into 300 subnets where you have about 50 hosts in each subnet. What two masks can you use?
- 255.255.255.128 or 255.255.255.192.
- 255.255.254.0. Which are valid hosts?
- 113.10.4.0
- 186.54.3.0
- 175.33.3.255
- 26.35.2.255
- 152.135.7.0
- 17.35.36.0
This last one was easy because the block size is 2. Therefore all even addresses must be networks while odd addresses are hosts. The valid hosts are 3.0, 3.255, 2.255, and 7.0.
- You have a router with an IP address of 172.16.112.1/20. What is the maximum amount of hosts allowed on this subnet?
- 4094 hosts maximum as there are 12 host bits. 212 - 2 = 4094.
