The ability to specify a different subnet mask for the same network number on different subnets is called Variable-Length Subnet Mask (VLSM). RIPv1 and IGRP are classful protocols and are incapable of carrying subnet mask information in their updates. Before RIPv1 or IGRP sends out an update, it performs a check against the subnet mask of the network that is about to be advertised and, in case of VLSM, the subnet gets dropped.
There are no specific requirements for this document.
This document is not restricted to specific software and hardware versions.
Refer to Cisco Technical Tips Conventions for more information on document conventions.
This section provides an example. In this figure, Router 1 has three subnets with two different masks (/24 and /30):
Router 1 goes through these steps before sending an update to Router 2. Refer to Behavior of RIP and IGRP When Sending or Receiving Updates for more information on these steps.
Router 1 checks to see whether 220.127.116.11/24 is part of the same major net as 18.104.22.168/30, which is the network assigned to the interface that will be sourcing the update.
It is, and now Router 1 checks whether 22.214.171.124 has the same subnet mask as 126.96.36.199/30.
Because it does not, Router 1 drops the network, and does not advertise the route.
Router 1 now checks whether 188.8.131.52/30 is part of the same major net as 184.108.40.206/30, which is the network assigned to the interface that will be sourcing the update.
It is, and now Router 1 checks whether 220.127.116.11/30 has the same subnet mask as 18.104.22.168/30.
Because it does, Router 1 advertises the network.
These checks determined that Router 1 only includes 22.214.171.124 in its update that is sent to Router 2. When the debug ip rip command is issued, you can actually see the update sent by Router 1. This is how it looks:
RIP: sending v1 update to 255.255.255.255 via Serial0 (126.96.36.199)
subnet 188.8.131.52, metric 1
Notice that in the previous output only one subnet is included in the update. This results in this entry in Router 2's routing table, which is displayed using the show ip route command:
184.108.40.206/30 is subnetted, 3 subnets
R 220.127.116.11 [120/1] via 18.104.22.168, 00:00:08, Serial0
C 22.214.171.124 is directly connected, Serial0
C 126.96.36.199 is directly connected, Ethernet0
In order to avoid having subnets eliminated from routing updates, either use the same subnet mask over the entire RIPv1 network or use static routes for networks with different subnet masks.