Subnetting a Class C Network Using Binary
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?
You cannot use N bits, only H bits. Therefore, ignore 192.168.100. These numbers cannot change.
Step 1 Determine how many H bits you need to borrow to create nine valid subnets. 2n- 2 > 9
|
Start with 8 H bits |
HHHHHHHH |
|
Borrow 4 bits |
NNNNHHHH |
|
0001HHHH |
Cannot use subnet 0000 because it is invalid. Therefore, you must start with the bit pattern of 0001 |
|
00010000 |
All 0s in host portion = subnetwork number |
|
00010001 |
First valid host number |
|
00011110 |
Last valid host number |
|
00011111 |
All 1s in host portion = broadcast number |
|
Step 3 Convert binary to decimal. |
|
|
00010000= 16 |
Subnetwork number |
|
00010001= 17 |
First valid host number |
|
00011110=30 |
Last valid host number |
|
00011111=31 |
All 1s in host portion = broadcast number |
|
Step 4 Determine the second valid subnet in binary. |
|
|
0010HHHH |
0010 = 2 in binary = second valid subnet |
|
00100000 |
All 0s in host portion = subnetwork number |
|
00100001 |
First valid host number |
|
00101110 |
Last valid host number |
|
00101111 |
All 1s in host portion = broadcast number |
|
00100000 = 32 |
Subnetwork number |
|
00100001 = 33 |
First valid host number |
|
00101110=46 |
Last valid host number |
|
00101111=47 |
All 1s in host portion = broadcast number |
|
Valid Subnet |
Network Number |
Range of Valid Hosts |
Broadcast Number |
|
1 |
16 |
17-30 |
31 |
|
2 |
32 |
33-46 |
47 |
|
3 |
48 |
49-62 |
63 |
Notice a pattern? Counting by 16. Step 7 Verify the pattern in binary. (The third valid subnet in binary is used here.)
|
0011HHHH |
Third valid subnet |
|
00110000=48 |
Subnetwork number |
|
00110001=49 |
First valid host number |
|
00111110=62 |
Last valid host number |
|
00111111=63 |
Broadcast number |
|
Subnet |
Network Address (0000) |
Range of Valid Hosts (0001-1110) |
Broadcast Address (1111) |
|
0(0000) invalid |
192.168.100.0 |
192.168.100.1192.168.100.14 |
192.168.100.15 |
|
1(0001) |
192.168.100.16 |
192.168.100.17192.168.100.30 |
192.168.100.31 |
|
2(0010) |
192.168.100.32 |
192.168.100.33192.168.100.46 |
192.168.100.47 |
|
3(0011) |
192.168.100.48 |
192.168.100.49192.168.100.62 |
192.168.100.63 |
|
4(0100) |
192.168.100.64 |
192.168.100.65192.168.100.78 |
192.168.100.79 |
|
5(0101) |
192.168.100.80 |
192.168.100.81192.168.100.94 |
192.168.100.95 |
|
6(0110) |
192.168.100.96 |
192.168.100.97192.168.100.110 |
192.168.100.111 |
|
7(0111) |
192.168.100.112 |
192.168.100.113192.168.100.126 |
192.168.100. 127 |
|
8(1000) |
192.168.100.128 |
192.168.100.129192.168.100.142 |
192.168.100. 143 |
|
9(1001) |
192.168.100.144 |
192.168.100.145192.168.100.158 |
192.168.100.159 |
|
10 (1010) |
192.168.100.160 |
192.168.100.161192.168.100.174 |
192.168.100.175 |
|
11 (1011) |
192.168.100.176 |
192.168.100.177192.168.100.190 |
192.168.100.191 |
|
12 (1100) |
192.168.100.192 |
192.168.100.193192.168.100.206 |
192.168.100. 207 |
|
13 (1101) |
192.168.100.208 |
192.168.100.209192.168.100.222 |
192.168.100. 223 |
|
14 (1110) |
192.168.100.224 |
192.168.100.225192.168.100.238 |
192.168.100. 239 |
|
15 (1111) invalid |
192.168.100.240 |
192.168.100.241192.168.100.254 |
192.168.100. 255 |
|
Quick Check |
Always an even number |
First valid host is always an odd # Last valid host is always an even # |
Always an odd number |
Use any nine subnets—the rest are for future growth.
Use any nine subnets—the rest are for future growth.
Step 9 Calculate the subnet mask.
The default subnet mask for a Class C network is as follows:
|
Decimal |
Binary |
|
255.255.255.0 |
11111111.11111111.11111111.00000000 |
1 = Network or subnetwork bit 0 = Host bit
You borrowed 4 bits; therefore, the new subnet mask is the following:
11111111.11111111.11111111.11110000
255.255.255.240
NOTE: You subnet a Class B or a Class A network with exactly the same steps as for a Class C network; the only difference is that you start with more H bits.
Continue reading here: Subnetting a Class B Network Using Binary
Was this article helpful?