Configuring RIP Version 1


You want to run RIP on a simple network.


The following commands show how to configure basic RIP functionality:

Router2#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#interface Ethernet0
Router2(config-if)#ip address
Router2(config-if)#interface Serial0.1
Router2(config-subif)#ip address
Router2(config)#router rip



You enable RIP for an interface by associating its IP address with a network. For example, the Serial0.1 subinterface in this example has an IP address of So if you want this subinterface to take part in RIP route distribution, you just need to include a network statement that includes its address:

Router2(config)#router rip

If you have other interfaces that are also part of on this router, they will take part in RIP as well. It's important to note that RIP network statements work with classful network addresses. The network command may appear to accept subnets of classful addresses, but it will internally rewrite these subnet addresses with the classful network address:

Router2#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#router rip
Router2#show run | begin router rip
router rip


Since is a Class B network, the statement network tells the router to include all interfaces with IP address in this range. Note, however, that the other address on this router,, is part of the Class C network,, which is why we need the second network command:

Router2(config)#router rip

If your router has several addresses that belong to different network classes, as in, for example, 192.168.x.0/24, you have to specify them all separately:

Router2(config)#router rip

It can sometimes be confusing to know which networks to specify. You use the network command to specify both the routes that RIP advertises and the interfaces that it uses.

If your router receives a route from another router, it will pass it along to other routers, whether you have specified a network statement for this address or not. So the network command selects only the routes that are local to this router, such as directly connected networks. However, the router will only distribute information about directly connected routes if there is a network statement for these routes. And the router will exchange RIP information only through interfaces specified by network statements.

The network command also selects the interfaces that will use RIP. By default, the router will run RIP on any interfaces whose IP addresses are contained within the range specified in the network statement. We discuss exceptions to this rule in Recipe 6.6.

The show ip protocol command gives a lot of useful information about what interfaces and address ranges are involved in the routing protocol:

Router2#show ip protocol
Routing Protocol is "rip"
 Sending updates every 30 seconds, next due in 7 seconds
 Invalid after 180 seconds, hold down 180, flushed after 240
 Outgoing update filter list for all interfaces is not set
 Incoming update filter list for all interfaces is not set
 Redistributing: rip
 Default version control: send version 1, receive any version
 Interface Send Recv Triggered RIP Key-chain
 Ethernet0 1 1 2 
 Serial0.1 1 1 2 
 Automatic network summarization is in effect
 Maximum path: 4
 Routing for Networks:
 Routing Information Sources:
 Gateway Distance Last Update 120 00:00:17
 Distance: (default is 120)


As you can see from the output of this command, the router will send RIP Version 1 on both interfaces Ethernet0 and Serial0.1, but it will listen for both Versions 1 and 2. You can force the router to use only Version 1 to send and receive routing information for all interfaces with the following command:

Router2#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#router rip
Router2(config-router)#version 1

However, it is usually better to restrict what you send rather than what you receive. That way, if another device is misconfigured to send the other version, it doesn't break the network. We will discuss how to configure different RIP version options in Recipe 6.14.

Once you have RIP running successfully between two or more routers, you can look at your routing table to see which routes the router is learning, and from where:

Router2#show ip route rip
R [120/1] via, 00:00:00, Serial0.1
R [120/1] via, 00:00:00, Serial0.1
R [120/2] via, 00:00:00, Serial0.1

This command just gives a subset of the output of the more general show ip route command, which we discussed in Chapter 5. The example output shows that the router has learned that it can get to the destination network through the next-hop router,, which is on interface Serial0.1.

The two numbers in the square brackets, [120/2], are the administrative distance and the RIP metric respectively. Cisco routers give all RIP routes a default administrative distance of 120. The metric value of 2 indicates how far away this network is. By default, the metric is the same as the number of hops, but you can adjust metric values to break this rule. We will discuss how to change metric values in Recipes 6.3, 6.4, 6.5, and 6.9, and we talk about administrative distances in Chapter 5.

Another useful command for looking at RIP functions on your router is the show ip rip database command, introduced in IOS level 12.0(6)T:

Router2#show ip rip database auto-summary
 [1] via, 00:00:13, Serial0.1 auto-summary
 [1] via, 00:00:13, Serial0.1 directly connected, Serial0.1 auto-summary
 [2] via, 00:00:13, Serial0.1 auto-summary directly connected, Ethernet0

This allows you to see more detailed information about each of the routes in the RIP database.

See Also

Recipe 6.3; Recipe 6.4; Recipe 6.5; Recipe 6.6; Recipe 6.9; Recipe 6.14; Chapter 5

Router Configuration and File Management

Router Management

User Access and Privilege Levels


IP Routing





Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time


Router Interfaces and Media

Simple Network Management Protocol





First Hop Redundancy Protocols

IP Multicast

IP Mobility




Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications


Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505 © 2008-2020.
If you may any questions please contact us: