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.
- 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.
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.
- Total IP addresses with /24 prefix?
- Total usable IP addresses with /24 prefix?
- What is the Network Address?
- 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:
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.
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.
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.
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.
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.
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.
Classful and Classless addressing both terms refer to a viewpoint on the structure of a subnetted IP address. Classless addressing has two-parts wiev, and classful addressing has a three-part view. With classful addressing, the address always has an /8, /16, or /24 bit network prefix, based on the Class A, B, and C addressing rules. […]
Collision Domain The “collision domain” describes a network where packet collisions can occur when two devices on a shared network medium send packets simultaneously. The colliding packets discarded and must be sent again, which reduces network speed and efficiency. Usually, collisions occur in a hub environment, because each port on a hub is in the […]
Subnetting allows a network administrator to create a smaller network known as sub-networks or subnets inside a large network by borrowing bits from the Host ID portion of the address. We can also create additional networks using those borrowed bits. It implements and manages an effective IP addressing plan by partitioning a single physical network […]
Ping and trace are a utility for testing the network connectivity and availability of the device. Both are using ICMPv4 and ICMPv6 echo request and echo reply for testing. In this article, we will briefly discuss both ping and trace. Ping It is the abbreviation of Packet InterNet Groper. We can send both IPv4 and […]
After the client receives SLAAC or SLAAC with stateless Router Advertisement (RA) message, the client required to generate its own Interface ID. The client gets the prefix portion of the IPv6 address from the Router Advertisement (RA) message; however, RA message did not hold the information about the interface ID for the client. So, the […]
I have already written about IPv6 multicast addresses in my previous article that IPv6 multicast addresses work similarly to IPv4 multicast addresses. The IPv6 enabled devices can join and listen for multicast traffic on an IPv6 multicast address. The multicast address is composed of an 8-bit address, 4-bit flag, 4-bit scope, and 112-bit group ID […]