8 Steps to Understanding IP Subnetting

Step 7 - Variable Length Subnet Masking

When an IP network is assigned more than one subnet mask, it is said to a have a variable length subnet mask (VLSM). This is what is required when you are subnetting a subnet. The concept is very straightforward: Any one subnet can be broken down into further subnets by indicating the proper VLSM.

What must be appreciated about VLSM is how RIP 1 routers work. Originally, the IP addressing scheme and RIP 1 routing protocol did not take into consideration the ability to have different subnet masks on the same network. When a RIP 1 router receives a packet destined for a subnet, it has no idea of the VLSM that has been used to generate the packet address. It just has an address to work with without any knowledge of what CIDR prefix was originally applied - and therefore no knowledge of how many bits are used for the network address and how many are for the host address.

A RIP 1 router would handle this by making some assumptions. If the router has a subnet of the same network number assigned as the local interface, then it assumes the incoming packet has the same subnet mask as the local interface, otherwise it assumes there is no subnet involved and applies a classful mask.

The relevance of this is that RIP1 only allows a single subnet mask, making it impossible to get the full benefit of VLSM. You must use a newer routing protocol like Open Shortest Path First (OSPF) or RIP2, where the network prefix length or mask value is sent along with route advertisements from router to router. With these in use, it is possible to use VLSM to its full potential and have more than one subnet or sub-subnets.

Share this:
Written by Dale Janssen
Profile Picture of Dale Janssen
Dale Janssen is a co-founder of Techopedia and has been involved in the IT Industry for most of his career. He purchased his first computer in 1978 - an Ohio Scientific computer with a whopping memory size of 48K, operating a relic of an operating system called CPM. In fact, his roots go so far back in the computing biz that when he graduated from university, there was no such thing as a computer science department.