Configuring RIP on a Cisco Router
In this article, I will configure RIP (Routing Information Protocol) on a few Cisco routers in Packet Tracer to demonstrate how to set up dynamic routing with RIP. We'll look at the basic RIP configuration and some useful verification commands.
I'll be using the following network topology:
R1 (192.168.1.1/24) --- (192.168.1.2/24) R2 (10.1.1.1/24) --- (10.1.1.2/24) R3 (172.16.1.1/24)The goal is to configure RIP so that all three routers can communicate with each other through dynamic routing.
Basic RIP Configuration
RIP configuration is straightforward. You need to enable RIP and then advertise the networks that are directly connected to each router.
On Router R1:
R1(config)# router rip
R1(config-router)# network 192.168.1.0
R1(config-router)# exitOn Router R2:
R2(config)# router rip
R2(config-router)# network 192.168.1.0
R2(config-router)# network 10.1.1.0
R2(config-router)# exitOn Router R3:
R3(config)# router rip
R3(config-router)# network 10.1.1.0
R3(config-router)# network 172.16.1.0
R3(config-router)# exitNote that when you specify a network in RIP, you use the classful network address. RIP version 1 doesn't support subnet information in its updates, so it automatically assumes the classful boundaries.
Verification Commands
After configuring RIP, you can verify that it's working correctly using several show commands:
show ip route
This command displays the routing table and shows you which routes RIP has learned:
R1# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 10.1.1.0/24 [120/1] via 192.168.1.2, 00:00:12, FastEthernet0/0
R 172.16.1.0/24 [120/2] via 192.168.1.2, 00:00:12, FastEthernet0/0The R entries indicate routes learned via RIP. The numbers in brackets [120/1] show the administrative distance (120 for RIP) and the metric (hop count).
show ip rip database
This command shows the RIP database, which contains all the routes RIP knows about:
R1# show ip rip database
10.1.1.0/24 auto-summary
10.1.1.0/24 via 192.168.1.2, FastEthernet0/0
172.16.1.0/24 auto-summary
172.16.1.0/24 via 192.168.1.2, FastEthernet0/0
192.168.1.0/24 directly connected, FastEthernet0/0show ip protocols
This command shows information about the routing protocols running on the router:
R1# show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, invalid after 180 seconds, hold down 180, flushed after 240
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 2 1
Automatic network summarization is in effect
Routing for Networks:
192.168.1.0
Routing Information Sources:
Gateway Distance Last Update
192.168.1.2 120 00:00:05
Distance: (default is 120)RIP Timers
RIP uses several timers that are important to understand:
- Update timer (30 seconds): How often RIP sends routing updates
- Invalid timer (180 seconds): How long a route stays in the table without being updated
- Hold-down timer (180 seconds): How long to wait before accepting a new route to the same destination
- Flush timer (240 seconds): How long before a route is completely removed from the table
Testing Connectivity
Once RIP is configured, you should be able to ping between all routers:
R1# ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 msYou can also use traceroute to see the path packets take:
R1# traceroute 172.16.1.1
Type escape sequence to abort.
Tracing the route to 172.16.1.1
1 192.168.1.2 0 msec 4 msec 0 msec
2 172.16.1.1 0 msec * 4 msecRIP is a distance-vector routing protocol that's easy to configure and understand, making it perfect for learning basic dynamic routing concepts. While it's rarely used in modern networks due to its limitations (15 hop limit, slow convergence), understanding RIP helps build a foundation for more advanced routing protocols like OSPF and EIGRP.