Classless Subnetting Examples

In the previous article, we have discussed the examples of classful subnetting which is too simple. we have borrowed host bits from the common /8, /16, and /24 network prefixes. However, using classless subnetting we can borrow bits from any host bit position to create other masks. For example here, a /24 network commonly subnetted by longer prefix lengths by borrowing bits from the fourth octet. The administrator is able to assign network addresses to a smaller number of end devices using classless subnetting with the longest prefix and smaller network. The figure below illustrates the /24 network further into smaller networks.

Classless Subnetting Examples 9

  • The first columns illustrate the prefix length of each subnet after borrowing bits from the fourth octet
  • The second columns illustrate the subnet mask for each subnetted network.
  • The third columns illustrate all the network bits, host bits and borrowed bits in the subnet mask. Capital N is showing network bits, Capital H is showing host bits while small n is showing borrowed bits.
  • The fourth column illustrates the number of usable host per subnetted network.
  • The last column illustrates the number of available sub-network after borrowing bits.

Classless Subnetting Example

The figure below illustrates the private network with /24 prefix. The network is 192.168.200.0.  The first three octets are displayed in decimal, while the last octet is displayed in binary because we are going to get the borrowed bit from the fourth octet to create more sub-networks.

Classless Subnetting Examples 10

The subnet mask indicates that the prefix length is 24 bits. The first three octets are the network portion and the last octet is the host portion as shown in the above figure. With /24 prefixes (without subnetting) this network provide 254 usable host addresses supporting a single LAN. If we required an additional LAN from the same IP network (192.168.200.0/24 ), the network would need subnetting. Following is some questions/ problem for subnetting the same IP network.

The administrator required 2 sub-network from network 192.168.200.0/24 network. So, first of all, we required to have the answers to the following questions.
  1. Total IP addresses with /24 prefix?
  2. Total usable IP addresses with /24 prefix?
  3. What is the Network Address?
  4. What is the Broadcast Address?

So, first of all, we are going to explain the above questions. We know that there are total 32 bits in IP address /24 means that 24 bits are parts of the network portion and the remaining 32-24 = 8 bits are the parts of the host portion and we know that:

subnetting

So we have required 2 sub-networks from the above network and we have required all the above answer for both sub-networks. Remember that the fourth octet is displayed in binary because we will be borrowing bits from this octet to create more sub-networks.

Classless Subnetting Examples 11

The first question is that how much bits we should be borrowing for 2 networks, the formula for the network is “2n = number of network”

So if we put 21 = 2, it’s mean that we should borrow 1 bit from the host portion as shown in the figure below. 1 bit is borrowed from the most significant bit (leftmost bit) in the host portion, So it extends the network portion to 25 bits or /25. The borrowed bit must be converted from 0 to 1 because the network bits ever 1’s and the host bits ever 0’s.

Classless Subnetting Examples 12

The figures in borrowed bits should be different for each subnet. The two subnets are resulting from varying the value of the borrowed bit either 0 or 1. The figure below illustrates both sub-networks.

Classless Subnetting Examples 13

For the octet in Net 0 is 00000000 and in Net 1 is 10000000. If we convert the fourth octet back to decimal we can see the resultant subnets that are 192.168.200.0/25 and 192.168.200.128/25.

The figure below illustrates both subnets with the resultant subnet mask. Notice how it uses a 1 in the borrowed bit position to indicate that this bit is now part of the network portion. The Figures also displays the dotted-decimal representation of both subnet addresses and their common subnet mask. The subnet mask for each subnet is 255.255.255.128 or /25 because it has one borrowed bit.

Classless Subnetting Examples 14

The figure below displays the important addresses for both subnet 192.168.200.0/25 and 192.168.200.128/25.

  • Network addresses are 192.168.200.0/25 and 192.168.200.128/25 and both contain all 0 bits in the host portions
  • First usable host addresses of both networks are 192.168.200.1 and 192.168.200.129, both contain all 0 bits plus a right-most bit in the host portion is 1.
  • The last usable host addresses of both networks are 192.168.200.126 and 192.168.200.254, both contain all 1 bits in the host portion except the right-most and last bit in the host portion which is 0.
  • Broadcast addresses of both networks are 192.168.200.127 and 192.168.200.255 contains all 1s in the host portion of IP address.

Example 2 – Required 4 sub-networks from the same Network 192.168.200.0/24.

Now we required 3 sub-networks from the same private network address 192.168.200.0/24. The first question raised as:

How many bits required to borrow from host portion to network portion for 4 sub-networks. ?

Borrowing a single bit provides 2 subnets so, go further for borrowing another host bit. For borrowing 2 bits result in (22 = 4) subnets. So, we should borrow 2 bits from the host portion to network portion as shown in the figure below. The resultant subnet mask or network prefix of the subnetted network is changed to /26 or 255.255.255.192.

Classless Subnetting Examples 15

The value XX illustrates that the bit should be changed for each network. We have borrowed 2 bits from the host portion. So, in the first network  or Subnet-0 the value for the XX = 00, Subnet-1 the value for XX=01, Subnet-2 value of XX=10, and Subnet-3 value of XX= 11.

We can determine the number of hosts per network; look at the last octet in the figure above. After borrowing 2 bits from the subnet from the fourth octet, there are 6 host bits remaining. Apply the host calculation formula (2h-2= Usable host) as shown to reveal that each subnet can support usable 62 host addresses. The figure below display the significant addresses of each subnet.

Classless Subnetting Examples 16