Configuring Routing Information Protocol
Configuring Routing Information Protocol
Routing Information Protocol (RIP) is a commonly used routing protocol in small to medium TCP/IP
networks. It is a stable protocol that uses a distance-vector algorithm to calculate routes.
RIP Overview
The Routing Information Protocol (RIP) uses broadcast UDP data packets to exchange routing information.
Cisco software sends routing information updates every 30 seconds, which is termed advertising. If a device
does not receive an update from another device for 180 seconds or more, the receiving device marks the routes
served by the nonupdating device as unusable. If there is still no update after 240 seconds, the device removes
all routing table entries for the nonupdating device.
A device that is running RIP can receive a default network via an update from another device that is running
RIP, or the device can source the default network using RIP. In both cases, the default network is advertised
through RIP to other RIP neighbors.
The Cisco implementation of RIP Version 2 (RIPv2) supports plain text and message digest algorithm 5
(MD5) authentication, route summarization, classless interdomain routing (CIDR), and variable-length subnet
masks (VLSMs).
Authentication in RIP
The Cisco implementation of the Routing Information Protocol (RIP) Version 2 (RIPv2) supports authentication,
key management, route summarization, classless interdomain routing (CIDR), and variable-length subnet
masks (VLSMs).
By default, the software receives RIP Version 1 (RIPv1) and RIPv2 packets, but sends only RIPv1 packets.
You can configure the software to receive and send only RIPv1 packets. Alternatively, you can configure the
software to receive and send only RIPv2 packets. To override the default behavior, you can configure the RIP
version that an interface sends. Similarly, you can also control how packets received from an interface are
processed.
RIPv1 does not support authentication. If you are sending and receiving RIP v2 packets, you can enable RIP
authentication on an interface.
The key chain determines the set of keys that can be used on the interface. Authentication, including default
authentication, is performed on that interface only if a key chain is configured. For more information on key
chains and their configuration, see the “Managing Authentication Keys” section in the “Configuring IP Routing
Protocol-Independent Features” chapter in the Cisco IOS IP Routing: Protocol-Independent Configuration
Guide.
Cisco supports two modes of authentication on an interface on which RIP is enabled: plain-text authentication
and message digest algorithm 5 (MD5) authentication. Plain-text authentication is the default authentication
in every RIPv2 packet.
Note Do not use plain text authentication in RIP packets for security purposes, because the unencrypted
authentication key is sent in every RIPv2 packet. Use plain-text authentication when security is not an
issue; for example, you can use plain-text authentication to ensure that misconfigured hosts do not participate
in routing.
• The amount of time, in seconds, that must pass before a route is removed from the routing table
• The amount of time for which routing updates will be postponed
You can adjust the IP routing support in the Cisco software to enable faster convergence of various IP routing
algorithms, and hence, cause quicker fallback to redundant devices. The total effect is to minimize disruptions
to end users of the network in situations where quick recovery is essential
In addition, an address family can have timers that explicitly apply to that address family (or Virtual Routing
and Forwarding [VRF]) instance). The timers-basic command must be specified for an address family or the
system defaults for the timers-basic command are used regardless of the timer that is configured for RIP
routing. The VRF does not inherit the timer values from the base RIP configuration. The VRF will always
use the system default timers unless the timers are explicitly changed using the timers-basic command.
• As specifically configured, advertising a summarized local IP address pool on the specified interface
(on a network access server) so that the address pool can be provided to dialup clients.
When RIP determines that a summary address is required in the RIP database, a summary entry is created in
the RIP routing database. As long as there are child routes for a summary address, the address remains in the
routing database. When the last child route is removed, the summary entry also is removed from the database.
This method of handling database entries reduces the number of entries in the database because each child
route is not listed in an entry, and the aggregate entry itself is removed when there are no longer any valid
child routes for it.
RIP Version 2 route summarization requires that the lowest metric of the "best route" of an aggregated entry,
or the lowest metric of all current child routes, be advertised. The best metric for aggregated summarized
routes is calculated at route initialization or when there are metric modifications of specific routes at
advertisement time, and not at the time the aggregated routes are advertised.
The ip summary-address rip routerconfiguration command causes the router to summarize a given set of
routes learned via RIP Version 2 or redistributed into RIP Version 2. Host routes are especially applicable
for summarization.
See the "Route Summarization Example, on page 25" section at the end of this chapter for examples of using
split horizon.
You can verify which routes are summarized for an interface using the show ip protocols EXEC command.
You can check summary address entries in the RIP database. These entries will appear in the database only
if relevant child routes are being summarized. To display summary address entries in the RIP routing database
entries if there are relevant routes being summarized based upon a summary address, use the show ip rip
database command in EXEC mode. When the last child route for a summary address becomes invalid, the
summary address is also removed from the routing table.
Note Note that plain text authentication is not recommended for use as part of your security strategy. Its primary
use is to avoid accidental changes to the routing infrastructure. Using MD5 authentication, however, is a
recommended security practice.
In plain text authentication, each participating neighbor router must share an authenticating key. This key is
specified at each router during configuration. Multiple keys can be specified with some protocols; each key
must then be identified by a key number.
In general, when a routing update is sent, the following authentication sequence occurs:
1 A router sends a routing update with a key and the corresponding key number to the neighbor router. In
protocols that can have only one key, the key number is always zero. The receiving (neighbor) router
checks the received key against the same key stored in its own memory.
2 If the two keys match, the receiving router accepts the routing update packet. If the two keys do not match,
the routing update packet is rejected.
MD5 authentication works similarly to plain text authentication, except that the key is never sent over the
wire. Instead, the router uses the MD5 algorithm to produce a "message digest" of the key (also called a
"hash"). The message digest is then sent instead of the key itself. This ensures that nobody can eavesdrop on
the line and learn keys during transmission.
Another form of neighbor router authentication is to configure key management using key chains. When you
configure a key chain, you specify a series of keys with lifetimes, and the Cisco IOS software rotates through
each of these keys. This decreases the likelihood that keys will be compromised. To find complete configuration
information for key chains, refer to the "Managing Authentication Keys" section in the Configuring IP Routing
Offset-list
An offset list is the mechanism for increasing incoming and outgoing metrics to routes learned via RIP. This
is done to provide a local mechanism for increasing the value of routing metrics. Optionally, you can limit
the offset list with either an access list or an interface.
Timers
Routing protocols use several timers that determine such variables as the frequency of routing updates, the
length of time before a route becomes invalid, and other parameters. You can adjust these timers to tune
routing protocol performance to better suit your internetwork needs. You can make the following timer
adjustments:
• The rate (time in seconds between updates) at which routing updates are sent
• The interval of time (in seconds) after which a route is declared invalid
• The interval (in seconds) during which routing information regarding better paths is suppressed
• The amount of time (in seconds) that must pass before a route is removed from the routing table
• The amount of time for which routing updates will be postponed
It also is possible to tune the IP routing support in the software to enable faster convergence of the various IP
routing algorithms, and, hence, quicker fallback to redundant routers. The total effect is to minimize disruptions
to end users of the network in situations where quick recovery is essential.
1. enable
2. configure terminal
3. router rip
4. network ip-address
5. neighbor ip-address
6. offset-list [access-list-number | access-list-name] {in | out} offset [interface-type interface-number]
7. timers basic update invalid holddown flush [sleeptime]
8. end
DETAILED STEPS
Example:
Device# configure terminal
Step 3 router rip Enables a RIP routing process and enters router
configuration mode.
Example:
Device(config)# router rip
Example:
Device(config-router)# network 10.1.1.0
Step 6 offset-list [access-list-number | access-list-name] {in | out} (Optional) Applies an offset list to routing metrics.
offset [interface-type interface-number]
Example:
Device(config-router)# offset-list 98 in 1 Ethernet
1/0
Step 7 timers basic update invalid holddown flush [sleeptime] (Optional) Adjusts routing protocol timers.
Example:
Device(config-router)# timers basic 1 2 3 4
1. enable
2. configure terminal
3. router rip
4. version {1 | 2}
5. exit
6. interface type number
7. ip rip send version [1] [2]
8. ip rip receive version [1] [2]
9. ip rip authentication key-chain name-of-chain
10. ip rip authentication mode {text | md5}
11. end
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# router rip
Step 4 version {1 | 2} Enables the Cisco software to send only RIP Version 2
(RIPv2) packets.
Example:
Device(config-router)# version 2
Step 6 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface Ethernet 3/0
Step 7 ip rip send version [1] [2] Configures an interface to send only RIPv2 packets.
Example:
Device(config-if)# ip rip send version 2
Step 8 ip rip receive version [1] [2] Configures an interface to accept only RIPv2 packets.
Example:
Device(config-if)# ip rip receive version 2
Example:
Device(config-if)# ip rip authentication
key-chain chainname
Step 10 ip rip authentication mode {text | md5} Configures the interface to use message digest algorithm
5 (MD5) authentication (or let it default to plain-text
Example: authentication).
software sends subnet and host routing information across classful network boundaries. To disable automatic
summarization, use the no auto-summary command in router configuration mode.
Note Supernet advertisement (advertising any network prefix less than its classful major network) is not allowed
in RIP route summarization, other than advertising a supernet learned in the routing tables. Supernets
learned on any interface that is subject to configuration are still learned. For example, the following
summarization is invalid: (invalid supernet summarization)
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip summary-address rip ip-address network-mask
5. exit
6. router rip
7. no auto-summary
8. end
DETAILED STEPS
Example:
Router# configure terminal
Example:
Router(config)# interface Ethernet 3/0
Example:
Router(config-if)# exit
Example:
Router(config)# router rip
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip split-horizon
5. no ip split-horizon
6. end
DETAILED STEPS
Example:
Router# configure terminal
Example:
Router(config)# interface Ethernet 3/0
Example:
Router(config-if)# ip split-horizon
Example:
Router(config-if)# no ip split-horizon
Note Split horizon for Frame Relay and SMDS encapsulation is disabled by default. Split horizon is not disabled
by default for interfaces using any of the X.25 encapsulations. For all other encapsulations, split horizon is
enabled by default.
In general, changing the state of the default is not recommended unless you are certain that your application
requires making a change in order to advertise routes properly. Remember that if split horizon is disabled on
a serial interface (and that interface is attached to a packet-switched network), you must disable split horizon
for all routers in any relevant multicast groups on that network.
Note Summarized network will not be advertised when split horizon is enabled.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip split-horizon
5. exit
6. router rip
7. no validate-update-source
8. end
DETAILED STEPS
Example:
Router# configure terminal
Example:
Router(config)# interface Ethernet 3/0
Example:
Router(config-if)# ip split-horizon
Example:
Router(config-if)# exit
Example:
Router(config)# router rip
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. exit
5. router rip
6. output-delay milliseconds
7. end
DETAILED STEPS
Example:
Router# configure terminal
Example:
Router(config)# interface Ethernet 3/0
Example:
Router(config-if)# exit
Example:
Router(config)# router rip
Step 6 output-delay milliseconds Configures interpacket delay for outbound RIP updates.
Example:
Router(config-router)# output-delay 8
• Even on fixed, point-to-point links, the overhead of periodic RIP transmissions could seriously interrupt
normal data transfer because of the quantity of information that passes through the line every 30 seconds.
To overcome these limitations, triggered extensions to RIP cause RIP to send information on the WAN only
when there has been an update to the routing database. Periodic update packets are suppressed over the interface
on which this feature is enabled. RIP routing traffic is reduced on point-to-point, serial interfaces. Therefore,
you can save money on an on-demand circuit for which you are charged for usage. Triggered extensions to
RIP partially support RFC 2091, Triggered Extensions to RIP to Support Demand Circuits .
Perform the following task to enable triggered extensions to RIP and to display the contents of the RIP private
database.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface serial controller-number
4. ip rip triggered
5. end
6. show ip rip database [prefix mask]
DETAILED STEPS
Example:
Router# configure terminal
Example:
Router(config)# interface serial3/0
Example:
Router(config-if)# ip rip triggered
Example:
Router(config-if)# end
Step 6 show ip rip database [prefix mask] Displays the contents of the RIP private database.
Example:
Router# show ip rip database
Configuring IP-RIP Delay Start for Routers Connected by a Frame Relay Network
The tasks in this section explain how to configure a router to use the IP-RIP Delay Start feature on a Frame
Relay interface.
Timesaver Cisco routers allow an MD5-authenticated RIPv2 neighbor session to start when the sequence number of
the first MD5 packet received from the other router is greater than 0. If you are using only Cisco routers
in your network, you do not need to use the IP-RIP Delay Start feature.
Prerequisites
Your router must be running Cisco IOS Release 12.4(12) or a later release.
Note The IP-RIP Delay Start feature is supported over other interface types such as Fast Ethernet and Gigabit
Ethernet. If your Cisco router cannot establish RIPv2 neighbor sessions using MD5 authentication with
a non-Cisco device, the IP-RIP Delay Start feature might resolve the problem.
Restrictions
The IP-RIP Delay Start feature is required only when your Cisco router is configured to establish a RIPv2
neighbor relationship with a non-Cisco device and you want to use MD5 neighbor authentication.
Configuring RIPv2
This required task configures RIPv2 on the router.
This task provides instructions for only one of the many possible permutations for configuring RIPv2 on your
router.
SUMMARY STEPS
1. enable
2. configure terminal
3. router rip
4. network ip-network
5. version {1 | 2}
6. [no] auto-summary
DETAILED STEPS
Example:
Router# configure terminal
Step 3 router rip Enables a RIP routing process, which places you in router
configuration mode.
Example:
Router(config)# router rip
Example:
Router(config-router)# network 192.168.0.0
Step 5 version {1 | 2} Configures the software to receive and send only RIP Version
1 or only RIP Version 2 packets.
Example:
Router (config-router)# version 2
Note This task provides instructions for only one of the many possible permutations for configuring Frame
Relay on a subinterface. For more information about and instructions for configuring Frame Relay, see
the Configuring Frame Relay part of the Cisco IOS Wide-Area Networking Configuration Guide .
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. no ip address
5. encapsulation frame-relay [mfr number | ietf]
6. frame-relay lmi-type {cisco | ansi | q933a}
7. exit
8. interface type number/subinterface-number {point-to-point | multipoint}
9. frame-relay interface-dlci dlci [ietf | cisco]
DETAILED STEPS
Example:
Router# configure terminal
Step 3 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface serial3/0
Step 6 frame-relay lmi-type {cisco | ansi | q933a} Specifies the type of Frame Relay local management
interface (LMI) for the interface.
Example:
Router(config-if)# frame-relay lmi-type ansi
Example:
Router(config-if)# exit
Step 8 interface type number/subinterface-number Specifies a subinterface and the connection type for the
{point-to-point | multipoint} subinterface and enters subinterface configuration mode.
Example:
Router(config)# interface serial3/0.1
point-to-point
Step 9 frame-relay interface-dlci dlci [ietf | cisco] Assigns a data-link connection identifier (DLCI) to a
Frame Relay subinterface.
Example:
Router(config-subif)# frame-relay interface-dlci
100 ietf
Configuring IP with MD5 Authentication for RIPv2 and IP-RIP Delay on a Frame Relay
Subinterface
SUMMARY STEPS
1. enable
2. configure terminal
3. key chain name-of-chain
4. key number
5. key-string string
6. exit
7. exit
8. interface type number
9. no cdp enable
10. ip address ip-address subnet-mask
11. ip rip authentication mode {text | md5}
12. ip rip authentication key-chain name-of-chain
13. ip rip initial-delay delay
14. end
DETAILED STEPS
Example:
Device# configure terminal
Step 3 key chain name-of-chain Specifies the name of a key chain and enters key chain
configuration mode.
Example:
Device(config)# key chain rip-md5
Step 4 key number Specifies the key identifier and enters key chain key
configuration mode. The range is from 0 to 2147483647.
Example:
Device(config-keychain)# key 123456
Example:
Device(config-keychain-key)# key-string
abcde
Example:
Device(config-keychain-key)# exit
Example:
Device(config-keychain)# exit
Step 8 interface type number Specifies a subinterface and enters subinterface configuration
mode.
Example:
Device(config)# interface serial 3/0.1
Step 9 no cdp enable Disables Cisco Discovery Protocol options on the interface.
Note Cisco Discovery Protocol is not supported by non-Cisco
Example: devices; and the IP-RIP Delay Start feature is required
Device(config-subif)# no cdp enable only when you are connecting to a non-Cisco device.
Therefore, you should disable Cisco Discovery Protocol
on any interfaces on which you want to configure the
IP-RIP Delay Start feature.
Step 10 ip address ip-address subnet-mask Configures an IP address for the Frame Relay subinterface.
Example:
Device(config-subif)# ip address 172.16.10.1
255.255.255.0
Step 11 ip rip authentication mode {text | md5} Specifies the mode for RIPv2 authentication.
Example:
Device(config-subif)# ip rip authentication
mode md5
Step 13 ip rip initial-delay delay Configures the IP-RIP Delay Start feature on the interface. The
device will delay sending the first MD5 authentication packet
Example: to the RIPv2 neighbor for the number of seconds specified by
the delay argument. The range is from 0 to 1800.
Device(config-subif)# ip rip initial-delay
45
Example 1
The following configuration shows a simple example of disabling split horizon on a serial link. In this example,
the serial link is connected to an X.25 network.
Router(config-if)# no ip split-horizon
Example 2
In the next example, the figure below illustrates a typical situation in which the no ip split-horizon interface
configuration command would be useful. This figure depicts two IP subnets that are both accessible via a
serial interface on Router C (connected to a Frame Relay network). In this example, the serial interface on
Router C accommodates one of the subnets via the assignment of a secondary IP address.
The Ethernet interfaces for Router A, Router B, and Router C (connected to IP networks 10.13.50.0,
10.155.120.0, and 10.20.40.0, respectively all have split horizon enabled by default, while the serial interfaces
connected to networks 172.16.1.0 and 192.168.1.0 all have split horizon disabled with the no ip split-horizon
command.The figure below shows the topology and interfaces.
In this example, split horizon is disabled on all serial interfaces. Split horizon must be disabled on Router C
in order for network 172.16.0.0 to be advertised into network 192.168.0.0 and vice versa. These subnets
overlap at Router C, interface S0. If split horizon were enabled on serial interface S0, it would not advertise
a route back into the Frame Relay network for either of these networks.
interface ethernet 1
ip address 10.13.50.1
!
interface serial 1
ip address 172.16.2.2
encapsulation frame-relay
no ip split-horizon
interface ethernet 2
ip address 10.155.120.1
!
interface serial 2
ip address 192.168.1.2
encapsulation frame-relay
no ip split-horizon
interface ethernet 0
ip address 10.20.40.1
!
interface serial 0
ip address 172.16.1.1
ip address 192.168.1.1 secondary
encapsulation frame-relay
no ip split-horizon
and 20 are used under the general RIP configuration. Address family timers are not inherited from the general
RIP configuration.
Additional References
The following sections provide references related to configuring Routing Information Protocol.
Related Documents
IPv6 Routing: RIP for IPv6 Cisco IOS IP Routing: RIP Configuration Guide
RIP commands: complete command syntax, command Cisco IOS IP Routing: RIP Command Reference
mode, command history, defaults, usage guidelines, and
examples
Standards
Standard Title
None --
MIBs
RFCs
RFC Title
RFC 1058 Routing Information Protocol
Technical Assistance
Description Link
The Cisco Support website provides extensive online http://www.cisco.com/cisco/web/support/index.html
resources, including documentation and tools for
troubleshooting and resolving technical issues with
Cisco products and technologies.
To receive security and technical information about
your products, you can subscribe to various services,
such as the Product Alert Tool (accessed from Field
Notices), the Cisco Technical Services Newsletter,
and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website
requires a Cisco.com user ID and password.
Glossary
address family --A group of network protocols that share a common format of network address. Address
families are defined by RFC 1700.
IS-IS --Intermediate System-to-Intermediate System. OSI link-state hierarchical routing protocol based on
DECnet Phase V routing, where routers exchange routing information based on a single metric, to determine
network topology.
RIP --Routing Information Protocol.RIP is a dynamic routing protocol used in local and wide area networks.
VRF --VPN routing and forwarding instance. A VRF consists of an IP routing table, a derived forwarding
table, a set of interfaces that use the forwarding table, and a set of rules and routing protocols that determine
what goes into the forwarding table. In general, a VRF includes the routing information that defines a customer
VPN site that is attached to a PE router.