Configuring Routing Information Protocol (RIP)

Routing Information Protocol known as RIP is a fairly simplistic dynamic routing protocol which can be deployed in a matter of minutes. This lab will discuss and demonstrate the configuration and verification of basic RIP implementation.

Real World Application & Core Knowledge

So the big question is is how do you maintain a network using static routing when you have over 500+ subnet’s and 50+ routers? The simple answer is; you don’t. Of course you can but you would have to maintain hundreds of static routes and when something went wrong you’d have to be the routers brain and re-converge the network manually with a new static route that you must wake up at 3:00 in the morning to configure.

Welcome to the wonderful world of dynamic routing protocols. Routing Information Protocol; aka: RIP, will be the first of 3 dynamic routing protocols you must know as a CCNA network engineer. RIP was widely deployed in 1982 due to the inclusion of its code in the BSD 4.2 Unix OS then a few years later, June of 1988 became an IETF Standard. RIP Replaced GGP (Gateway to Gateway Protocol) which is a protocol you’ll never hear about again as its long gone and turned into ash.

Before you jump onto the router lets first discuss a little bit of the technology relating to RIP;

RIP is a distance vector routing protocol which has an administrative distance of 120 and uses the Bellman-Ford Algorithm. RIP uses hop counts as a metric to determine the best path to a network. e.g; If 10.70.10.0/24 is 2 routers away then its effectively 2 hop counts away thus having a metric of 2. Keep in mind that if you have a PC trying to get to a server on a network and one path has 2 hop counts which uses T1’s links and the other path has 3 hop and uses 3 DS3’s then the lower metric will be chosen.

RIP operated at UDP Port 520 by default. Version 1 uses a broadcast delivery mechanism for updates whereas version 2 uses multicast. This will be discussed further in detail in the next lab.

By standard; RIP utilizes three different timers to function properly however if you’re running RIP on a Cisco router a 4th timer will be used called the Hold Down timer. Timer functions given below;

Timer

Description

Update Timer

This interval at which “hello packets” are sent to neighboring routers. The Cisco Default is every 30 seconds +/- 5 Seconds to prevent synchronization

Invalid Timer

The invalid timer is the interval at which the router will mark the route(s) invalid by using a metric of 16 and advertise them with an unreachable metric (16). When a route is marked invalid on a Cisco router it is enters hold down. The Cisco default invalid timer is 180 Seconds.

Hold Down Timer

The hold down timer is the interval at which a specific route that has been previously marked invalid will be suppressed updates with an equal or greater metric. This timer is intended to prevent inaccurate routing updates (routing by rumor) till the topology has had the time to converge or a route with a better metric has been received.. The hold down timer is a Cisco extension of the RIP protocol and is not included int he IETF standard.

Flushed Timer

The interval at which after the invalid timer the router waits after a route has been marked invalid before it flushes it (removes it) from the routing table.

So lets have a run down of this shall we? R1 and R2 are connected via a Frame Relay T1 link and they both run RIP. R2 advertises 10.70.20.0/24 to R1 via RIP. However R2 randomly goes off line due to a power failure at the facility. R1 will wait 180 seconds (6 hello intervals) before all routes learned via R2 are declared invalid and marked unreachable by a metric of 16; The hold down timer also expires at the same time as the invalid timer does thus meaning the router will now accept any new routes to the previously marked unreachable learned via R2. If no new routes are learned during a period of 60 seconds after the invalid/hold time timers expire (the time it takes to count to the flush timer from the invalid timer)) then the route will be flushed (removed) from the routing table completely.

Now that you have a general understanding of how RIP operates lets further your knowledge and take a look at how RIP prevents routing loops in the network.

The RIP standard implements two different technologies to prevent routing loops; split-horizon and poison reverse. However Cisco has gone a step further and introduced the hold down timer which will prevent any route with a better metric from being injected into the routing table after a router has received an advertisement from an neighboring router saying that the route has been marked unreachable via a metric of 16. This helps prevent transient routing loops commonly caused by unstable (flapping) routes.

Split-horizon is a general loop avoidance mechanism commonly used by most distance vector protocols such as RIP, IGRP, EIGRP as well as newer technologies such as VPNS (Virtual Private Network Services) and Babel; a new IP routing protocol which is currently an experimental distance vector protocol. In general this mechanism prevents updates from being out the same interface in which they were received. After all; if R2 sent R1 and update about 10.70.20.0/24, would R2 need to hear that update back from R1? The answer is simply no.

However in some cases split-horizon must be disabled for proper network functionality; in one specific case is the Hub-and-Spoke topology in a frame relay network. The spoke will advertise its routes to the hub through an interface but the hub must re-advertise those updates back out the same physical interface to get to the other spokes. Split horizon is disabled on a per interface basis using the no ip split-horizon command.

Poison Reverse is a type of route poisoning mechanism in which case a RIP router will advertise the routes learned from a neighboring router with an unreachable hop count metric (16) back to its neighbor with the unreachable metric to ensure all routers on the segment is aware that that particular route is unreachable.

RIP maintains a database of all routes learned via its neighbors. This is known as the RIP Database and can be viewed using the show ip rip database command in user or privileged mode.

Now that you have a good understanding of RIP’s fundamental operation lets dive into the configuration. RIP is a single routing process on a particular router. With that being said you cannot have multiple RIP processes running like EIGRP which will be discussed in the next section.

To start the rip process you’ll use the router rip command in global configuration; after which you’ll be placed into dynamic routing configuration mode, denoted by the Router(config-router)# prompt. To assign networks to participate in the RIP routing process you’ll use the network x.x.x.x command. Any interfaces that falls in the specified network range will participate in the RIP routing process.

By default RIP will operate at Version 1 which is a classful version (does not support VLSM) and auto summarize so when you specify any network under the RIP routing process it will automatically be converted to its classful network address range such as 10.70.10.0 on R1 would be converted to 10.0.0.0

When working with RIP version 1 keep in mind that it is a classful routing protocol; meaning that the same subnet must be used for the entire network. So if you use a /24 on a switch where all the PC’s are aggregated at then you must use a /24 network on the WAN link between branches otherwise the /24 networks will not get propagated over the WAN link. RIPv1 does not include the subnet in the updates sent to neighboring routers; only the network address. So in laymen terms, a /24 can only be advertised to another router through through a link that uses a /24 network due to the neighboring router assuming the subnet mask is tied to the interface in which the update was received.

By default RIP will auto summarize at the network boundary. So with that being said you cannot have 10.0.0.0/8 network connected to R1 and R1 is connected to R2 via a class B 172.16.0.0/16 subnet which in turn is connected to R3 which also has the 10.0.0.0/8 subnet directly connected. This design will not work as traffic from R1’s 10.0.0.0/8 subnet will not traverse R2 to get to R3’s 10.0.0.0/8 subnet because R1 believes 10.0.0.0/8 is already directly connected.

Now that you’ve got a solid foundation of the Routing Information Protocol (RIP); its time to start configuring some routers. This lab will use the same topology as the previous section discussing static routing. You’re going to convert a static routed network into a dynamic RIP routed network. The topology is shown below;

Familiarize yourself with the following new command(s);

Command

Description

router rip

This command is executed in global configuration to start the RIP routing process on a router.

network x.x.x.x

This command is executed router configuration mode to specify the networks participating in the dynamic routing process.

show ip rip database

This command will display all the networks in the RIP database when executed in privileged or user mode.

show ip protocols

This command when executed in privileged or user mode will show the RIP routing process global configuration settings such as timers, networks, rip version (per interface) and other useful information.

Lab Prerequisites

If you are using GNS3 than load the Free CCNA Workbook GNS3 topology than start devices; R1, R2 and R3.

Establish a console session with devices R1, R2 and R3 than load the initial configurations provided below by copying the config from the textbox and pasting it into the respected routers console.

Lab Objectives

You are tasked with migrating the network from static routing to RIP. Remove all static routes currently configured on R1, R2 and R3.

Configure R1, R2 and R3 to run the Routing Information Protocol (RIP) and specify the classful network statement in which interfaces will participate in RIP dynamic routing process. Verify that RIP is running on R1 via the show ip protocols command.

Verify that routes are propagating properly from R1 to R2 and from R2 to R3; if not then why?

Lab Instruction

Objective 1. – You are tasked with migrating the network from static routing to RIP. Remove all static routes currently configured on R1, R2 and R3.

To view all current static routes you can use the show run with the inclusion of ip route

Objective 2. – Configure R1, R2 and R3 to run the Routing Information Protocol (RIP) and specify the classful network statement in which interfaces will participate in RIP dynamic routing process. Verify that RIP is running on R1 via the show ip protocols command.

As you can gather from the provided routing tables and rip databases that the /24 routes on the looback0 interfaces are not being propagated. Why not?

By default when configuring RIP it uses version 1 which cannot share subnet information so with that being the case RIP will not advertise a /24 subnet over a /30 subnet link. You can however configure the point to point frame relay links as /24 links and all routes will be propagated just fine. RIPv2 (Version 2) resolves this issue by using Variable Length Subnet Masking (VLSM) in the updates sent between routers. Continue on to the Lab 7-2 – Configuring RIP Version 1 and 2 to learn more about RIPv2.