Routing Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Release

PDF

Configure RIP

Want to summarize with AI?

Log in

Teaches you how to enable the RIP process, define neighbors, and configure interface packet send and receive behavior for RIP version handling.


This reference provides the necessary commands to enable the RIP routing process, configure neighbor routers, and define version-specific packet handling for RIP interfaces.

Note

To save configuration changes, you must commit changes when the system prompts you.

Although you can configure RIP before you configure an IP address, no RIP routing occurs until at least one IP address is configured.


Enable RIP

Use this task to enable RIP routing and establish a RIP routing process.

Before you begin

You can configure RIP before you configure an IP address. However, RIP routing does not occur until at least one IP address is configured.

This example uses neighbor address 172.160.1.2 and interface GigabitEthernet 0/1/0/0. Replace these sample values with values from your environment.

Procedure

1.

Enter RIP configuration mode and configure a RIP neighbor.

Example:

Router# configure
Router(config)# router rip
Router(config-rip)# neighbor 172.160.1.2
2.

Configure RIP to send Version 2 packets to the broadcast IP address.

You can apply this command at the interface level or the global RIP configuration level.

Example:

Router(config-rip)# broadcast-for-v2
3.

Configure the RIP interface to receive and send RIP Version 1 and Version 2 packets.

Example:

Router(config-rip)# interface GigabitEthernet 0/1/0/0
Router(config-rip-if)# receive version 1 2
Router(config-rip-if)# send version 1 2
Router(config-rip-if)# commit

RIP is enabled, the neighbor is configured, and the interface is set to send and receive RIP Version 1 and Version 2 packets.

Basic RIP configuration example

This example shows two Gigabit Ethernet interfaces configured with RIP.

Router(config)# interface GigabitEthernet0/6/0/0
Router(config-if)# ipv4 address 172.16.0.1 255.255.255.0
Router(config-if)# exit
Router(config)# interface GigabitEthernet0/6/0/2
Router(config-if)# ipv4 address 172.16.2.12 255.255.255.0
Router(config-if)# exit
Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/6/0/0
Router(config-rip-if)# exit
Router(config-rip)# interface GigabitEthernet0/6/0/2

RIP configuration on a provider edge router example

This example shows how to configure basic RIP on the provider edge router with two VPN routing and forwarding (VRF) instances.

Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/6/0/0
Router(config-rip-if)# exit
Router(config-rip)# vrf vpn0
Router(config-rip-vrf)# interface GigabitEthernet0/6/0/2
Router(config-rip-if)# exit
Router(config-rip-vrf)# exit
Router(config-rip)# vrf vpn1
Router(config-rip-vrf)# interface GigabitEthernet0/6/0/3

Customize RIP behavior

Use this task to customize RIP for network timing and the acceptance of route entries.

This example uses interface GigabitEthernet 0/1/0/0. Replace the sample interface and timer values with values from your environment.

Each command in this task is optional. Configure only the settings that your network requires.

Procedure

1.

Enter RIP configuration mode.

Example:

Router# configure
Router(config)# router rip
2.

Enable automatic route summarization.

By default, auto-summary is disabled. If the network contains disconnected subnets, use the no form of this command so that the router can send subnet and host routing information across classful network boundaries.

Example:

Router(config-rip)# auto-summary
3.

Configure RIP network timers.

Use this command to adjust the RIP update, invalid, holddown, and flush timers. You can view the current and default timer values in the output of the show rip command.

Example:

Router(config-rip)# timers basic 5 15 15 30
4.

Configure the delay between RIP update packets.

Use this command when a high-end router sends updates to a lower-speed router that cannot receive packets at the default rate.

Example:

Router(config-rip)# output-delay 10
5.

Enable nonstop forwarding (NSF) for RIP routes.

Example:

Router(config-rip)# nsf
6.

Enter RIP interface configuration mode.

Example:

Router(config-rip)# interface GigabitEthernet 0/1/0/0
7.

Allow the interface to accept route entries that are received with metric zero.

The router changes a received metric of zero to a metric of one.

Example:

Router(config-rip-if)# metric-zero-accept
8.

Disable split horizon on the interface.

Split horizon is enabled by default. Change this setting only if the network requires a different advertisement behavior.

Example:

Router(config-rip-if)# split-horizon disable
9.

Enable poison reverse processing for RIP updates and commit the configuration.

Example:

Router(config-rip-if)# poison-reverse
Router(config-rip-if)# commit

The router applies the configured RIP customization settings.

RIP uses the configured route summarization, timers, delay, NSF, and interface settings.

RIP timer configuration for each VRF example

This example shows how to adjust RIP timers for each VPN routing and forwarding (VRF) instance.

For VRF instance vpn0, the timers basic command sets the update, invalid, suppression, and flush timers to 10, 30, 30, and 45 seconds.

For VRF instance vpn1, the timers basic command sets the timers to 20, 60, 60, and 70 seconds. The output-delay command sets the delay between RIP update packets to 10 milliseconds.

Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/6/0/0
Router(config-rip-if)# exit
Router(config-rip)# vrf vpn0
Router(config-rip-vrf)# interface GigabitEthernet0/6/0/2
Router(config-rip-if)# exit
Router(config-rip-vrf)# timers basic 10 30 30 45
Router(config-rip-vrf)# exit
Router(config-rip)# vrf vpn1
Router(config-rip-vrf)# interface GigabitEthernet0/6/0/3
Router(config-rip-if)# exit
Router(config-rip-vrf)# timers basic 20 60 60 70
Router(config-rip-vrf)# output-delay 10
Router(config-rip-vrf)# commit

Configure default route origination for RIP

Starting from IOS XR Release 7.5.2, if a router is configured with the default-information originate command, it ignores default routes that it receives from RIP peers. The router does not accept or install a peer-advertised default route in the RIP database or the RIB.

Before you begin

Configure RIP to advertise the default route 0.0.0.0/0 to RIP peers. A receiving router can install the default route in the RIP database and the routing information base (RIB).

Procedure

Enter the RIP configuration mode and enable the default route advertisement.

Example:

Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/2/0/0
Router(config-rip-if)# exit
Router(config-rip)# default-information originate

Control RIP routing updates

Use this task to control or prevent RIP routing update exchange and propagation.

You can control RIP updates to reduce update traffic on WAN links, help prevent routing loops, filter received route information, prevent dynamic route processing on an interface, and preserve bandwidth.

This example uses neighbor address 172.160.1.2 and interfaces GigabitEthernet 0/1/0/0 and GigabitEthernet 0/2/0/0. Replace these sample values with values from your environment.

Procedure

1.

Enter RIP configuration mode, configure a RIP neighbor, and enter RIP interface configuration mode.

Example:

Router# configure
Router(config)# router rip
Router(config-rip)# neighbor 172.160.1.2
Router(config-rip)# interface GigabitEthernet 0/1/0/0
2.

Suppress RIP updates on the interface.

This command suppresses RIP updates on the interface, but the router can still send updates to explicitly configured neighbors.

Example:

Router(config-rip-if)# passive-interface
Router(config-rip-if)# exit
3.

Apply a route policy to a RIP interface and commit the configuration.

You can use a route policy to control the updates that the router advertises or receives on the interface.

Example:

Router(config-rip)# interface GigabitEthernet 0/2/0/0
Router(config-rip-if)# route-policy out
Router(config-rip-if)# commit

The router controls RIP update exchange on the selected interfaces and neighbors.

RIP passive interface and explicit neighbor example

This example shows how to configure passive interfaces and explicit neighbors. When an interface is passive, it receives routing updates but does not send them unless the destination is an explicitly configured neighbor.

Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/6/0/0
Router(config-rip-if)# passive-interface
Router(config-rip-if)# exit
Router(config-rip)# interface GigabitEthernet0/6/0/2
Router(config-rip-if)# exit
Router(config-rip)# neighbor 172.17.0.1
Router(config-rip)# neighbor 172.18.0.5

RIP route control example

This example shows how to use the distance command to control the installation of RIP routes in the Routing Information Base (RIB) and how to use the maximum-paths command to control the number of parallel paths for each RIP route.

Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/6/0/0
Router(config-rip-if)# route-policy polin in
Router(config-rip-if)# exit
Router(config-rip)# distance 110
Router(config-rip)# maximum-paths 8

Create route policies for RIP

A route policy starts with the route-policy command, policy statements are added to the route policy, and it ends with the end-policy command. A route policy is useful only when it is applied to a routing protocol’s routes.

Procedure

1.

Create the route policy.

Example:

Router# configure
Router(config)# route-policy IN-IPv4
2.

Set the RIP metric attribute and commit the configuration.

This example sets the RIP metric to 42 for routes that match the policy.

Example:

Router(config-rpl)# set rip metric 42
Router(config-rpl)# end-policy
Router(config-rpl)# commit
3.

Apply the routing policy to updates advertised to or received from an RIP neighbor.

Use the route policy direction that matches your requirement.

Table 1. Route policy direction

If...

Then...

You want to filter or modify received RIP updates.

Apply the policy with the in keyword.

You want to filter or modify advertised RIP updates.

Apply the policy with the out keyword.

Example:

Router# configure
Router(config)# router rip
Router(config-rip)# route-policy IN-IPv4 in
Router(config-rip)# commit

Redistribute routes into RIP

This example shows how to redistribute Border Gateway Protocol (BGP) and static routes into RIP.

The RIP metric for redistributed routes is determined by the route policy. If no route policy is configured, or if the route policy does not set the RIP metric, the metric is derived from the redistributed protocol. For VPNv4 routes redistributed by BGP, the router uses the RIP metric set on the remote provider edge (PE) router when that metric is valid.

For BGP, IS-IS, OSPF, EIGRP, connected, and static routes in other cases, the router uses the metric configured by the default-metric command. If the router cannot determine a valid metric, redistribution does not occur.

Router(config)# route-policy ripred
Router(config-rpl)# set rip metric 5
Router(config-rpl)# end-policy

Router(config)# router rip vrf vpn0
Router(config-rip)# interface GigabitEthernet0/6/0/2
Router(config-rip)# redistribute connected default-metric 3
Router(config-rip)# vrf vpn1
Router(config-rip-vrf)# interface GigabitEthernet0/6/0/3
Router(config-rip-vrf)# redistribute bgp 100 route-policy ripred
Router(config-rip-vrf)# redistribute static
Router(config-rip-vrf)# default-metric 3

Configure inbound and outbound route policies for RIP

This example shows how to configure inbound and outbound route policies to control which route updates a RIP interface receives and sends.

Router(config)# prefix-set pf1 10.1.0.0/24
Router(config-pfx)# end-set

Router(config)# prefix-set pf2 198.51.100.0/24
Router(config-pfx)# end-set

Router(config)# route-policy policy_in
Router(config-rpl)# if destination in pf1 then
Router(config-rpl-if)# pass
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy

Router(config)# route-policy pass-all
Router(config-rpl)# pass
Router(config-rpl)# end-policy

Router(config)# route-policy infil
Router(config-rpl)# if destination in pf2 then
Router(config-rpl-if)# add rip metric 2
Router(config-rpl-if)# pass
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy

Router(config)# router rip
Router(config-rip)# interface GigabitEthernet0/6/0/0
Router(config-rip-if)# route-policy policy_in in
Router(config-rip)# interface GigabitEthernet0/6/0/2
Router(config-rip-if)# route-policy infil in
Router(config-rip-if)# route-policy pass-all out

Configure RIP authentication keychain

Use this task to configure keyed message digest 5 (MD5) or clear-text authentication for RIP on an interface.

Configure all keychains in the Cisco IOS XR keychain database before you apply them to a RIP interface or VRF.

The authentication keychain and mode md5 commands accept a keychain name that is not yet configured in the IOS XR keychain database, or a keychain that does not use the MD5 cryptographic algorithm. In either case, the router drops all incoming packets on the interface and sends outgoing packets without authentication data.

Before you begin

  • Configure the required keychain in the Cisco IOS XR keychain database.

  • Review the keychain configuration commands in the Implementing Keychain Management module of the System Security Configuration Guide.

  • Ensure that RIP is enabled on the router.

Procedure

1.

Enter RIP configuration mode.

Example:

Router# configure
Router(config)# router rip
2.

If you are configuring a non-default VRF, enter the VRF and interface configuration mode.

Example:

Router(config-rip)# vrf vrf_rip_auth
Router(config-rip-vrf)# interface POS 0/6/0/0

Skip this step if you are configuring the default VRF.

3.

If you are configuring the default VRF, enter the interface configuration mode.

Example:

Router(config-rip)# interface POS 0/6/0/0

Use this step only for the default VRF.

4.

Apply the authentication keychain to the interface.

Example:

Router(config-rip-if)# authentication keychain key1 mode md5
  • authentication keychain key1 mode md5

  • authentication keychain key1 mode text

Use md5 for keyed message digest authentication or text for clear-text authentication.

5.

Commit the configuration.

Example:

Router(config-rip-if)# commit

The RIP interface uses the configured keychain for authentication in the selected VRF.

Apply a RIP authentication keychain on a default VRF interface

Router(config)# router rip
Router(config-rip)# interface POS0/6/0/0
Router(config-rip-if)# authentication keychain key1 mode md5
Router(config-rip-if)# end

Apply a RIP authentication keychain on a non-default VRF interface

Router(config)# router rip
Router(config-rip)# vrf rip_keychain_vrf
Router(config-rip-vrf)# interface POS0/6/0/0
Router(config-rip-if)# authentication keychain key1 mode md5
Router(config-rip-if)# end