Variable Length Subnet Mask (VLSM)

1.7 Given a scenario, use appropriate IPv4 network addressing

Subnetting

📘CompTIA Network+ (N10-009)


1. What is VLSM?

VLSM stands for Variable Length Subnet Mask.

  • It is a method of subnetting a network more efficiently by allowing different subnets to have different subnet masks.
  • Traditional subnetting uses the same subnet mask for all subnets in a network, which can waste IP addresses. VLSM fixes this by allowing subnets to be sized according to the number of hosts they need.

In simple IT terms:

  • Think of your network as a range of IP addresses. Some servers or devices need more IP addresses, some need fewer.
  • With VLSM, you can allocate smaller or larger subnets based on actual need, instead of giving everyone the same number of addresses.

2. Why is VLSM used in IT networks?

  • Efficient use of IP addresses: Prevents wasting IP addresses in networks that don’t need many.
  • Better network design: You can allocate more IPs to departments like servers or data centers, and fewer to things like printers.
  • Supports hierarchical routing: Helps routers summarize networks, reducing routing table size and improving performance.

Example in IT terms:

  • Your network has 192.168.1.0/24 (256 addresses).
  • You need:
    • 50 addresses for a server subnet
    • 20 addresses for a printer subnet
    • 10 addresses for a management subnet

Instead of creating three subnets with 256 addresses each (wasting IPs), VLSM allows you to create subnets of different sizes.


3. How VLSM works

VLSM allows you to borrow bits from the host portion of the address differently for each subnet.

Step-by-step example:

  1. Start with a network: 192.168.1.0/24 (which has 256 IP addresses: 192.168.1.0 to 192.168.1.255).
  2. Determine subnet needs:
    • Subnet A: 50 hosts → needs at least 6 bits for hosts (2⁶ – 2 = 62 usable addresses)
    • Subnet B: 20 hosts → needs 5 bits for hosts (2⁵ – 2 = 30 usable addresses)
    • Subnet C: 10 hosts → needs 4 bits for hosts (2⁴ – 2 = 14 usable addresses)
  3. Assign subnet masks:
    • Subnet A → /26 (255.255.255.192) → 62 usable addresses
    • Subnet B → /27 (255.255.255.224) → 30 usable addresses
    • Subnet C → /28 (255.255.255.240) → 14 usable addresses
  4. Allocate IP ranges:
    • Subnet A → 192.168.1.0 – 192.168.1.63
    • Subnet B → 192.168.1.64 – 192.168.1.95
    • Subnet C → 192.168.1.96 – 192.168.1.111

This way, no IP addresses are wasted, and each subnet gets just what it needs.


4. Key Points for the Exam

  • VLSM is different from traditional subnetting because subnet masks can vary per subnet.
  • It is mostly used in classless networks (CIDR), not in classful addressing.
  • Helps conserve IP addresses, which is crucial in IPv4 networks.
  • VLSM requires routers that support CIDR and hierarchical routing, because the router needs to know each subnet’s mask.
  • Always start subnetting from the largest subnet first when using VLSM to avoid running out of IPs.

5. Practical IT Uses

  1. Server farm: Large number of hosts → bigger subnet.
  2. Management VLAN: Few hosts like switches, routers → small subnet.
  3. Branch office network: Different branches need different sizes → VLSM allows efficient allocation.
  4. WAN links: Point-to-point links need only 2 IP addresses → /30 subnet is perfect.

6. VLSM vs. FLSM (Fixed Length Subnet Mask)

FeatureVLSMFLSM
Subnet sizeVariableFixed
IP utilizationEfficientWastes IPs if subnet size > need
RoutingRequires CIDR and routing supportSimple, classful routing possible
Use caseModern networks with mixed host countsSimple, uniform networks

Exam Tip

When the exam asks about VLSM:

  • Look for phrases like “efficient use of IP addresses”, “different subnet sizes”, or “CIDR support”.
  • Remember largest subnet first, and calculate host bits based on needed addresses.

Buy Me a Coffee