Classless Subnetting Examples

To understand subnetting at a classless level 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 to be subnetted. Following is some questions/ problem for subnetting for the same IP network.

Example 1 – Required 2 sub-network from the 192.168.10.0/24 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

Sponsors

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 host portion and we know that:

 


h= 8


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 are 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 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 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.

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 the both subnet addresses and their common subnet mask. Because one bit has been borrowed, the subnet mask for each subnet is 255.255.255.128 or /25.

classless subnetting examples

classless subnetting examples

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.

classless subnetting examples

classless subnetting examples

 

Example 2 – Required 4 sub-network from the 192.168.10.0/24 network.

Now we are 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. The details of the four subnets are shown in Figure 9. The resulting subnet mask of /26 or 255.255.255.192 is used by all four subnets. The subnet mask is also shown in Figure 9.

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. The significant addresses of each subnet are displayed in Figure 10.