Classless Subnetting Examples – Exclusive Details
In the previous article, we have discussed the examples of classful subnetting which is too simple. we have borrowed host bits from the standard/8, /16, and /24 network prefixes. However, we can borrow bits from any host bit position using classless subnetting 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 can assign network addresses to a smaller number of end devices using classless subnetting with the longest prefix and a smaller network. The figure below illustrates the /24 network further into smaller networks.
- 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, host, and borrowed bits in the subnet mask. Capital N shows network bits, Capital H shows host bits, and small n shows borrowed bits.
- The fourth column illustrates the number of usable hosts per subnetted network.
- The last column illustrates the number of available sub-networks 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 will get the borrowed bit from the fourth octet to create more sub-networks.
The subnet mask indicates that the prefix length is 24 bits. The first three octets are the network portion, and the last is the host portion, as shown in the figure above. With /24 prefixes (without subnetting), this network provides 254 usable host addresses supporting a single LAN.
The network would need subnetting if we required an additional LAN from the same IP network (192.168.200.0/24 ). The following are some questions/problems related to subnetting the same IP network.
The administrator required two sub-networks from network 192.168.200.0/24 network. So, first of all, we must have the answers to the following questions.
- Total IP addresses with /24 prefix?
- What are the total usable IP addresses with /24 prefixes?
- What is the Network Address?
- What is the Broadcast Address?
So, first of all, we will explain the above questions. We know that there are a 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:
So we have required 2 sub-networks from the above network and all the above answers 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.
The first question is how many bits we should be borrowing for two networks; the formula for the network is “2n = number of networks.”
If we put 21 = 2, 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, extending the network portion to 25 bits or /25. The borrowed bit must be converted from 0 to 1 because the network bits are always 1’s, and the host bits are always 0’s.
The figures in borrowed bits should be different for each subnet. The two subnets result from varying the value of the borrowed bit, either 0 or 1. The figure below illustrates both sub-networks.
The octet in Net 0 is 00000000, and in Net one 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 display the dotted-decimal representation of both subnet addresses and their ordinary subnet mask. The subnet mask for each subnet is 255.255.255.128 or /25 because it has one borrowed bit.
The figure below displays the necessary addresses for subnets 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.
- Both networks’ first usable host addresses are 192.168.200.1 and 192.168.200.129; both contain all 0 bits, plus the 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, containing all 1s in the host portion of the IP address.
Example 2 – Required 4 sub-networks from the same Network 192.168.200.0/24.
Now we require 3 sub-networks from the same private network address 192.168.200.0/24. The first question raised is as:
How many bits are required to borrow from the host portion to the network portion for 4 sub-networks. ?
Borrowing a single bit provides 2 subnets, so borrow another host bit. Borrowing 2 bits results in (22 = 4) subnets. So, we should borrow 2 bits from the host to the network portion, as shown in the figure below. The subnet mask or network prefix of the subnetted network is changed to /26 or 255.255.255.192.
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 XX = 00, Subnet-1 the value for XX=01, Subnet-2 the value of XX=10, and Subnet-3 the value of XX=11.
We can determine the number of hosts per network by looking at the last octet in the figure above. After borrowing 2 bits from the subnet from the fourth octet, 6 host bits remain. Apply the host calculation formula (2h-2= Usable host) to reveal that each subnet can support usable 62 host addresses. The figure below displays the significant addresses of each subnet.