To understand classless subnetting see the following classless subnetting examples. The private network address 192.168.10.0/24, In figure 1; the first three octets are displayed in decimal, while the last octet is displayed in binary. This is because we will be borrowing bits from this octet to create more sub-network.
The subnet mask is 255.255.255.0 as indicated by the /24 prefix length. Its mean that 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.10.0/24 ), the network would need subnetting. Following is some questions/ problem for subnetting the same IP network.
Example 1 – Required 2 sub-network from the 192.168.10.0/24 network.
- 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:
Total Host Addresses – 2h =xx
Putting the values – 28 =256
So Total Addresses – 256 (From 192.168.10.0 – 192.168.10.255 )
Total usable IP Addresses – 2h – 2 =xx
Putting the values – 28 -2 =254
The first and last IP addresses of the network cannot be used for the host so total usable IP addresses are 254.
The Firs IP address 192.168.10.0 is network Id, and the last IP address 192.168.10.255 is broadcast address
Now we required 2 sub-network and we have required getting all 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-network.
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, its mean that we should borrow 1 bit from host portion as shown in the figure 2. 1 bit is borrowed from the most significant bit (leftmost bit) in the host portion; therefore extending the network portion to 25 bits or /25. This enables the creation of two subnets. We also know that bits in the network portion must be 1’s in the subnet mask as shown in figure 2.
Figure 3 displays the two subnets 192.168.10.0/25 and 192.168.10.128/25. The two subnets are resulting from varying the value of the bit borrowed to either 0 or 1. Because the bit borrowed is the 128 bit, the decimal value of the fourth octet for the 2nd subnet is 128.
Figure 4 and Figure 5 displays the sub-network with the resulting 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.
Figure 6 displays the important addresses of the first subnet; 192.168.10.0/25 and Figure 7 display the important addresses of the subnet, 192.168.10.128/25. Notice how the
- Network addresses are 168.10.0/25 and 192.168.10.128/25 both contains all 0 bits in the host portions
- First host addresses of both networks are 168.10.1 and 192.168.10.129, both contain all 0 bits plus a right-most 1 bit in the host portion.
- The last host addresses of both networks are 168.10.126 and 192.168.10.254, both contain all 1 bits plus a right-most 0 bit in the host portion.
- Broadcast addresses of both networks are 168.1.127 and 192.168.10.255 contains all 1 bits in the host portion.
Example 2 – Required 4 sub-network from the 192.168.10.0/24 network.
Now we required 3 sub-networks from the same private network address 192.168.10.0/24. Borrowing a single bit only provided 2 subnets so; another host bit must be borrowed as shown in Figure 8. Using the 2n formula for two borrowed bits results in (22 = 4) subnets. Figure 9 display details of the four subnets. All four subnet mask used /26 or 255.255.255.192. Figure 9 also shows a subnet mask.
To determine the number of hosts, look at the last octet as shown in Figure 9. After borrowing 2 bits for 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. Figure 10 display the significant addresses of each subnet.