Variable Length Subnet Mask (VLSM)

VLSM occurs when more than one mask is used in a single Class A, B, or C network. Although route summarization causes more than one mask to be used, requiring support for VLSM, you can also simply design a network to use multiple subnet masks. By using VLSM, you can reduce the number of wasted IP addresses in each subnet, allow for more subnets, and avoid having to obtain another registered IP network number from the NIC.

The following schematic depicts the same familiar network with two different subnet masks (255.255.0.0 and 255.255.255.0) used in network 10.0.0.0.

VLSM

This figure shows a typical choice of using a /30 prefix (mask 255.255.255.252) on point-topoint serial links, with some other mask (255.255.255.0 in this example) on the LAN subnets. The only real requirements for VLSM are that the subnets do not overlap and that the routing protocol supports VLSM. Subnets overlap when the range of IP addresses in one subnet includes some addresses in the range of valid addresses in another subnet. When using a single mask in a single Class A, B, or C network, you can usually avoid overlapping subnets easily. However, with VLSM, you can more easily overlook cases in which you assign subnets that overlap.

To create VLSMs quickly and efficiently, you need to understand how block sizes and charts work together to create the VLSM masks. The following table shows you the block sizes used when creating VLSMs with Class C networks. For example, if you need 25 hosts, then you’ll need a block size of 32. If you need 11 hosts, you’ll use a block size of 16. Need 43 hosts? Then you’ll need a block of 64. You cannot just make up block sizes – they’ve got to be the block sizes shown in the table. So memorize the block sizes in this table – it’s easy. They’re the same numbers we used with subnetting!

Prefix Mask Hosts Block Size
/25 128 126 128
/26 192 62 64
/27 224 30 32
/28 240 14 16
/29 248 6 8
/30 254 2 4

Our Recommended Premium CCNA Training Resources

These are the best CCNA training resources online:

Click Here to get the Cisco CCNA Gold Bootcamp, the most comprehensive and highest rated CCNA course online with a 4.8 star rating from over 30,000 public reviews. I recommend this as your primary study source to learn all the topics on the exam. Cisco CCNA Gold Bootcamp
Want to take your practice tests to the next level? AlphaPreps purpose-built Cisco test engine has the largest question bank, adaptive questions, and advanced reporting which tells you exactly when you are ready to pass the real exam. Click here for your free trial. Cisco CCNA Gold Bootcamp