0% found this document useful (0 votes)
208 views

Rip-Protocol-Configuration-Guide-With-Examples COMPLILED

RIP is an easy to configure distance vector routing protocol. The document provides step-by-step instructions to configure RIP routing on a sample network topology with 3 routers and 2 PCs. Key steps include assigning IP addresses to interfaces, enabling RIP with the router rip command, and advertising connected networks using the network command. The automatic rerouting function of RIP is demonstrated by simulating a link failure.

Uploaded by

Perbz Jay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
208 views

Rip-Protocol-Configuration-Guide-With-Examples COMPLILED

RIP is an easy to configure distance vector routing protocol. The document provides step-by-step instructions to configure RIP routing on a sample network topology with 3 routers and 2 PCs. Key steps include assigning IP addresses to interfaces, enabling RIP with the router rip command, and advertising connected networks using the network command. The automatic rerouting function of RIP is demonstrated by simulating a link failure.

Uploaded by

Perbz Jay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

RIP PROTOCOL CONFIGURATION GUIDE WITH EXAMPLES

RIP is the simplest and one of the oldest Distance Vector routing protocol. It is very easy to
setup and troubleshoot. In this tutorial we will explain how to configure RIP Routing protocol
with example. For demonstration we will use packet tracer network simulator software. You
can use real Cisco devices or any other network simulator software for following this guide.

Create a topology as illustrate in following figure or download pre-created topology from our
server.

Device Interface IP Configuration Connected with


PC0 Fast Ethernet 10.0.0.2/8 Router0s Fa0/1
Router0 Fa0/1 10.0.0.1/8 PC0s Fast Ethernet
Router0 S0/0/1 192.168.1.254/30 Router2s S0/0/1
Router0 S0/0/0 192.168.1.249/30 Router1s S0/0/0
Router1 S0/0/0 192.168.1.250/30 Router0s S0/0/0
Router1 S0/0/1 192.168.1.246/30 Router2s S0/0/0
Router2 S0/0/0 192.168.1.245/30 Router1s S0/0/1
Router2 S0/0/1 192.168.1.253/30 Router0s S0/0/1
Router2 Fa0/1 20.0.0.1/30 PC1s Fast Ethernet
PC1 Fast Ethernet 20.0.0.2/30 Router2s Fa0/1

Assign IP address to PCs


Double click PC0 and click Desktop menu item and click IP Configuration. Assign IP
address 10.0.0.2/8 to PC0.
Repeat same process for PC1 and assign IP address 20.0.0.2/8.

Assign IP address to interfaces of routers


Double click Router0 and click CLI and press Enter key to access the command prompt of
Router0.

Three interfaces FastEthernet0/0, Serial0/0/0 and Serial0/0/1 of Router0 are used in


this topology. By default interfaces on router are remain administratively down during the start
up.

We need to configure IP address and other parameters on interfaces before we could actually
use them for routing. Interface mode is used to assign IP address and other parameters.
Interface mode can be accessed from global configuration mode. Following commands are
used to access the global configuration mode.

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

From global configuration mode we can enter in interface mode. From there we can configure
the interface. Following commands will assign IP address on FastEthernet0/0.

Router(config)#interface fastEthernet 0/0


Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#

interface fastEthernet 0/0 command is used to enter in interface mode.

ip address 10.0.0.1 255.0.0.0 command will assign IP address to interface.

no shutdown command will bring the interface up.

exit command is used to return in global configuration mode.

Serial interface needs two additional parameters clock rate and bandwidth. Every serial cable
has two ends DTE and DCE. These parameters are always configured at DCE end.

We can use show controllers interface command from privilege mode to check the cables end.

Router#show controllers serial 0/0/0


Interface Serial0/0/0
Hardware is PowerQUICC MPC860
DCE V.35, clock rate 2000000
[Output omitted]

Fourth line of output confirms that DCE end of serial cable is attached. If you see DTE here
instead of DCE skip these parameters.

Now we have necessary information lets assign IP address to serial interface.

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 192.168.1.249 255.255.255.252
Router(config-if)#clock rate 64000
Router(config-if)#bandwidth 64
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 0/0/1
Router(config-if)#ip address 192.168.1.254 255.255.255.252
Router(config-if)#clock rate 64000
Router(config-if)#bandwidth 64
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#

Router#configure terminal Command is used to enter in global configuration mode.

Router(config)#interface serial 0/0/0 Command is used to enter in interface mode.

Router(config-if)#ip address 192.168.1.249 255.255.255.252 Command assigns IP


address to interface. For serial link we usually use IP address from /30 subnet.

Router(config-if)#clock rate 64000 And Router(config-if)#bandwidth 64 In real life


environment these parameters control the data flow between serial links and need to be set at
service providers end. In lab environment we need not to worry about these values. We can use
these values.

Router(config-if)#no shutdown Command brings interface up.

Router(config-if)#exit Command is used to return in global configuration mode.

We will use same commands to assign IP addresses on interfaces of remaining routers. We


need to provided clock rate and bandwidth only on DCE side of serial interface. Following
command will assign IP addresses on interface of Router1.

Router1

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 192.168.1.250 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 0/0/1
Router(config-if)#ip address 192.168.1.246 255.255.255.252
Router(config-if)#clock rate 64000
Router(config-if)#bandwidth 64
Router(config-if)#no shutdown
Router(config-if)#exit

Use same commands to assign IP addresses on interfaces of Router2.

Router2

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 192.168.1.245 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface serial 0/0/1
Router(config-if)#ip address 192.168.1.253 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#exit

Great job we have finished our half journey. Now routers have information about the networks
that they have on their own interfaces. Routers will not exchange this information between
them on their own. We need to implement RIP routing protocol that will insist them to share
this information.

Configure RIP routing protocol

Configuration of RIP protocol is much easier than you think. It requires only two steps to
configure the RIP routing.
Enable RIP routing protocol from global configuration mode.
Tell RIP routing protocol which networks you want to advertise.

Lets configure it in Router0

Router0

Router0(config)#router rip
Router0(config-router)# network 10.0.0.0
Router0(config-router)# network 192.168.1.252
Router0(config-router)# network 192.168.1.248

router rip command tell router to enable the RIP routing protocol.

network command allows us to specify the networks which we want to advertise. We only
need to specify the networks which are directly connected with the router.

Thats all we need to configure the RIP. Follow same steps on remaining routers.

Router1

Router1(config)#router rip
Router1(config-router)# network 192.168.1.244
Router1(config-router)# network 192.168.1.248

Router2

Router2(config)#router rip
Router2(config-router)# network 20.0.0.0
Router2(config-router)# network 192.168.1.252
Router2(config-router)# network 192.168.1.244

Thats it. Our network is ready to take the advantage of RIP routing. To verify the setup we will
use ping command. ping command is used to test the connectivity between two devices.

Access the command prompt of PC1 and use ping command to test the connectivity from PC0.
Good going we have successfully implemented RIP routing in our network. For cross check we
have uploaded a configured topology on our server. You can use that if not getting same output.

RIP protocol automatically manage all routes for us. If one route goes down, it automatically
switches to another available. To explain this process more clearly we have added one more
route in our network.

Currently there are two routes between PC0 and PC1.

Route 1

PC0 [Source / destination 10.0.0.2] Router0 [FastEthernet0/1 10.0.0.1] Router0


[Serial0/0/1 192.168.1.254] Router2 [Serial 0/0/1 192.168.1.253] Router2
[FastEthernet0/0 20.0.0.1] PC1 [Destination /source 20.0.0.2]

Route 2

PC0 [Source / destination 10.0.0.2] Router0 [FastEthernet0/1 10.0.0.1] Router0


[Serial0/0/0 192.168.1.249] Router1 [Serial 0/0/0 192.168.1.250] Router1 [Serial
0/0/1 192.168.1.246] Router2 [Serial 0/0/0 192.168.1.245] Router2
[FastEthernet0/0 20.0.0.1] PC1 [Destination /source 20.0.0.2]
By default RIP will use the route that has low hops counts between source and destination. In
our network route1 has low hops counts, so it will be selected. We can use tracert command
to verify it.

Now suppose route1 is down. We can simulate this situation by removing the cable attached
between Router0 [s0/0/1] and Router2 [s0/0/1].
Okay our primary route went down. What will be happen now?

So far we are running RIP routing protocol and have another route to destination, there is no
need to worry. RIP will automatically reroute the traffic. Use tracert command again to see
the magic of dynamic routing.
Thats all for this article. In next article we will explain another routing protocol with
examples.
RIP Routing protocol configuration commands summary

Command Description

Router(config)#router rip Enable RIP routing protocol

Add a.b.c.d network in RIP routing


Router(config-router)#network a.b.c.d
advertisement

Remove a.b.c.d network from RIP routing


Router(config-router)#no network a.b.c.d
advertisement

Enable RIP routing protocol version one (


Router(config-router)#version 1
default)

Router(config-router)#version 2 Enable RIP routing protocol version two

By default RIPv2 automatically summarize


Router(config-router)#no auto-summary networks in their default classful boundary.
This command will turn it off.

Router(config-router)#passive-interface RIP will not broadcast routing update from


s0/0/0 this interface

Router(config-router)#no ip split-horizon Disable split horizon ( Enable by default )

Router(config-router)#ip split-horizon Enable spilt horizon

Allow us to set RIP timer in seconds. 30


Router(config-router)#timers basic 30 90 (routing update), 90 (invalid timer), 180 (
180 270 360 Hold timer), 270 (Flush timer), 360 (sleep
timer)
Router(config)#no router rip Disable RIP routing protocol

Used for troubleshooting. Allow us to view


Router#debug ip rip
all RIP related activity in real time.

Router#show ip rip database Display RIP database including routes


RIP ROUTING INFORMATION
RIP is a distance vector routing protocol. It shares routing information through the local
broadcast in every 30 seconds. In this tutorial we will explain RIP routing fundamentals with
examples such as routing metric, rip timers, split horizon rules, hold down timers and
difference between RIPv1 and RIPv2.

Routers keep only one route information for one destination in routing table. Routers use AD
value and metric to select the route.

Administrative Distance

In a complex network, you may have multiple routing protocols running simultaneously.
Different routing protocols use different metrics to calculate the best path for destination. In
this situation router may receive different routes information for a single destination network.
Routers use AD value to select the best path among these routes. Lower ad value has more
trustworthiness.

AD value Protocol / Source


0 Directly connected interface
0 or 1 Static route
90 EIGRP
110 OSPF
120 RIP
255 Unknown source

Lets understand it with a simple example; a router learns two different paths for 20.0.0.0/8
network from RIP and OSPF. Which one should it select?

Answer of this question is hidden in above table. Check the AD value of both protocols.
Administrative distance is the believability of routing protocols. Routers measure each route
source on a scale of 0 to 255. 0 is the best route and 255 is the worst route. Router will never
use the route learned by this (255) source. In our question we have two protocols RIP and
OSPF. OSPF has lower AD value than RIP. So its route will be chosen for routing table.

Routing Metrics

We may have multiple links to the destination network. In this situation router may learn
multiple routes form same routing protocol. For example in following network we have two
routes between PC0 and PC1.
Route 1

PC0 [10.0.0.0/8] Router0 [Serial0/1 192.168.1.254] Router2 [Serial 0/1


192.168.1.253] PC1 [20.0.0.0/8]

Route 2

PC0 [10.0.0.0/8] Router0 [Serial0/0 192.168.1.249] Router1 [Serial 0/0


192.168.1.250] Router1 [Serial 0/1 192.168.1.246] Router2 [Serial 0/0 192.168.1.245]
PC1 [20.0.0.0/8]

In this situation Router uses metric to select the best path. Metric is a measurement which is
used to select the best path from multiple paths learned by a routing protocol. RIP use hop
count as metric to determine the best path. Hops are the number of layer3 devices which a
packet crossed before reaching at destination.

RIP is a distance vector routing protocol. It uses distance [accumulated metric value] and
direction [vector] to find and select the best path for destination network. We have explained
this process with example in our first part of this article.

Okay now understand the concept of metric; tell me which route will Router0 use to reach at
20.0.0.0/8 network?

If it selects S0/1 [192.168.1.245/30] route, it has to cross single layer 3 device.


If it takes S0/0 [19.168.1.254/30] route, it will have to cross two layer 3 devices [Router1 and
latter Router2] to get the destination network.

So it will take the first route to get 20.0.0.0/8 network.

Routing by Rumor

Sometimes RIP is also known as routing by rumor protocol. Because it learns routing
information from directly connected neighbors and assume that these neighbors might have
learned from their neighbors.

Advertising Updates

RIP periodically broadcast routing information from all of its ports. It uses local broadcast with
destination IP of 255.255.255.255. While broadcasting it doesnt care who listen these broadcast
or not. It doesnt use any mechanism to verify the listener. RIP assumes that if any neighbor
missed any update, it will learn from next update or from any other neighbors.

Passive interface

By default RIP broadcasts are sent from all interfaces. RIP allows us to control this behavior.
We can configure which interface should send RIP broadcast or which not. Once we mark any
interface as passive interface, RIP will stop sending updates from that interface.

Split Horizon

Split horizon is a mechanism that states if a router receives an update for a route on any
interface, it will not propagate the same route information back to the sender router on same
port. Split horizon is used to avoid routing loops.
To understand this function more clearly lets take an example. Following network is using
RIP protocol. R1 is advertising 10.0.0.0/8. R2 is receiving this information on S0/0 port.
Once R2 learnt about 10.0.0.0/8 network it will include it in its next routing update. Without
split horizon it will advertise this route information back to R1 on S0/0 port.

Well R1 will not place this route in routing table because it has higher distance. But at the same
it will not ignore this update. It will assume that R1 know a separate route to reach at 10.0.0.0/8
network, but that route has higher distance than the route I know. So I will not use that route
to reach at 10.0.0.0/8 so far my route is working. But I can use that route if my route goes
down. So it could work as a backup route for me.
This assumption creates a serious network issue. For example what happen if R1s F0/0
interface goes down? R1 has a direct link for 10.0.0.0/8 so it will immediately learn about this
change.

In this situation if R1 receives a packet for 10.0.0.0/8, instead of dropping that packet, it will
forward it from S0/0 to R2. Because R1 thinks R2 has an alternative route to reach at 10.0.0.0/8.

R2 will return this packet back to R1. Because R2 think R1 has a route to reach at 10.0.0.0/8.

This will create a network loop where actual route is down but R1 is thinking that R2 has a
route for destination while R2 is thinking that R1 has a way to reach the destination. Thus this
packet will be circle around between R1 and R2 endlessly. To prevent this issue RIP uses hop
(router) count mechanism.

Hop count

RIP counts every hop (router) which a packet crossed to reach the destination. It limits the
number of hop to 15. RIP uses TTL filed of packet to trace the number of hops. For each passing
hop RIP decrement the TTL value by 1. If this value reaches to 0, packet will be dropped.

This solution only prevents a packet from trapping into the loop. It does not solve routing loop
problem.

Split horizon solves this problem. If split horizon is enabled, learner router will never
broadcast the same route information back to the sender. In our network R2 learned 10.0.0.0/8
network information from R1 on S0/0, so it will never broadcast network 10.0.0.0/8
information back to R1 on S0/0.

This solves our problem. If R1s F0/0 interface is down, both R1 and R2 would realize that
there is no alternative route to reach at the 10.0.0.0/8 network.

To avoid network loops RIP deploy two more functions route poison and hold down timers.

Route poisoning

Route poisoning works in inverse mode of split horizon. When a router notices that any one
of its directly connected route has failed, it will poison that route. By default a packet can travel
only 15 hops in RIP. Any route beyond the 15 hops is invalid route for RIP. In a route failure
condition, RIP assign a value higher than 15 to that specific route. This procedure is known as
route poisoning. Poisoned route will be broadcast from all active interfaces. Receiving
neighbor will ignore the split horizon rule by broadcasting the same poisoned route back to
the sender. This process insure that every router update about a poisoned route.

RIP Timers
For better network optimization RIP uses four types of timers.

Hold down timer

RIP use hold down timer to give the routers enough time for propagating the poisoned route
information in network. When router receives a poisoned route, it freezes that route in its
routing table for a period of hold timer. During this period router will not use this route for
routing. Holddown period will be aborted only if router receives an update with same or
better information for route. Default hold timer value is 180 seconds.

Route Invalid Timer

This timer is used to keep the track of discovered routes. If router does not receive an update
for a route in 180 seconds it will mark that route as invalid route and broadcast an update to
all neighbors letting them know that route is invalid.

Route Flush Timer

This timer is used to set an interval for a route that becomes invalid and its removal from
routing table. Before removing an invalid route from routing table, it must update the
neighboring routers about the invalid route. This timer gives enough time to updates the
neighbors before invalid route is removed from routing table. Default route flush timer is set
to 240 seconds.

Update Timer

RIP broadcast routing updates in every 30 seconds. It will do this continuously, whether
something is changed in routing information or not. Once 30 seconds are expired router
running RIP will broadcast its routing information from all of its interfaces.

RIP is the oldest distance vector protocol. To meet the current network requirement it has been
updated with RIPv2. RIPv2 is also a distance vector protocol with maximum 15 hop counts.

You can still use RIPv1 but it is not advisable. Following table lists key difference between
RIPv1 and RIPv2.

Key differences between RIPv1 and RIPv2

RIPv1 RIPv2
It uses broadcast for routing update. It use multicast for routing update.
It sends broadcast on 255.255.255.255 It sends multicast on 224.0.0.9 destination.
destination.
It does not support VLSM. It supports VLSM.
It does not support any authentication. It supports MD5 authentication
It only supports classful routing. It supports both classful and classless
routing.
It does not support discontiguous network. It supports discontiguous network.

BASIC OPPERATIONS OF RIP PROTOCOLS


RIP is a routing protocol which exchanges network information between routers dynamically.
It uses broadcast to share routing information. In this tutorial we will explain basic concept of
RIP protocol including the process it uses to share information with examples.

Routers aware only about the networks those are directly connected with them. For example
in following network R1 only aware about the 10.0.0.0/8 and 192.168.1.252/30 network.

So if it receives a packet for 20.0.0.0/8 from 10.0.0.0/8 network on F0/1 port, it will drop that
packet. This is the default behavior of router. By default routers are configured to drop all
unmatched packets.

Router can learn about the remote network in two ways; static and dynamic.
In static method we have to update router manually. In dynamic method router will be
updated by a routing protocol.
In dynamic method this process is done by a routing protocol. Several routing protocols are
available to choose from such RIP, OSPF, IGRP and EIGRP. In this tutorial we will explain RIP
routing protocol.

RIP Routing Protocol

In RIP protocol routers learn about the destination networks from neighboring routers through
the sharing process. Routers running RIP protocol periodically broadcast the configured
networks from all ports. Listing routers will update their routing table based on this
information.

Lets see how this process works step by step. Following figure illustrate a simple network
running RIP routing protocol.

When we start this network, Routers are aware only about the directly connected network.

R1 knows that network 10.0.0.0/8 is connected on F0/1 port and network 192.168.1.252/30 is
connected on S0/0 port.

R2 knows that network 192.168.1.252/30 is connected on S0/0 port and network


192.168.1.248/30 is connected on S0/1 port.

R3 Knows that network 20.0.0.0/8 is connected on F0/1 and network 192.168.1.248/30 is


connected S0/0 port.
Unlike static routing where we have to configure all routes manually, in dynamic routing all
we need to do is just tell the routing protocol which route we want to advertise. And rest will
be done automatically by running dynamic protocol. In our network we are running RIP
routing protocol so it will be handled by RIP.

Sometime RIP is also known as routing by rumor. Because in this routing protocol routers learn
routing information from directly connected neighbors, and these neighbors learn from other
neighboring routers.

RIP Protocol will share configured routes in network through the broadcasts. These broadcasts
are known as routing updates. Listening routers will update their routing table based on these
updates.

R1 will listen broadcast from R2. From R2 it will learn one new network 192.168.1.248/30.

R2 will listen two broadcasts from R1 and R3. From R1 it will learn about 10.0.0.o/8 and from
R3 it will learn about 20.0.0.0/8 network.

R3 will listen broadcast from R2. From R2 it will learn about the network 192.168.1.252/30.

Router takes several measurements while processing and putting new route information in
routing table. We will explain them later in this article. If router discovers new route in update,
it will put that in routing table.
After 30 seconds (default time interval between two routing updates) all routers will again
broadcast their routing tables with updated information.

This time:-

R1 will broadcast for 10.0.0.0/8, 192.168.1.248/30 and 192.168.1.252/30.


R2 will broadcast for 10.0.0.0/8, 20.0.0.0/8, 192.168.1.248/30 and 192.168.1.252/30.
R3 will broadcast for 20.0.0.0/8, 192.168.1.248/30 and 192.168.1.252/30.
R1 will learn about 20.0.0.0/8 network from R2s broadcast.
R2 has nothing to update from R1s and R2s broadcast.
R3 will learn about 10.0.0.0/8 network from R2s broadcast.
After 30 seconds router will broadcast again with new routing information. This time routers
have nothing to update. This stage is known as convergence.

Convergence

Convergence is a term that refers to the time taken by all routers in understanding the current
topology of network.

RIP Routing protocol metric

We may have two or more paths for the destination network. In this situation RIP uses a
measurement called metric to determine the best path for destination network. RIP uses hops
count as metric. Hops are the number of routers it takes to reach the destination network.

For example in above network R1 has two routes to reach the 20.0.0.0/8 network.

Route 1:- via R3 [on interface S0/1]. With hop count one.

Route 2:- via R2 R3 [on interface S0/0]. With hop count two.

So which route will R1 take to reach the destination?


Route 1 has one hop count while route 2 has two hop counts. Route 1 has lower hop count so
it will be placed in routing table.

Summary

RIP routing protocol uses local broadcast to share routing information.

RIP broadcasts routing updates in every 30 seconds, regardless something in network


has changed or not. Once 30 seconds expires, routers running RIP protocol will
broadcast their routing information to any devices connected to their interfaces.

Before sending routing updates router add a initiating metric to every routes which it
has and increments the metric of incoming routes in advertisements so the listing router
can learn how far destination network is.

While sending broadcasts RIP does not care about who listens these broadcast updates
or not.

After sending broadcast RIP does not care whether neighbors received these broadcast
updates or not.

When router receives routing updates, it compares them with the routes which it
already has in its routing table.

If update has information about a route which is not available in its routing table, router
will consider that route as a new route.

Router will add all new routes in routing table before updating existing one.

If update has better information for any existing route, router will replace old entry
with new route.

If update has worse information for any existing route, router will ignore it.

If update has exactly same information about any existing route, router will reset the
timer for that entry in routing table.

Thats all for this part. In next part we will explore fundamental topics of RIP routing protocol
such as RIP timer, RIP metric, Split horizon rule and route poisoning.

You might also like