Variable-Length Subnet Masks (VLSM)

A variable-length subnet mask (VLSM) is designed to allow more efficient use of IP address space by borrowing bits from the subnet mask and allocating them to host devices. To allow a greater number of devices to connect to the Internet and intranets, the standards body of various routing protocols designed an IP routing algorithm to cater to IP networks with a different subnet mask than the default used in classful networks.

To demonstrate the use of VLSM, consider the example of connecting two Cisco routers through a wide-area link. Only two devices host systems are needed.

To use any IP address space effectively, it would be wise to use the lowest possible number of subnet bits and lowest possible number of host bits. You could use a Class C mask or a mask that allows for 254 hosts. For a link that never uses more than two hosts, this wastes a vast amount of space, 252 addresses in fact.

Apply the formula to determine the best subnet to use to cater to two hosts on any given subnet and class of address. Remember that you must subtract two host addresses for the subnet address and broadcast address.

Applying the formula, you get 2n - 2 = 2, or 2n = 4, or n = 2 borrowed bits. You need to borrow only two bits from the subnet mask to allow for two host addresses. The subnet mask is 30 bits in length or in binary, which is represented as 11111111.11111111.11111111.111111100. The last two bits (00) are available for host addresses; the subnet is 00; the first host address is 01, the second is 10, and the broadcast address is 11.

+ Share This