RIP
Configuring Routing Information Protocol
RIP Configuration Task List
Enabling RIP
Allowing Unicast Updates for RIP
Applying Offsets to Routing Metrics
Adjusting Timers
Specifying a RIP Version
Enabling RIP Authentication
RIP Route Summarization
Restrictions to RIP Route Summarization
Configuring Route Summarization on an Interface
Verifying IP Route Summarization
Disabling Automatic Route Summarization
Running IGRP and RIP Concurrently
Disabling the Validation of Source IP Addresses
Enabling or Disabling Split Horizon
Configuring Interpacket Delay
Connecting RIP to a WAN
RIP Configuration Examples
Route Summarization Examples
Example 1: Correct Configuration
Example 2: Incorrect Configuration
Split Horizon Examples
Example 1
Example 2
Address Family Timers Example
RIP (Routing information Protocol ) is a distance vector routing protoco.
The term distance vector describe what a router knows about each route. At the end of the process when a router learn about a route to a subnet, all the router knows is some measurement of distance (the metric) and the next hop and outgoing interface to use for that route( a vector , or direction).
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.
Cisco IOS software sends
routing information updates every 30 seconds, which is termed advertising.
Distance vector operation in stable network
Distance vector routing protocols send periodic full routing updates.
Full updates limited by split-horizon rules.
The routing protocol omits some routes from the periodic full update because split-horizont is a loop avoidance mechanics
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 Message Digest 5 (MD5) authentication, route
summarization, classless interdomain routing (CIDR), and variable-length
subnet masks (VLSMs).
RIP Configuration Task List
To configure RIP, perform the tasks described
in the following sections. The tasks in the first two sections are
required; the tasks in the remaining sections are optional.
•
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:
•
Filtering RIP information
•
Key management (available in RIP Version 2)
•
VLSM
Enabling RIP
To enable RIP, use the following commands beginning in global configuration mode:
|
Command
|
Purpose
|
Step 1
|
Router(config)# router rip
|
Enables a RIP routing process, which places you in router configuration mode.
|
Step 2
|
Router(config-router)# network ip-address
|
Associates a network with a RIP routing process.
|
Allowing Unicast Updates for RIP
Because RIP is normally a broadcast protocol,
in order for RIP routing updates to reach nonbroadcast networks, you
must configure the Cisco IOS software to permit this exchange of routing
information. To do so, use the following command in router
configuration mode:
Command
|
Purpose
|
Router(config-router)# neighbor ip-address
|
Defines a neighboring router with which to exchange routing information.
|
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 router
configuration command. See the discussion on filtering in the "Filter
Routing Information" section in the "Configuring IP Routing
Protocol-Independent Features" chapter.
Applying Offsets to Routing Metrics
An offset list is the mechanism for increasing
incoming and outgoing metrics to routes learned via RIP. Optionally, you
can limit the offset list with either an access list or an interface.
To increase the value of routing metrics, use the following command in
router configuration mode:
Command
|
Purpose
|
Router(config-router)# offset-list [access-list-number | access-list-name] {in | out} offset [interface-type interface-number]
|
Applies an offset to routing metrics.
|
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.
In addition, an address family can have explicitly specified timers that apply to that address-family (or VRF) only. The timers basic command must be specified for an address family or the system defaults for the timers basic
command are used regardless of what 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 explicitly
changed using the timers basic command.
To adjust the timers, use the following command in router configuration mode:
Command
|
Purpose
|
Router(config-router)# timers basic update invalid holddown flush [sleeptime]
|
Adjusts routing protocol timers.
|
See the "Address Family Timers Example" section at the end of this chapter for examples of adjusting timers for an address family (VRF).
Specifying a RIP Version
The Cisco implementation of RIP Version 2
supports authentication, key management, route summarization, CIDR, and
VLSMs. Key management and VLSM are described in the chapter "Configuring
IP Routing Protocol-Independent Features."
By default, the software receives RIP Version 1
and Version 2 packets, but sends only Version 1 packets. You can
configure the software to receive and send only Version 1 packets.
Alternatively, you can configure the software to receive and send only
Version 2 packets. To configure the software to send and receive packets
from only one version, use the following command in router
configuration mode:
Command
|
Purpose
|
Router(config-router)# version {1 | 2}
|
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 the following commands in interface
configuration mode, as needed:
:
Command
|
Purpose
|
Router(config-if)# ip rip send version 1
|
Configures an interface to send only RIP Version 1 packets.
|
Router(config-if)# ip rip send version 2
|
Configures an interface to send only RIP Version 2 packets.
|
Router(config-if)# ip rip send version 1 2
|
Configures an interface to send RIP Version 1 and Version 2 packets.
|
Similarly, to control how packets received from
an interface are processed, use the following commands in interface
configuration mode, as needed:
Command
|
Purpose
|
Router(config-if)# ip rip receive version 1
|
Configures an interface to accept only RIP Version 1 packets.
|
Router(config-if)# ip rip receive version 2
|
Configures an interface to accept only RIP Version 2 packets.
|
Router(config-if)# ip rip receive version 1 2
|
Configures an interface to accept either RIP Version 1 or 2 packets.
|
Enabling RIP Authentication
RIP Version 1 does not support authentication.
If you are sending and receiving RIP Version 2 packets, you can enable
RIP authentication on an interface.
The key chain determines the set of keys that
can be used on the interface. If a key chain is not configured, no
authentication is performed on that interface, not even the default
authentication. Therefore, you must also perform the tasks in the
section "Managing Authentication Keys" in the "Configuring IP Routing
Protocol-Independent Features" chapter.
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
|
Purpose
|
Step 1
|
Router(config-if)# ip rip authentication key-chain name-of-chain
|
Enables RIP authentication.
|
Step 2
|
Router(config-if)# ip rip authentication mode {text | md5}
|
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.
RIP Route Summarization
Summarizing routes in RIP Version 2 improves
scalability and efficiency in large networks. Summarizing IP addresses
means that there is no entry for child routes (routes that are created
for any combination of the individual IP addresses contained within a
summary address) in the RIP routing table, reducing the size of the
table and allowing the router to handle more routes.
Summary IP address functions more efficiently than multiple individually advertised IP routes for the following reasons:
•
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.
Cisco routers can summarize routes in two ways:
•
Automatically,
by summarizing subprefixes to the classful network boundary when
crossing classful network boundaries (automatic summary).
Note You
need not configure anything for automatic summary to be enabled. To
disable automatic summary, use the Router (config-router)#
no auto-summary router configuration 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.
Automatic summary addressing always summarizes to the classful address boundary, while the ip summary-address
router configuration command summarizes addresses on a specified
interface. If automatic summary addressing is enabled, automatic
summarization 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 command present.
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.
Automatic summary 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 automatic summary 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 automatic summary address of 10.0.0.0, 10.2.0.0
is advertised out interface E1, and 10.0.0.0 is not advertised.
ip address 10.1.1.1 255.255.255.0
ip summary-address rip 10.2.0.0 255.255.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.
Restrictions to RIP Route Summarization
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:
ip summary-address rip 10.0.0.0 252.0.0.0 (invalid supernet summarization)
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:
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 router configuration command uses other options that are not applicable to RIP. Do not confuse Enhanced IGRP (EIGRP) summary address with the new RIP command,
ip summary-address rip.
Configuring Route Summarization on an Interface
The ip summary-address rip router configuration 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. To configure IP summary addressing, use the following commands beginning in global configuration mode:
|
Command
|
Purpose
|
Step 1
|
Router(config)# interface ethernet1
|
Enters interface configuration mode for the ethernet 1 port.
|
Step 2
|
Router(config-if)# ip summary-address rip ip_address ip_network_mask
|
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.
Verifying IP Route Summarization
You can verify which routes are summarized for an interface using the show ip protocols EXEC command. The following example shows potential summarizations and the associated interface summary address and network mask for Ethernet interface 2:
router# show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 8 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Automatic network summarization is not in effect
10.11.0.0/16 for Ethernet2
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. 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 10.11.0.0/16, with three child routes active:
router# show ip rip database
10.11.11.0/24 directly connected, Ethernet2
^^^^^^^^^^^^^^^^^^^^^^^^^^^
10.11.10.0/24 directly connected, Ethernet3
10.11.11.0/24 directly connected, Ethernet4
10.11.12.0/24 directly connected, Ethernet5
Disabling Automatic Route Summarization
RIP Version 2 supports automatic route summarization by default. The software summarizes subprefixes to the classful network boundary when crossing classful network boundaries.
If you have disconnected subnets, disable automatic route summarization to advertise the subnets. When route summarization is disabled, the software sends subnet and host routing information across classful network boundaries. To disable automatic summarization, use the following command in router configuration mode:
Command
|
Purpose
|
Router(config-router)# no auto-summary
|
Disables automatic summarization.
|
Running IGRP and RIP Concurrently
It is possible to run Interior Gateway Routing Protocol (IGRP) and RIP concurrently. The IGRP information will override the RIP information by default because of the administrative distance of IGRP.
However, running IGRP and RIP concurrently does not work well when the network topology changes. Because IGRP and RIP have different update timers, and because they require different amounts of time to propagate routing updates, one part of the network will accept and use IGRP routes and another part will accept and use RIP routes. Running IGRP and RIP concurrently will result in routing loops. Even though these loops do not exist for very long, the time-to-live (TTL) value will quickly reach zero, and Internet Control Message Protocol (ICMP) will send a "TTL exceeded" message. This message will cause most applications to stop attempting network connections.
Disabling the Validation of Source IP Addresses
By default, the software validates the source IP address of incoming RIP routing updates. If that source address is not valid, the software discards the routing update.
You might want to disable this feature if you have a router that is "off network" and you want to receive its updates. However, disabling this feature is not recommended under normal circumstances. To disable the default function that validates the source IP addresses of incoming routing updates, use the following command in router configuration mode:
Command
|
Purpose
|
Router(config-router)# no validate-update-source
|
Disables the validation of the source IP address of incoming RIP routing updates.
|
Enabling or Disabling Split Horizon
Normally, routers that are connected to broadcast-type IP networks and that use distance-vector routing protocols employ the split horizon mechanism to reduce the possibility of routing loops. Split horizon blocks information about routes from being advertised by a router out of any interface from which that information originated. This behavior usually optimizes communications among multiple routers, particularly when links are broken. However, with nonbroadcast networks (such as Frame Relay and Switched Multimegabit Digital System [SMDS]), situations can arise for which this behavior is less than ideal. For these situations, you might want to disable split horizon with IGRP and RIP.
If an interface is configured with secondary IP addresses and split horizon is enabled, updates might not be sourced by every secondary address. One routing update is sourced per network number unless split horizon is disabled.
To enable or disable split horizon, use the following commands in interface configuration mode, as needed:
Command
|
Purposes
|
Router(config-if)# ip split-horizon
|
Enables split horizon.
|
Router(config-if)# no ip split-horizon
|
Disables split horizon.
|
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 "Split Horizon 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 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.
Configuring Interpacket Delay
By default, the software adds no delay between packets in a multiple-packet RIP update being sent. If you have a high-end router sending to a low-speed router, you might want to add such interpacket delay to RIP updates, in the range of 8 to 50 milliseconds. To do so, use the following command in router configuration mode:
Command
|
Purpose
|
Router(config-router)# output-delay delay
|
Adds interpacket delay for RIP updates sent.
|
Connecting RIP to a WAN
Routers are used on connection-oriented networks to allow potential connectivity to many remote destinations. Circuits on the WAN are established on demand and are relinquished when the traffic subsides. Depending on the application, the connection between any two sites for user data could be short and relatively infrequent.
There are two problems using RIP to connect to a WAN:
•
Periodic broadcasting by RIP generally prevents 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 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.
To enable triggered extensions to RIP, use the following commands in global configuration mode:
|
Command
|
Purpose
|
Step 1
|
Router(config)# interface serial controller-number
|
Configures a serial interface.
|
Step 2
|
Router(config-if)# ip rip triggered
|
Enables triggered extensions to RIP.
|
To display the contents of the RIP private database, use the following command in EXEC mode:
Command
|
Purpose
|
Router# show ip rip database [prefix mask]
|
Displays the contents of the RIP private database.
|
RIP Configuration Examples
The following section provides RIP configuration examples:
•
Route Summarization Examples
•
Split Horizon Examples
•
Address Family Timers Example
Route Summarization Examples
A correct and an incorrect configuration example of route summarization are provided.
Example 1: Correct Configuration
The following example shows how the ip summary-address rip router configuration command works with automatic summary 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 automatic summary address of 10.0.0.0, so that 10.2.0.0 is advertised out Ethernet interface 1 and 10.0.0.0 is not advertised.
Note If split horizon is enabled, neither automatic summary nor interface summary addresses (those configured with the
ip summary-address rip router configuration command) are advertised.
Router(config)# router rip
Router(config-router)# network 10.0.0.0
Router(config-router)# exit
Router(config)# interface ethernet1
Router(config-if)# ip address 10.1.1.1 255.255.255.0
Router(config-if)# ip summary-address rip 10.2.0.0 255.255.0.0
Router(config-if)# no ip split-horizon
Example 2: Incorrect Configuration
The following example shows an illegal use of the ip summary-address rip router configuration 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.
Router(config)# interface ethernet1
Router(config-if)# ip summary-address rip 10.1.0.0 255.255.0.0
Rotuer(config-if)# ip summary-address rip 10.2.0.0 255.255.255.0
Split Horizon Examples
Two examples of configuring split horizon are provided.
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.
Example 2
In the next example,
Figure 35 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.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.
Figure 35 shows the topology and interfaces.
Figure 35 Disabled Split Horizon Example for Frame Relay Network
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
encapsulation frame-relay
Configuration for Router B
encapsulation frame-relay
Configuration for Router C
ip address 192.168.1.1 secondary
encapsulation frame-relay
Address Family Timers Example
The following example shows how to adjust individual address family timers.
Note that the address family "notusingtimers" will use the system defaults of 30, 180, 180, and 240 even though timer values of 5, 10, 15, and 20 are used under the general RIP configuration. Address family timers are not inherited from the general RIP configuration.
Router(config)#router rip
Router(config-router)# version 2
Router(config-router)# timers basic 5 10 15 20
Router(config-router)# redistribute connected
Router(config-router)# network 5.0.0.0
Router(config-router)# default-metric 10
Router(config-router)# no auto-summary
Router(config-router)# address-family ipv4 vrf foo
Router(config-router-af)# timers basic 10 20 20 20
Router(config-router-af)# redistribute connected
Router(config-router-af)# network 10.0.0.0
Router(config-router-af)# default-metric 5
Router(config-router-af)# no auto-summary
Router(config-router-af)# version 2
Router(config-router-af)# exit-address-family
Router(config-router)# address-family ipv4 vrf bar
Router(config-router-af)# timers basic 20 40 60 80
Router(config-router-af)# redistribute connected
Router(config-router-af)# network 20.0.0.0
Router(config-router-af)# default-metric 2
Router(config-router-af)# no auto-summary
Router(config-router-af)# version 2
Router(config-router-af)# exit-address-family
Router(config-router)# address-family ipv4 vrf notusingtimers
Router(config-router-af)# redistribute connected
Router(config-router-af)# network 20.0.0.0
Router(config-router-af)# default-metric 2
Router(config-router-af)# no auto-summary
Router(config-router-af)# version 2
Router(config-router-af)# exit-address-family