Configuring Routing Information Protocol
Configuring Routing Information Protocol
This chapter describes how to configure Routing Information Protocol (RIP). For a complete description of the RIP commands that appear in this chapter, refer to the RIP Commands chapter of the Cisco IOS IP and IP Routing Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online. RIP is a relatively old, but still commonly used, interior gateway protocol created for use in small, homogeneous networks. It is a classical distance-vector routing protocol. RIP is documented in RFC 1058. RIP uses broadcast User Datagram Protocol (UDP) data packets to exchange routing information. The Cisco IOS software sends routing information updates every 30 seconds, which is termed advertising. If a router does not receive an update from another router for 180 seconds or more, it marks the routes served by the nonupdating router as being unusable. If there is still no update after 240 seconds, the router removes all routing table entries for the nonupdating router. The metric that RIP uses to rate the value of different routes is hop count. The hop count is the number of routers that can be traversed in a route. A directly connected network has a metric of zero; an unreachable network has a metric of 16. This small range of metrics makes RIP an unsuitable routing protocol for large networks. A router that is running RIP can receive a default network via an update from another router that is running RIP, or the router can source (generate) the default network itself with RIP. In both cases, the default network is advertised through RIP to other RIP neighbors. Cisco IOS software will source the default network with RIP if one of the following conditions is met:
The ip default-network command is configured. The default-information originate command is configured. The default route is learned via another routing protocol or static route and then redistributed into RIP.
RIP sends updates to the interfaces in the specified networks. If the network of an interface network is not specified, it will not be advertised in any RIP update. The Cisco implementation of RIP Version 2 supports plain text and MD5 authentication, route summarization, classless interdomain routing (CIDR), and variable-length subnet masks (VLSMs). For protocol-independent features, which also apply to RIP, see the chapter Configuring IP Routing Protocol-Independent Features in this document.
P1C-153
Enabling RIP (Required) Allowing Unicast Updates for RIP (Required) Applying Offsets to Routing Metrics (Optional) Adjusting Timers (Optional) Specifying a RIP Version (Optional) Enabling RIP Authentication (Optional) Configuring Route Summarization on an Interface (Optional) Verifying IP Route Summarization (Optional) Disabling Automatic Route Summarization (Optional) Running IGRP and RIP Concurrently (Optional) Disabling the Validation of Source IP Addresses (Optional) Enabling or Disabling Split Horizon (Optional) Configuring Interpacket Delay (Optional) Connecting RIP to a WAN (Optional)
For information about the following topics, see the Configuring IP Routing Protocol-Independent Features chapter:
Enabling RIP
To enable RIP, use the following commands beginning in global configuration mode: Command
Step 1 Step 2
Router(config)# router rip
Purpose Enable a RIP routing process, which places you in router configuration mode. Associate a network with a RIP routing process.
P1C-154
Command
Router(config-router)# neighbor ip-address
To control the set of interfaces with which you want to exchange routing updates, you can disable the sending of routing updates on specified interfaces by configuring the passive-interface command. See the discussion on filtering in the Filter Routing Information section in the Configuring IP Routing Protocol-Independent Features chapter.
Adjusting 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. To adjust the timers, use the following command in router configuration mode: Command
Router(config-router)# timers basic update invalid holddown flush [sleeptime]
P1C-155
Purpose Configures the software to receive and send only RIP Version 1 or only RIP Version 2 packets.
The preceding task controls the default behavior of RIP. You can override that behavior by configuring a particular interface to behave differently. To control which RIP version an interface sends, use one of the following commands, beginning in interface configuration mode
:
Command
Router(config-if)# ip rip send version 1 Router(config-if)# ip rip send version 2 Router(config-if)# ip rip send version 1 2
Purpose Configures an interface to send only RIP Version 1 packets. Configures an interface to send only RIP Version 2 packets. Configures an interface to send RIP Version 1 and Version 2 packets.
Similarly, to control how packets received from an interface are processed, use one of the following commands in interface configuration mode: Command
Router(config-if)# ip rip receive version 1 Router(config-if)# ip rip receive version 2 Router(config-if)# ip rip receive version 1 2
Purpose Configures an interface to accept only RIP Version 1 packets. Configures an interface to accept only RIP Version 2 packets. Configures an interface to accept either RIP Version 1 or 2 packets.
P1C-156
We support two modes of authentication on an interface for which RIP authentication is enabled: plain text authentication and MD5 authentication. The default authentication in every RIP Version 2 packet is plain text authentication.
Note
Do not use plain text authentication in RIP packets for security purposes, because the unencrypted authentication key is sent in every RIP Version 2 packet. Use plain text authentication when security is not an issue, for example, to ensure that misconfigured hosts do not participate in routing. To configure RIP authentication, use the following commands in interface configuration mode:
Command
Step 1 Step 2
Router(config-if)# ip rip authentication key-chain name-of-chain Router(config-if)# ip rip authentication mode {text | md5}
Purpose Enables RIP authentication. Configures the interface to use MD5 digest authentication (or let it default to plain text authentication).
See the Key Management Examples section of the Configuring IP Routing Protocol-Independent Features chapter for key management information and examples.
The summarized routes in the RIP database are processed first. Any associated child routes that are included in a summarized route are skipped as RIP looks through the routing database, reducing the processing time required. Automatically, by summarizing subprefixes to the classful network boundary when crossing classful network boundaries (autosummary)
Note
You need not configure anything for autosummary to be enabled. To disable autosummary, use the Router(config-router)# no auto-summary 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
Autosummary addressing always summarizes to the classful address boundary, while the ip summary-address command summarizes addresses on a specified interface. If autosummary addressing is enabled, autosummarization is the default behavior for interfaces on the router not associated with dial-in clients (the backbone), with or without the ip summary-address rip interface subcommand present.
P1C-157
For example, if a local IP address pool of 10.1.1.1 to 10.1.1.254 is configured on the network access server, you could configure the ip summary-address rip 10.1.1.0 255.255.255.0 command on the network access server port that provides addresses to dialup clients to cause the router to advertise 10.1.1.0/24 routes to dialup clients. Because a summary route is advertised, advertisement of the /32 host routes (installed when the dialup client connects) is suppressed so that the router does not advertise these routes to the network access server interface.
Autosummary will override the configured summary-address feature on a given interface except when both of the following conditions are true: The configured interface summary-address and the IP address of the configured interface share the same major network (the classful, nonsubnetted portion of the IP address). Split horizon is not enabled on the interface.
Note
If split horizon is enabled, neither an autosummary address nor the interface summary-address is advertised. In the following example configuration, the major network is 10.0.0.0. The 10 in the address defines a Class A address space, allowing space for 0.x.x.x unique hosts where x defines unique bit positions in the addresses for these hosts. The summary of the major net defines the prefix as implied by the class (A, B, or C) of the address, without any network mask. The summary address 10.2.0.0 overrides the autosummary address of 10.0.0.0, 10.2.0.0 is advertised out interface E1, and 10.0.0.0 is not advertised.
int E1 ip address 10.1.1.1 255.255.255.0 ip summary-address rip 10.2.0.0 255.255.0.0 no ip split-horizon router rip network 10.0.0.0
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.
P1C-158
Each route summarization on an interface must have a unique major net, even if the subnet mask is unique. For example, the following is not permitted:
int E1 ... ip summary-address rip 10.1.0.0 255.255.0.0 ip summary-address rip 10.2.0.0 255.255.0.0 (or different mask)
Note
The ip summary-address eigrp command uses other options that are not applicable to RIP. Do not confuse EIGRP summary-address with the new RIP command, ip summary-address rip.
Purpose Enters interface configuration mode. Specifies the IP address and network mask that identify the routes to be summarized.
See the Route Summarization Examples section at the end of this chapter for examples of using split horizon.
P1C-159
You can check summary address entries in the RIP database. These entries will appear in the database only if there are relevant child routes being summarized. When the last child route for a summary address becomes invalid, the summary address is also removed from the routing table. The following example shows a summary address entry for route 12.11.0.0/16, with three child routes active:
router# show ip rip database 11.0.0.0/8 auto-summary 11.11.11.0/24 directly connected, Ethernet2 12.0.0.0/8 auto-summary 12.11.0.0/16 int-summary ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12.11.10.0/24 directly connected, Ethernet3 12.11.11.0/24 directly connected, Ethernet4
12.11.12.0/24
P1C-160
Purpose Disables the validation of the source IP address of incoming RIP routing updates.
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. See the Route Summarization Examples section at the end of this chapter for examples of using split horizon.
Note
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: 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.
P1C-161
Periodic broadcasting by RIP generally prevented WAN circuits from being closed. 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 hits 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. To enable triggered extensions to RIP, use the following commands in global configuration mode: Command
interface serial number ip rip triggered
Purpose Configures a serial interface. Enables triggered extensions to RIP. To display the contents of the RIP private database, use the following command in EXEC mode:
Command
show ip rip database [prefix mask]
P1C-162
The following example shows how the ip summary-address rip command works with autosummary addressing in RIP, starting in global configuration mode. In the example, the major network is 10.0.0.0. The summary address 10.2.0.0 overrides the autosummary address of 10.0.0.0, so that 10.2.0.0 is advertised out interface e1 and 10.0.0.0 is not advertised.
Note
If split horizon is enabled, neither autosummary nor interface summary addresses (those configured with the ip summary-address rip command) are advertised.
router rip network 10.0.0.0 exit interface ethernet1 ip address 10.1.1.1 255.255.255.0 ip summary-address rip 10.2.0.0 255.255.0.0 no ip split-horizon exit
The following example shows an illegal use of the ip summary-address rip command, because both addresses to be summarized have the same major network. Each route summarization on an interface must have a unique major network, whether or not the addresses have unique address masks.
interface ethernet1 ... ip summary-address rip 10.1.0.0 255.255.0.0 ip summary-address rip 10.2.0.0 255.255.255.0
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.
interface serial 0 encapsulation x25 no ip split-horizon
P1C-163
Example 2
In the next example, Figure 25 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 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.20.40.0, and 10.155.120.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. Figure 25 shows the topology and interfaces.
Figure 25 Disabled Split Horizon Example for Frame Relay Network
Network address: 10.20.40.0 Interface address: 10.20.40.1 E0 S0 Network address: 10.13.50.0 Interface address: 10.13.50.1 E1 S1 Router A Interface address: 172.16.2.2 Network address: 172.16.1.0 Router C Network address: 10.155.120.0 Interface address: 10.155.120.1 E2
In this example, split horizon is disabled on all serial interfaces. The 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.
Configuration for Router A
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
P1C-164
S1069a
P1C-165
P1C-166