SubNets and Subnetting

Why use subnets???

The Internet itself does not see the subnetting thus the subnetting is only know and recognized locally within the overall network. However, locally once subnetted each subnet acts as a different network and communication between subnets requires the same as between networks. Computers on different subnets will not see each other unless means are provided for it.

I will use an example of a Class C network and look at how we may subnet it and what happens. The Network will be 192.168.255.0. The netmask for this network is 255.255.255.0.  I have 8 host bits which gives 254 potential host addresses. Note: the host addresses with all 1s or all 0s are not available.

Clearly a class A network 16777214 host addresses would be rather unwieldy as would probably a class B with 65534 hosts. None would normally use this size of a network, but the easy way of subnetting Class A and Class B networks is to subnet a class A into equivalent class B type networks and then subnet class B networks into equivalent class C types. Note again that even if broken down a Class A network always remains a class A, the subnetting is internal only. 

It is good practice and makes it easier if we assigning bits continuously from left when subnetting. It may not  be a requirement but it is confusing enough as it is thus introducing additional variations is not good.

We can assign any of the bits reserved for hosts to the network address meaning anything from 1 to 6 bits.  This would then give the following set of netmask for the last three decimal digits. Note the first three 255.255.255 is not changed. Note: You could not use 7 bits since that would leave 0 hosts.

Note: For the purist and those who takes MS exams. I have listed all possible subnets without regard to the recommendations listed in the RFC. They will all work in newer setups. However, if you want to follow the recommendation (normally a good idea specially for exams) then you must eliminate the networks with all ones or all zeroes for the subnet (last octet). Thus, in all the examples given, the first and last network listed should not be used. This means that the first 255.255.255.128 is no longer a valid subnet since it has no subnets.

1 bit     Netmask 255.255.255.128

This would provide two networks each with 126 hosts.

subnet 0    Host addresses 192.168.255.1 to 192.168.255.126

subnet 1    Host address 192.168.255.129 to 192,168.255.254

2bits    Netmask 255.255.255.192

This would provide 4 subnets each with 62 host addresses

subnet 0 (00) Host Addresses 192.168.255.1 to 192.168.255.62

subnet 1 (01) Host addresses 192.168.255.65 to 192.168.255.126

subnet 2 (10) Host addresses 192.168.255.129 to 192.168.255.190

subnet 3 (11) Host addresses 192.168.255.193 to 192.168.255.254.

Before proceeding I will try to explain how these are arrived at. We can ignore the first 24 bits in the IP address represented by the decimals 192.168.255 since those are for the baseline network which we are subnetting. If we look at subnet 0 then the last eight bits will always start with 00 which means that the decimal equivalent of their last 8 bits can be from 0 to 63. The all zeros and the all ones for a host address cannot be used which eliminates 0 and also 63 thus we have 62 left from 1 to 62. Looking at subnet 2 the first two bits of the last octet for all host addresses are always 10 thus the available combinations for the last six becomes decimal equivalent of 128-191. Again all 0s and all 1s cannot be used for host address (last six bits) thus the last octet will be 129-190 which provides for 62 host addresses again.

3 bits subnet  Netmask 255.255.255.224

This will provide 8 subnets each with 30 hosts

Subnet    Host Range
0    192.168.255.1 - 192.168.255.30
1    192.168.255.33 - 192.168.255.62
2    192.168.255.65 - 192.168.255.94
3    192.168.255.97 - 192.168.255.126
4    192.168.255.129 - 192.168.255.158
5    192.168.255.161 - 192.168.255.190
6    192.168.255.193 - 192.168.255.222
7    192.168.255.225 - 192.168.255.254

4 bits Subnet Netmask 192.168.255.240

This will provide 16 subnets each with 14 hosts

Subnet    Host Range
0    192.168.255.1 - 192.168.255.14
1    192.168.255.17 - 192.168.255.30
2    192.168.255.33 - 192.168.255.46
3    192.168.255.49 - 192.168.255.62
4    192.168.255.65 - 192.168.255.78
5    192.168.255.81 - 192.168.255.94
6    192.168.255.97 - 192.168.255.110
7    192.168.255.113 - 192.168.255.126
8    192.168.255.129 - 192.168.255.142
9    192.168.255.145 - 192.168.255.158
10    192.168.255.161 - 192.168.255.174
11    192.168.255.177 - 192.168.255.190
12    192.168.255.193 - 192.168.255.206
13    192.168.255.209 - 192.168.255.222
14    192.168.255.225 - 192.168.255.238
15    192.168.255.241 - 192.168.255.254

5 bits subnet Netmask 192.168.255.248

This will provide 32 subnets each with 6 host addresses

Subnet    Host Range
0    192.168.255.1 - 192.168.255.6
1    192.168.255.9 - 192.168.255.14
2    192.168.255.17 - 192.168.255.22
3    192.168.255.25 - 192.168.255.30
4    192.168.255.33 - 192.168.255.38
5    192.168.255.41 - 192.168.255.46
6    192.168.255.49 - 192.168.255.54
7    192.168.255.57 - 192.168.255.62
8    192.168.255.65 - 192.168.255.70
9    192.168.255.73 - 192.168.255.78
10    192.168.255.81 - 192.168.255.86
11    192.168.255.89 - 192.168.255.94
12    192.168.255.97 - 192.168.255.102
13    192.168.255.105 - 192.168.255.110
14    192.168.255.113 - 192.168.255.118
15    192.168.255.121 - 192.168.255.126
16    192.168.255.129 - 192.168.255.134
17    192.168.255.137 - 192.168.255.142
18    192.168.255.145 - 192.168.255.150
19    192.168.255.153 - 192.168.255.158
20    192.168.255.161 - 192.168.255.166
21    192.168.255.169 - 192.168.255.174
22    192.168.255.177 - 192.168.255.182
23    192.168.255.185 - 192.168.255.190
24    192.168.255.193 - 192.168.255.198
25    192.168.255.201 - 192.168.255.206
26    192.168.255.209 - 192.168.255.214
27    192.168.255.217 - 192.168.255.222
28    192.168.255.225 - 192.168.255.230
29    192.168.255.233 - 192.168.255.238
30    192.168.255.241 - 192.168.255.246
31    192.168.255.249 - 192.168.255.254

6 bit subnet Netmask 192.168.255.252

This will provide 64 networks each with 2 host addresses. Not listing these since it really becomes somewhat useless to only have two host addresses

 

Copyrighted All rights reserved
Last revised: June 07, 1999