You have an address of 172.16.0.0 /16
. 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?
You cannot use N
bits, only H
bits. Therefore, ignore 172.16.
These numbers cannot change.
Step 1. Determine how many H bits you need to borrow to create nine valid subnets.
2N ≥ 9
N
= 4, so you need to borrow 4 H
bits and turn them into N
bits.
Start with 16 H bits | HHHHHHHHHHHHHHHH (Remove the decimal point for now) |
Borrow 4 bits | NNNNHHHHHHHHHHHH |
Step 2. Determine the first valid subnet in binary (without using decimal points).
0000HHHHHHHHHHHH | |
0000000000000000 | Subnet number |
0000000000000001 | First valid host |
… | |
0000111111111110 | Last valid host |
0000111111111111 | Broadcast number |
Step 3. Convert binary to decimal (replacing the decimal point in the binary numbers).
00000000.00000000 = 0.0 | Subnetwork number |
00000000.00000001 = 0.1 | First valid host number |
… | |
00001111.11111110 = 15.254 | Last valid host number |
00001111.11111111 = 15.255 | Broadcast number |
Step 4. Determine the second subnet in binary (without using decimal points).
0001HHHHHHHHHHHH | |
0001000000000000 | Subnet number |
0001000000000001 | First valid host |
… | |
0001111111111110 | Last valid host |
0001111111111111 | Broadcast number |
Step 5. Convert binary to decimal (returning the decimal point in the binary numbers).
00010000.00000000 = 16.0 | Subnetwork number |
00010000.00000001 = 16.1 | First valid host number |
… | |
00011111.11111110 = 31.254 | Last valid host number |
00011111.11111111 = 31.255 | Broadcast number |
Step 6. Create an IP plan table.
Subnet | Network Number | Range of Valid Hosts | Broadcast Number |
1 | 0.0 | 0.1–15.254 | 15.255 |
2 | 16.0 | 16.1–31.254 | 31.255 |
3 | 32.0 | 32.1–47.254 | 47.255 |
Notice a pattern? Counting by 16.
Step 7. Verify the pattern in binary. (The third subnet in binary is used here.)
0010HHHHHHHHHHHH | Third valid subnet |
00100000.00000000 = 32.0 | Subnetwork number |
00100000.00000001 = 32.1 | First valid host number |
… | |
00101111.11111110 = 47.254 | Last valid host number |
00101111.11111111 = 47.255 | Broadcast number |
Step 8. Finish the IP plan table.
Subnet | Network Address (0000) | Range of Valid Hosts (0001–1110) | Broadcast Address (1111) |
1 (0000) | 172.16.0.0 | 172.16.0.1–172.16.15.254 | 172.16.15.255 |
2 (0001) | 172.16.16.0 | 172.16.16.1–172.16.31.254 | 172.16.31.255 |
3 (0010) | 172.16.32.0 | 172.16.32.1–172.16.47.254 | 172.16.47.255 |
4 (0011) | 172.16.48.0 | 172.16.48.1–172.16.63.254 | 172.16.63.255 |
5 (0100) | 172.16.64.0 | 172.16.64.1–172.16.79.254 | 172.16.79.255 |
6 (0101) | 172.16.80.0 | 172.16.80.1–172.16.95.254 | 172.16.95.255 |
7 (0110) | 172.16.96.0 | 172.16.96.1–172.16.111.254 | 172.16.111.255 |
8 (0111) | 172.16.112.0 | 172.16.112.1–172.16.127.254 | 172.16.127.255 |
9 (1000) | 172.16.128.0 | 172.16.128.1–172.16.143.254 | 172.16.143.255 |
10 (1001) | 172.16.144.0 | 172.16.144.1–172.16.159.254 | 172.16.159.255 |
11 (1010) | 172.16.160.0 | 172.16.160.1–172.16.175.254 | 172.16.175.255 |
12 (1011) | 172.16.176.0 | 172.16.176.1–172.16.191.254 | 172.16.191.255 |
13 (1100) | 172.16.192.0 | 172.16.192.1–172.16.207.254 | 172.16.207.255 |
14 (1101) | 172.16.208.0 | 172.16.208.1–172.16.223.254 | 172.16.223.255 |
15 (1110) | 172.16.224.0 | 172.16.224.1–172.16.239.254 | 172.16.239.255 |
16 (1111) | 172.16.240.0 | 172.16.240.1–172.16.255.254 | 172.16.255.255 |
Quick Check | Always in form even #.0 | First valid host is always even #.1 Last valid host is always odd #.254 | Always odd #.255 |
Use any nine subnets—the rest are for future growth.
Step 9. Calculate the subnet mask. The default subnet mask for a Class B network is as follows:
Decimal | Binary |
255.255.0.0 | 11111111.11111111.00000000.00000000 |
1 = Network or subnetwork bit
0 = Host bit
You borrowed 4 bits; therefore, the new subnet mask is the following:
11111111.11111111.11110000.00000000 | 255.255.240.0 |
Read more: How to a Class C Network Subnetting Using Binary