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
- Explain why equal-sized subnets waste address space.
- Order the requirements from largest to smallest and assign subnets.
- Check that the finished plan has no overlaps.
Next: IPv6 Addressing & Representation
More free lessons in 1. Network Fundamentals
- Network Fundamentals
- Network Devices
- Cables & Interfaces
- TCP/IP & OSI Models
- Switch Interfaces
- IPv4 Header
- Wireless RF & Frequencies
- IEEE 802.11 Standards & Wi-Fi Generations
- Cisco IOS CLI
- Ethernet Switching 1
- Ethernet Switching 2
- IPv4 Addressing
- IPv4 Configuration
- Subnetting Basics
- Finding Subnets Fast
- IPv6 Addressing & Representation
- Network Diagnostics
- IPv6 Address Scopes & Types
- IPv6 Configuration & EUI-64