Classless Subnetting Examples

To understand classless subnetting see the following classless subnetting examples. The private network address, 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 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 ( ), the network would need subnetting. Following is some questions/ problem for subnetting the same IP network.

Example 1 – Required 2 sub-network from the network.

  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:


h= 8

Total Host Addresses –  2h =xx

Putting the values –  28 =256

So Total Addresses – 256   (From  – )

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 is network Id, and the last IP address 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.

classless subnetting examples

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.

classless subnetting examples

Figure 3 displays the two subnets and 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.

classless subnetting examples

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 or /25 because it has one borrowed bit. 

classless subnetting examples

classless subnetting examples

Figure 6 displays the important addresses of the first subnet; and Figure 7 display the important addresses of the subnet, Notice how the

  • Network addresses are 168.10.0/25 and both contains all 0 bits in the host portions
  • First host addresses of both networks are 168.10.1 and, 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, 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 contains all 1 bits in the host portion.

classless subnetting examples

classless subnetting examples


Example 2 – Required 4 sub-network from the network.

Now we required 3 sub-networks from the same private network address 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 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.

Please follow and like us: