I want to subnet the class C network 192.168.1.0 into 6 subnets. Following the rules, this is a class C network and the classful subnet mask is 255.255.255.0. These are written in binary below:
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
255 255 255 0
The orange represents the subnet mask for the classful network. The green represents the network address in binary. The red represents the hosts address. Notice the host address is all 0’s so this represents the network address.
Now determine the number of bits required to solve the assignment- Subnet into 6 separate subnets. Using the formula 2n-2> = 6, the solution is 3. 23-2 = 6 (or 23 >= 6+2). Therefore 3 bits need to be added to the subnet mask. The new sequence is written below. Orange represents the classful subnet as before, green the network portion of the address, and red the host’s portion. Blue represents the portion of the subnet mask borrowed to create subnets. Yellow represents the actual subnet address. Orange and blue together represent the new subnet mask of 255.255.255.224.
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
Five bits remain for host addresses. If you use the formula 2n-2 where n is the number of binary bits (host bits is 5), the number of hosts on each subnet is 30 (32-2). The first network listed is not useable because the subnet address (in yellow) is all 0’s (the zero network)
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
The first useable subnet is shown above. Note that 1 is added to the previous subnet address. The subnet address is 192.168.1.32 in decimal. The remaining subnets are shown below:
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
Next useable is 192.168.1.64
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
192.169.1.96
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
192.168.1.128
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
192.168.1.160
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
192.168.1.192
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | . | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | . | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | . | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
192.168.1.224 Note this subnet is not useable since the subnet address is all 1’s
Notes: The subnet mask and the last subnet (not useable) are the same number.
256 – Subnet Mask is the first useable subnet address (256 – 224 = 32).