Skip to main content

VLSM preventing IP address loss

Short answer

VLSM divides a network into subnets of different sizes, giving each subnet only the block it needs. For 192.168.10.0/24 with LANs needing 100, 50, 25 hosts and two /30 WAN links, it uses /25, /26, /27, /30, /30, using 232 of 256 addresses and leaving 24 free.

Explain how Variable Length Subnet Mask (VLSM) technology prevents the loss of IP address. Illustrate your answer with appropriate figures and assume the IP address by yourself.

Concept

Variable Length Subnet Mask (VLSM) lets one network address be divided into subnets of different sizes by using a different mask on each subnet. In fixed-length subnetting (FLSM) every subnet has the same size, so small subnets (like a router-to-router link needing 2 addresses) waste a whole large block. VLSM gives each subnet only the block it needs, so unused addresses stay available.

Example (assumed)

Organisation has 192.168.10.0/24 (256 addresses). Requirements:

  • LAN A: 100 hosts
  • LAN B: 50 hosts
  • LAN C: 25 hosts
  • WAN link 1 (R1-R2): 2 hosts
  • WAN link 2 (R2-R3): 2 hosts

With FLSM: the largest LAN needs 100 hosts, so every subnet must be /25 (126 hosts). Five subnets of 128 addresses need 640 addresses, which is more than the /24 holds. Each WAN link wastes 126 of 128 addresses.

With VLSM (allocate largest first):

SubnetHosts neededMaskNetworkUsable rangeBroadcast
LAN A100/25 (255.255.255.128)192.168.10.0.1 - .126.127
LAN B50/26 (255.255.255.192)192.168.10.128.129 - .190.191
LAN C25/27 (255.255.255.224)192.168.10.192.193 - .222.223
WAN 12/30 (255.255.255.252)192.168.10.224.225 - .226.227
WAN 22/30 (255.255.255.252)192.168.10.228.229 - .230.231
Free192.168.10.232/29 and 240/28

Working: 2^7 - 2 = 126 >= 100 (so 7 host bits, /25); 2^6 - 2 = 62 >= 50 (/26); 2^5 - 2 = 30 >= 25 (/27); 2^2 - 2 = 2 (/30).

        LAN A             LAN B            LAN C
   192.168.10.0/25   .128/26          .192/27
        |                |                |
      [R1]---.224/30---[R2]---.228/30---[R3]

How VLSM prevents loss of addresses

  • Used addresses: 128 + 64 + 32 + 4 + 4 = 232 out of 256; the remaining 24 (192.168.10.232 to .255) are free for future subnets.
  • With FLSM the WAN links alone would waste 2 x 126 = 252 addresses; with VLSM each /30 wastes only 2 addresses (network and broadcast).
  • Addresses saved can be reused, which delays the need for another network block.
  • VLSM also supports route summarisation and hierarchical design, but needs a classless routing protocol (RIPv2, OSPF, EIGRP, BGP) because the mask is carried in routing updates.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Internet and Intranet chapter 2 questions →