Like this article? We recommend

The Routing Information Protocol (RIP) is an interior routing protocol that has been around for a long time (think the 80’s) that can be used to dynamically route IP inside small-to-medium sized networks. RIP, while not commonly used in production networks anymore, is typically taught to new network engineers to introduce the concepts of dynamic routing. RIP is a simple protocol (in comparison to other dynamic routing protocols) and can easily be configured to work on Cisco equipment. This article goes over the basic concepts of RIP, how it operates, and how it can be configured to operate on Cisco equipment.

RIP Concepts

The first thing to understand is that RIP is a distance vector protocol. What this means is that it learns routes from its neighbors alone, all routing information obtained from neighbors is trusted, and assumed correct; this style of learning is also referred to as “routing by rumor.” The metric (distance) used by RIP is a hop count; each device that a packet crosses on its way to a destination is counted as an additional “hop.” While RIP is not commonly used any more it was always limited to small-to-medium sized networks because it only supports a maximum hop count of 15.

A RIP device sends out a multicast or broadcast message advertising all of the routes that it knows about every 30 seconds. This information is then used by the neighboring router to build its routing table, and the information is then added to the neighboring router’s reachable networks and is resent out its interfaces (also every 30 seconds), and so on; this is how the RIP routing database is built throughout the network. Along with the updates that are sent every 30 seconds, RIP also supports flash updates. A flash update will occur when a router learns of a route reachability change; when this happens it will flood out the change immediately.

There are three different concepts that must be reviewed that are used by RIP to avoid routing loops and maintain a stable network: split horizon, route poisoning, and RIP timers.

Split Horizon

In normal operation, RIP will learn routes from other neighboring routers and add them to its own routing database before sending out a routing update out its RIP interfaces. Split horizon prevents RIP from sending out an advertisement of a network that was also learned on that same interface. So if the 192.168.1.0 network was learned on interface f0/0, it will not be advertised out the f0/0 interface by RIP.

Route Poisoning

Route poisoning occurs when a RIP device learns that a route to a destination has failed. When this happens RIP will advertise the failed destination out ALL of its interfaces with a metric of 16 (which is considered unreachable); this tells all of its neighbors that it no longer has a route to that specific network.

RIP Timers

There are a number of different timers that are used by RIP to maintain operations: update, invalid, flush, and holddown timers. The update timer is used to identify when RIP sends out scheduled updates; by default this is 30 seconds, as referred to above. The invalid timer is used by RIP to determine the validity of a routing entry. By default, if no update has been received about a specific route for 180 seconds, it will be considered invalid and marked with a metric of 16 (see Route Poisoning above). The flush timer is used to determine when a route is removed from the RIP database. By default, if no update has been received about a specific route for 240 seconds, it will be removed from the RIP database. The holddown timer is used to stabilize the RIP routes in the network; after a route has a metric change to the route, the holddown timer is started and no additional updates will happen with that route until the holddown timer expires; by default, the holddown timer is set to 180 seconds.

Another major topic to cover is RIP version; there are two different versions of RIP that differ in their abilities. RIP version 1 sends out updates via broadcast (255.255.255.255) and does not support Variable Length Subnet Masking (VLSM). Version 2 sends out updates via multicast (224.0.0.9), supports VLSM and adds support for authentication. Devices running RIPv2 are backward compatible and individual interfaces can be configured to advertise out only v1 or v2 updates.

RIP Configuration Commands

The configuration of RIP is not all that complex; this section reviews the different commands that can be used to configure RIP.

The router rip command is the beginning of any Cisco IOS RIP configuration; it is used to create or modify an existing RIP routing process and enters the user into RIP router configuration mode.

The version {1 | 2} command is used to tell the device which version of RIP to run; a RIP version 2 router is able to communicate with version 1 routers. By default, Cisco IOS devices will send out RIP version updates and support the receipt of RIP version 1 and version 2 updates.

The network command is used to identify which device interfaces will be included within the RIP process. Unlike some other routing protocol configurations, the network command when used with RIP does not support a mask.

The timers basic update invalid holddown flush command is used to change the default RIP timers; the default settings for these timers are covered in the above sections.

To dictate when version of RIP updates are allowed to be sent out an interface the ip rip send version {1 | 2} command is used.

To dictate when version of RIP updates are allowed to be received on an interface the ip rip receive version {1 | 2} command is used.

RIP Configuration

As stated above, the configuration of RIP is not complex. Table 1 below shows the steps required to configure RIP on a device.

Table 1
RIP
Configuration

1

Enter global configuration mode.

router#configure terminal

2

Create an RIP routing process and enter router configuration mode.

router(config)#router rip

3

Configure the interfaces that RIP will be enabled on.

router(config-router)#network network

4

Configure the version of RIP (optional).

router(config-router)#version {1 | 2}

5

Configure the RIP timers (optional).

router(config-router)#timers basic update invalid holddown flush

It is also possible to change the version of RIP that is used on a specific interface. Table 2 below shows the steps required to change the RIP version used on an interface:

Table 2
RIP
Interface Configuration

1

Enter global configuration mode.

router#configure terminal

2

Enter interface configuration mode.

router(config)#interface interface

3

Configure the RIP send version.

router(config-if)#ip rip send version {1 | 2}

4

Configure the RIP receive version.

router(config-if)#ip rip receive version {1 | 2}

RIP Configuration Example

The topology shown in Figure 1 below will be used as a basis for the example shown in this section:

The steps required to configure this topology using RIP version 2 are shown in the next few tables; IP address configuration is assumed already complete.

Table 3
R1
RIP Configuration

1

Enter global configuration mode.

R1#configure terminal

2

Enter RIP router configuration mode.

R1(config)#router rip

3

Configure RIP version 2.

R1(config-router)#version 2

4

Configure the 172.16.0.0 networks into RIP.

R1(config-router)#network 172.16.0.0

5

Configure the 192.168.1.0 network into RIP.

R1(config-router)#network 192.168.1.0

Table 4
R2
RIP Configuration

1

Enter global configuration mode.

R2#configure terminal

2

Enter RIP router configuration mode.

R2(config)#router rip

3

Configure RIP version 2.

R2(config-router)#version 2

4

Configure the 172.16.0.0 networks into RIP.

R2(config-router)#network 172.16.0.0

5

Configure the 192.168.2.0 network into RIP.

R2(config-router)#network 192.168.2.0

Table 5
R3
RIP Configuration

1

Enter global configuration mode.

R3#configure terminal

2

Enter RIP router configuration mode.

R3(config)#router rip

3

Configure RIP version 2.

R3(config-router)#version 2

4

Configure the 172.16.0.0 networks into RIP.

R3(config-router)#network 172.16.0.0

5

Configure the 192.168.3.0 network into RIP.

R3(config-router)#network 192.168.3.0

Summary

The learning of RIP is a first step in the education of most network engineers. Because the protocol is such an easy example of distance vector protocols and uses a simple to understand metric (hops), it makes the transition into learning more complex routing protocols easier. Hopefully the content of this article will make the transition into learning routing protocols easier as well and can be used as an easy short review of RIP concepts and configuration.