Configuring RIP

In this section we’re going to configure a simple network with two routers to run RIP. Our network in consists of three subnets, 10.0.10.0/24, 10.0.20.0/24, and 10.0.30.0/24, as shown in the figure below. Our goal is to ultimately have Router A learn about network 10.0.30.0 from Router B, and Router B learn about network 10.0.10.0 from Router A using RIP.

Figure: Network configuration for distance vector protocol configuration examples.

If you’re trying to configure a router to use RIP to exchange routing table information, a first important step is to remove any static routes that you may have defined. Remember those administrative distances that we looked at earlier? If you have a static route defined on Router A that provides information on how to get to network 10.0.30.0, any information that Router A receives about network 10.0.30.0 via RIP will be ignored. A static route has an administrative distance of 1, while RIP’s administrative distance is 120. When a route with a higher administrative distance is received, it is ignored, since a more trustworthy routing table entry already exists.

The command to turn on RIP routing is simple – from global configuration mode, simply issue the command router rip, as shown below.

RouterA(config)#router rip
RouterA(config-router)#

Notice how the prompt changes. At the most basic level, the router rip command makes this router capable of sending and receiving RIP updates. However, in order for this router to send out any information of use, we have to tell it which network(s) to advertise. In this case, the network we want to advertise is 10.0.0.0. You don’t need to specify either the subnet mask or specific subnet addresses – because RIP is classful, it will automatically assume that you meant all networks starting with 10. In order to make RIP announce all of the 10.0.0.0 subnets, enter the network 10.0.0.0 command, as shown below.

RouterA(config-router)#network 10.0.0.0
RouterA(config-router)#

That’s literally all it takes to set up RIP. Of course, we’ll also need RIP configured on Router B, which involves following the same steps.

RouterB(config)#router rip
RouterB(config-router)#network 10.0.0.0

In order to confirm that RIP is properly exchanging information between our routers, let’s take a look at the routing tables on Router A.

RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
C 10.0.10.0 is directly connected, Ethernet0
R 10.0.30.0 [120/1] via 10.0.20.2, 00:00:22, Serial0
C 10.0.20.0 is directly connected, Serial0

Notice in the routing table above that Router A learned about network 10.0.30.0 from RIP, as designated by the R at the beginning of the entry. The administrative distance is 120, and the number of hops to reach the network is 1, as designated by the entry [120/1].

Finally, the next-hop address is 10.0.20.2, which is accessible via interface Serial0.
An easy way to test whether RIP is working on both routers is a simple ping. If Router A can successfully ping IP address 10.0.30.1, it means that Router B also has a route (learned from RIP) back to network 10.0.10.0.

RouterA#ping 10.0.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.30.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/38/48 ms

Remember that many routing protocols are also able to load-balance across multiple paths. RIP can load balance traffic across up to 6 paths, as long as the hop counts to the network in question are equal.

Author: Dan DiNicolo

Dan DiNicolo is a freelance author, consultant, trainer, and the managing editor of 2000Trainers.com. He is the author of the CCNA Study Guide found on this site, as well as many books including the PC Magazine titles Windows XP Security Solutions and Windows Vista Security Solutions. Click here to contact Dan.