Variable Length Subnet Masking

ItsMe
3 min readOct 6, 2022

--

Network Topology to use

What is Variable Length Subnet Masking (VLSM)? VLSM is a method of subnetting that ensures that the network design is such that there are little to no wasted IP addresses. For example, in the above network we need 5 subnets and each subnet has a different number of required hosts. It would not be sensible to borrow 3 bits from the subnet mask and generate 8 subnets of 30 addressable hosts each. We will be wasting so many IP addresses and we have hence not allowed room for network growth. The solution is VLSM where we only generate a subnet based on the number of hosts we need. This will make more sense in this write-up.

The IP address provided for the entire network is 172.19.67.0/24. We are supposed to create 5 subnets from, each with a different number of hosts as indicated in the topology. For each of the networks, we need to keep in mind that apart from the number of hosts required, we also need one IP for the gateway and another IP for the VLANs on each switch. When creating variable length subnets, we should start with the biggest required subnet and then move lower. This is to ensure we are systematic and we can ensure continuity. You will also notice that these subnets are continuous despite them having different subnet masks.

We then need to assign the IP addresses to the devices. My method of doing this was to start at the leaf node of every subnet. In order to ensure we don’t get mixed up when assigning we should put all the devices and their interfaces with their IP addresses, subnets masks and gateways in a list like below. Color coding them helped me keep track of the subnet I am working with.

As you can see, we have been able to accommodate the entire network between the IPs 172.19.67.1 and 172.19.67.99.

To configure an IP on a router for example, East Router — Gig 0/1, use the following commands:
• enable
• configure terminal
• interface g0/0
• ip address 172.19.67.1 255.255.255.224
• no shutdown

To configure an IP address on a switch’s VLAN, for example, ES-1 switch, use the following commands:
• enable
• configure terminal
• interface vlan 1
• ip address 172.19.67.34 255.255.255.224
• no shutdown

To configure the serial interfaces on the routers, you need to set the clock rate on the Serial DCE end. This is the end of the serial line that has a clock icon when hovering over it. Refer to this link for more information: Serial Connection set-up.

We have successfully been able to calculate the subnets for the network using VLSM. This article assumes you already have an idea on how to perform Static Length Subnet Masking (SLSM).

I hope you have learnt something in this exercise. This lab was set up for me thanks to to Cisco and CyberShujaa.

--

--

ItsMe
ItsMe

Written by ItsMe

I am a degree holder in Computer Science with an interest in cyber security.

No responses yet