---
title: "VLSM preventing IP address loss"
subject: "Internet and Intranet"
chapter: 2
key: "semester_8/internet_and_intranet:vlsm-prevents-ip-loss"
source: https://www.bctengineer.com/q/semester_8/internet_and_intranet/vlsm-prevents-ip-loss
site: BCT Engineering
---

# VLSM preventing IP address loss

Internet and Intranet · Chapter 2: Internet Protocol Overview

- Asked in: 2069 Bhadra (old course), 10 marks
- Video: [VLSM or Subnetting 2.0. Simply explained!](https://www.youtube.com/watch?v=jLC2pNUz60s) — Patrick Boekhoven
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/internet_and_intranet/vlsm-prevents-ip-loss
- Whole chapter: https://www.bctengineer.com/md/semester_8/internet_and_intranet/chapter-2

## Question

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.

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

## Answer

#### 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):

| Subnet | Hosts needed | Mask | Network | Usable range | Broadcast |
|---|---|---|---|---|---|
| LAN A | 100 | /25 (255.255.255.128) | 192.168.10.0 | .1 - .126 | .127 |
| LAN B | 50 | /26 (255.255.255.192) | 192.168.10.128 | .129 - .190 | .191 |
| LAN C | 25 | /27 (255.255.255.224) | 192.168.10.192 | .193 - .222 | .223 |
| WAN 1 | 2 | /30 (255.255.255.252) | 192.168.10.224 | .225 - .226 | .227 |
| WAN 2 | 2 | /30 (255.255.255.252) | 192.168.10.228 | .229 - .230 | .231 |
| Free | | | 192.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).

```text
        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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How does VLSM save addresses compared with fixed-length subnetting?
   A. It gives each subnet a block sized to its need by using a different mask per subnet
   B. It uses the same large mask for every subnet
   C. It removes network and broadcast addresses
   D. It converts IPv4 to IPv6
   Answer: A. FLSM wastes a large block on small subnets such as router links, while VLSM gives each only what it needs. (Key point: VLSM concept)

2. Which mask is needed for a LAN of 100 hosts?
   A. /24
   B. /26
   C. /27
   D. /25
   Answer: D. 2^7 - 2 = 126 >= 100 so 7 host bits are used, giving /25. (Key point: Choosing mask for 100 hosts)

3. What is the correct VLSM allocation practice, and what must the routing protocol support?
   A. Allocate smallest subnets first; any protocol including RIPv1
   B. Allocate largest subnets first; a classless protocol such as RIPv2, OSPF, EIGRP or BGP
   C. Allocate randomly; static routes only
   D. Allocate largest first; only classful protocols
   Answer: B. Largest-first avoids overlaps, and the mask must be carried in updates, so a classless protocol is needed. (Key point: Allocation order and requirement)

## Related in Internet and Intranet

- [IANA, ICANN functions and IP address role](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aiana-icann-ip-role) — Internet and Intranet, chapter 1
- [OSPF working with routing tables](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aospf-working-routing-tables) — Internet and Intranet, chapter 2

## Related in other subjects

- [Why IP address when MAC exists](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Amac-vs-ip-address) — Computer Networks and Security, chapter 4
- [Subnet 202.70.91.0/24 for 25, 16, 29, 11](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-202-70-91) — Computer Networks and Security, chapter 4, asked 2×
- [Subnet 10.10.10.0/24 for 5, 16, 23, 27](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-10-10-10-0) — Computer Networks and Security, chapter 4, asked 2×
- [Subnet 202.77.19.0/24 for 30, 24, 25, 20](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Asubnetting-202-77-19) — Computer Networks and Security, chapter 4
