2.3 VLSM
2.3.2 Classless and classful routing protocols

For routers in a variably subnetted network to properly update each other, they must send masks in their routing updates. Without subnet information in the routing updates, routers will have nothing but the address class and their own subnet mask to go on. Only routing protocols that ignore the rules of address class and use classless prefixes will work properly with VLSM (see the figure).

RIPv1 and IGRP, common interior gateway protocols, cannot support VLSM because they do not send subnet information in their updates. Upon receiving an update packet, these classful routing protocols will use one of the following methods to determine the network prefix of an address:

  • If the router receives information about a network, and if the receiving interface belongs to that same network (but on a different subnet), the router applies the subnet mask that is configured on the receiving interface.
  • If the router receives information about a network address that is not the same as the one configured on the receiving interface, it applies the default (by class) subnet mask.

Despite its limitations, RIP is a very popular routing protocol and is supported by virtually all IP routers. RIP's popularity stems from its simplicity and universal compatibility. However, the first version of RIP (RIPv1) suffers from several critical deficiencies: 

  1. RIPv1 does not send subnet mask information in its updates. Without subnet information, VLSM and CIDR cannot be supported
  2. Its updates are broadcast increasing network traffic. 
  3. It does not support authentication. 

In 1988, RFC 1058 prescribed the new (and improved) RIP version 2 to address these deficiencies:

  1. RIPv2 does send subnet information and therefore supports VLSM and CIDR.
  2. It multicasts routing updates using the Class D address 224.0.0.9, providing better efficiency.
  3. It provides for authentication in its updates. 

Because of these key features, RIPv2 should always be preferred over RIPv1, unless some legacy device on the network can not support it.

When RIP is first enabled on a Cisco router, the router listens for version 1 and 2 updates but sends only version 1. To take advantage of version 2's features, you can turn off version 1 support and enable version 2 updates with the following command:

Router(config)#router rip
Router(router-config)#version 2

RIP's straightforward design ensures that it will continue to survive. A new version has already been designed to support future IPv6 networks.