How to configure RIP on a Cisco router

Hello Ghaith

The purpose of this forum is to be a place of constructive discussions where we can all help each other in our quest to become better networking professionals. There is no need to be adversarial. If I came across as adversarial, or if I upset you in any way I apologize.

You didn’t. It was just a part of my explanation.

First of all, my statement was incorrect. It should read: “RIPv2 by default behaves in a CLASSFUL manner unless you enter the no auto-summary command” Let me elaborate. I have the following topology:
image

Router 2 has a loopback of 10.10.20.1/24 and Router 0 has a loopback of 10.10.10.1/24. RIP version 2 is enabled in all routers and all IPs (including the interconnecting networks and the loopbacks) are advertised via RIP.

Now, remember, the default setting is auto-summary for RIP version 2. Let’s look at the routing table of Router 1:

Router#show ip route | begin Gateway
Gateway of last resort is not set

R    10.0.0.0/8 [120/1] via 192.168.2.1, 00:00:10, GigabitEthernet0/1
                [120/1] via 192.168.3.1, 00:00:25, GigabitEthernet0/0
R    192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:25, GigabitEthernet0/0
                    [120/1] via 192.168.2.1, 00:00:10, GigabitEthernet0/1
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.2.0/24 is directly connected, GigabitEthernet0/1
L       192.168.2.2/32 is directly connected, GigabitEthernet0/1
     192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.3.0/24 is directly connected, GigabitEthernet0/0
L       192.168.3.2/32 is directly connected, GigabitEthernet0/0

Notice that even though the loopbacks are configured with a subnet mask of /24, RIP only sends the classful information from Router 2 and Router 0 to Router 1. There are two routes to 10.0.0.0/8, one for each of the loopback interfaces of each router. There are no routes to 10.10.10.0/24 or 10.10.20.0/24 because RIP is behaving in a classful manner in the information it sends.

Now that is not to say that RIP version 2 is classful, but that if the auto-summary setting is set, it BEHAVES in the same manner as RIPv1. Now, if we add the no auto-summary command to both Router 0 and Router 2, we get the following routing table on Router 1 (after waiting the appropriate amount of time to flush out old routes):

Router#show ip route | begin Gateway
Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 2 subnets
R       10.10.10.0/24 [120/1] via 192.168.2.1, 00:00:04, GigabitEthernet0/1
R       10.10.20.0/24 [120/1] via 192.168.3.1, 00:00:16, GigabitEthernet0/0
R    192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:16, GigabitEthernet0/0
                    [120/1] via 192.168.2.1, 00:00:04, GigabitEthernet0/1
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.2.0/24 is directly connected, GigabitEthernet0/1
L       192.168.2.2/32 is directly connected, GigabitEthernet0/1
     192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.3.0/24 is directly connected, GigabitEthernet0/0
L       192.168.3.2/32 is directly connected, GigabitEthernet0/0

Router#

Now this is what we would expect to see from a routing protocol that is behaving in a classless manner. We see both the 10.10.10.0/24 and 10.10.20.0/24 networks destination networks with the appropriate subnet masks.

To summarize, RIP version 2 is indeed a classless routing protocol as you mention. And yes, the auto-summary is indeed a feature that controls behaviour not the version. However, in order to get the routing protocol to send the subnet masks and to behave performing Classless Inter Domain Routing (CIDR), the no auto-summary command must be implemented. If I misinterpreted your original comments, I apologize.

I hope this has been helpful!

Laz