VLSM (Variable Length Subnet Mask) lets you use masks of different sizes according to what each segment really needs. That way you stop wasting addresses, especially on point-to-point links.
The principle
- Sort the requirements from largest to smallest.
- Allocate the first subnet to the biggest segment.
- Carry on with longer masks for the smaller segments.
- Use a /30 for links between two routers (2 hosts).
Block : 192.168.10.0 /24
LAN A (100 hosts) : 192.168.10.0 /25 (126 hosts)
LAN B (50 hosts) : 192.168.10.128 /26 (62 hosts)
LAN C (20 hosts) : 192.168.10.192 /27 (30 hosts)
Link R1-R2 : 192.168.10.224 /30 (2 hosts)
Starting with the largest requirement guarantees that every block stays aligned and free of overlap. WAN links on a /30 use only 4 addresses (2 of them usable), which is as efficient as it gets. VLSM becomes unavoidable as soon as a network grows.
Key point: VLSM matches the mask to the need; always allocate from the largest segment down to the smallest, /30 for links. See Lab 12 – Designing a VLSM plan.