BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › CCNA › 1. Network Fundamentals

VLSM Subnetting

Written reference: Master Variable Length Subnet Masking (VLSM): sizing subnets dynamically to match exact host requirements and eliminating wasted IPv4 address space.

About 8 minutes

Why it matters

Using one mask everywhere wastes addresses. VLSM sizes each subnet to the hosts it actually needs.

Designing Networks with VLSM

Fixed-Length Subnet Masking (FLSM) forces every subnet to be identical in size, wasting thousands of addresses on small branch links.

Variable-Length Subnet Masking (VLSM) allows subnets of different sizes with different prefix lengths on the same network.

Golden Rule of VLSM: ALWAYS allocate the subnet with the LARGEST host requirement first, descending to the smallest.

Point-to-point router links only need 2 usable hosts, so they are always assigned a /30 subnet mask.

The Problem with FLSM

Imagine you have 192.168.1.0/24 and three requirements: • Sales Dept: 100 hosts • IT Dept: 50 hosts • WAN Link: 2 hosts

With FLSM, you must size for the largest group (100 hosts -> requires /25 = 126 hosts). Every subnet is forced to be /25 (128 addresses). The WAN link with only 2 routers consumes 128 addresses, wasting 126 usable IPs!

With VLSM, we tailor the prefix length to each segment: • Sales: /25 (126 hosts) • IT: /26 (62 hosts) • WAN: /30 (2 hosts) Zero wasted space!

VLSM Design Walkthrough Step-by-Step

Given base network: 192.168.1.0/24

Step 1: Sort largest to smallest: 1. Sales: 100 hosts (needs 2^7 - 2 = 126 -> /25) 2. IT: 50 hosts (needs 2^6 - 2 = 62 -> /26) 3. HR: 20 hosts (needs 2^5 - 2 = 30 -> /27) 4. WAN P2P: 2 hosts (needs 2^2 - 2 = 2 -> /30)

Step 2: Allocate sequentially: • Sales (/25): 192.168.1.0/25 (Range: 192.168.1.1 - .126, Broadcast: .127) • Next available IP is 192.168.1.128 • IT (/26): 192.168.1.128/26 (Range: 192.168.1.129 - .190, Broadcast: .191) • Next available IP is 192.168.1.192 • HR (/27): 192.168.1.192/27 (Range: 192.168.1.193 - .222, Broadcast: .223) • Next available IP is 192.168.1.224 • WAN (/30): 192.168.1.224/30 (Range: 192.168.1.225 - .226, Broadcast: .227)

Result: Flawless allocation with no address overlap and maximum efficiency!

The words you need

FLSM — Fixed-Length Subnet Masking. A legacy subnetting method where all subnets within a network use the exact same prefix length.

VLSM — Variable-Length Subnet Masking. Subnetting a subnet to allocate addresses based on the exact size needed by each department or link.

Point-to-Point Link — A direct link between two routers that requires only 2 host IP addresses, perfectly satisfied by a /30 mask.

Takeaways

Next: IPv6 Addressing & Representation

More free lessons in 1. Network Fundamentals