What is VLSM ? Explained with Examples

By | 9th November 2015

What is Variable Length Subnet Mask (VLSM)?

Variable Length Subnet Masking – VLSM –  is a technique that allows network administrators to divide an IP address space into subnets of different sizes, unlike simple same-size Subnetting.

 Variable Length Subnet Mask (VLSM) in a way, means subnetting a subnet. To simplify further, VLSM is the breaking down of IP addresses into subnets (multiple levels) and allocating it according to the individual need on a network. It can also be called a classless IP addressing. A classful addressing follows the general rule that has been proven to amount to IP address wastage.

Before you can understand VLSM, you have to be very familiar with IP address structure.

The best way you can learn how to subnet a subnet (VLSM) is with examples. Lets work with the diagram below:

Variable Length Subnet Mask (VLSM).

Looking at the diagram, we have three LANs connected to each other with two WAN links.

The first thing to look out for is the number of subnets and number of hosts. In this case, an ISP allocated Class C

HQ = 50 host

RO1 = 30 hosts

RO2 = 10 hosts

2 WAN links

We will try and subnet /24 to sooth this network which allows a total number of 254 hosts I recommend you get familiar with this table below. I never leave home without it!

cram table

Lets begin with HQ with 50 hosts, using the table above:

We are borrowing 2 bits with value of 64. This is the closest we can get for 50 hosts.

HQ – /26 Network address

HQ = Gateway address, First usable address Last usable address. Total address space - to will be the broadcast address (remember to reserve the first and last address for the Network and Broadcast)

HQ Network Mask  – we got the 192 by adding the bit value from the left to the value we borrowed = 128+64=192

HQ address will look like this /26

RO1 = 30 hosts

We are borrowing 3 bits with value of 32; this again is the closest we can get to the number of host needed.

RO1 address will start from –  Network address

Now we add the 32 to the 64 we borrowed earlier = 32+64 = 96

RO1 = Gateway address – First usable IP address – Last usable IP address Broadcast address – total address space – –192.168.1. 94

Network Mask I.e. 128+64+32=224 or

RO2 = Network address

We borrow 4 bits with the value of 16. That’s the closest we can go.

96+16= 112

So, Gateway address – First usable address – Last usable address broadcast

Total host address space – to

Network Mask or /28

WAN links = we are borrowing 6 bit with value of 4

=112 + 4 =116

WAN links from HQ to RO1 Network address will be /30 :

HQ se0/0 =

RO1 se0/0=

Mask for both links= ( we got 252 by adding the bits value we borrowed i.e

124 +64 +32 +16+ 8 +4=252

WAN Link 2= 112+4=116

WAN Link from HQ to RO2 Network address = /30

HQ =   subnet mask

RO2 =  Subnet mask


As I mentioned earlier, having this table will prove very helpful. For example, if you have a subnet with 50 hosts then you can easily see from the table that you will need a block size of 64. For a subnet of 30 hosts you will need a block size of 32.

Summary of Implementing Variable-Length Subnet Masks:
■ Subnetting lets you efficiently allocate addresses by taking one large broadcast domain and
breaking it up into smaller, more manageable broadcast domains.
■ VLSMs let you more efficiently allocate IP addresses by adding multiple layers of the
addressing hierarchy.
■ The benefits of route summarization include smaller routing tables and the ability to isolate
topology changes.

VLSM Example #2

Subnetting Class B Address

How to Calculate Subnets Using Binary method

IP Address or Route Summary.

Resources on CCNA IP Addressing

Internet Protocol Version 6 (IPv6)

Reserved IP Addresses

Public and Private IP Addresses

Network Address Translation (NAT)

Dynamic Host Configuration Protocol (DHCP)

Classless InterDomain Routing (CIDR)

How to Configure Static Routes

Host Standby Router Protocol (HSRP)

Leave a Reply

Your email address will not be published. Required fields are marked *