Let’s look at a VLSM IP address assignment example involving the Class B network 130.20.0.0/16. Using a /20 mask produces 16 subnetworks, as shown in Table 1-19. With the /20 subnet mask, the first 4 bits of the third byte determine the subnets.

Table 1-19 Subnets with the /20 Mask

Third ByteSubnetwork
00000000130.20.0.0/20
00010000130.20.16.0/20
00100000130.20.32.0/20
00110000130.20.48.0/20
01000000130.20.64.0/20
01010000130.20.80.0/20
01100000130.20.96.0/20
01110000130.20.112.0/20
10000000130.20.128.0/20
10010000130.20.144.0/20
10100000130.20.160.0/20
10110000130.20.176.0/20
11000000130.20.192.0/20
11010000130.20.208.0/20
11100000130.20.224.0/20
11110000130.20.240.0/20

With fixed-length subnet masks, the network supports only 16 networks. Any LAN or WAN link has to use a /20 subnet. In this scenario, if the sites involved vary in size, this “one network size fits all” solution might be a waste of address space and therefore be inefficient. With VLSM, you can further subnet the /20 subnets.

For example, say that you want to subdivide 130.20.64.0/20 to support LANs with about 500 hosts. A /23 mask has 9 bits for hosts, producing 29 − 2 = 510 IP addresses for hosts. Table 1-20 shows the subnetworks for LANs within a specified subnet.

Table 1-20 Subnetworks for 130.20.64.0/20

Third ByteSubnetwork
01000000130.20.64.0/23
01000010130.20.66.0/23
01000100130.20.68.0/23
01000110130.20.70.0/23
01001000130.20.72.0/23
01001010130.20.74.0/23
01001100130.20.76.0/23
01001110130.20.78.0/23

With VLSM, you can further subdivide these subnetworks of subnetworks. Say that you want to use subnetwork 130.20.76.0/23 for two LANs that have fewer than 250 hosts. This subdivision produces subnetworks 130.20.76.0/24 and 130.20.77.0/24. You can also subdivide 130.20.78.0/23 for serial links. Because each point-to-point serial link needs only two IP addresses, you can use a /30 mask. Table 1-21 shows the subnetworks produced.

 

Table 1-21 Serial-Link Subnetworks

Third ByteFourth ByteSubnetwork
0100111000000000130.20.78.0/30
0100111000000100130.20.78.4/30
0100111000001000130.20.78.8/30
0100111000001100130.20.78.12/30
0100111111110100130.20.79.244/30
0100111111111000130.20.79.248/30
0100111111111100130.20.79.252/30

Each /30 subnetwork includes the subnetwork number, two IP addresses, and a broadcast address. Table 1-22 shows the bits for 130.20.78.8/30.

Table 1-22 Addresses Within Subnetwork 110.20.78.8/30

Binary AddressIP AddressFunction
10000010 00010100 01001110 00001000130.20.78.8Subnetwork
10000010 00010100 01001110 00001001130.20.78.9IP address 1
10000010 00010100 01001110 00001010130.20.78.10IP address 2
10000010 00010100 01001110 00001011130.20.78.11Broadcast address
Loopback Addresses

You can reserve a subnet for router loopback addresses. There are several reasons to use loopback addresses:

  • A loopback address provides an always-up interface to use for router-management connectivity.
  • A loopback address can serve as the router ID for some routing protocols.
  • A loopback address is reachable even if a single interface goes down on a device that has multiple interfaces.
  • They are used for IP telephony (for example, in the configuration of dial peers).
  • A loopback address is used as the source IP address for network management and monitoring.

The loopback address is a single IP address with a 32-bit mask. In the previous example, network 130.20.75.0/24 could provide 256 loopback addresses for network devices, starting with 130.20.75.0/32 and ending with 130.20.75.255/32.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *