How to configure Cisco Variable-Length Subnet Masks (VLSMs)

Cisco How-To Tutorials
Variable-Length Subnet Masks (VLSMs) allow the use of different masks for the same network number on different Cisco interfaces, which allows the user to conserve IP addresses and more efficiently use available address space. Enhanced Interior Gateway Router Protocol (EIGRP), Intermediate System-to-Intermediate System (IS-IS), Open Shortest Path First (OSPF), Routing Information Protocol (RIP) Version 2 and Static routes support VLSMs. Variable-Length Subnet Masking is configured on the router by enabling routing protocols (such as EIGRP or OSPF) that support this, and by configuring the subnet masks of the various Cisco interfaces in the ip address interface sub-command. The best way to implement VLSMs is to keep the existing numbering plan in place and gradually migrate some networks to VLSMs to recover address space. In the example below, a 14-bit subnet mask is used, leaving two bits of address space reserved for serial line host addresses. There is sufficient host address space for two host endpoints on a point-to-point serial link:
interface ethernet 0 ip address !---8 bits of host address space reserved for ethernets

interface serial 0 ip address !---2 bits of address space reserved for serial lines
router ospf 107 !---Router is configured for OSPF and assigned AS 107
network area !---Specifies network directly connected to the router

For further information you may wish to refer to: Cisco VLSM Example

View more Cisco How-To Tutorials

Contact Brad Reese

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2008 IDG Communications, Inc.

SD-WAN buyers guide: Key questions to ask vendors (and yourself)