RIP Protocol configuration Guide with Examples

This tutorial explains how to configure RIP Routing protocol step by step in detail. RIP is the simplest and one of the oldest Distance Vector routing protocol. Learn how to enable and configure RIP routing in Cisco router with practical example in packet tracer.

To explain RIP Routing, I will use packet tracer network simulator software. You can use any network simulator software or can use a real Cisco switch to follow this guide. There is no difference in output as long as your selected software contains the commands explained in this tutorial.

Create a practice lab as shown in following figure or download this pre-created practice lab and load in packet tracer

rip example topology

If require, you can download the latest as well as earlier version of Packet Tracer from here. Download Packet Tracer

Initial IP configuration

Device Interface IP Configuration Connected with
PC0 Fast Ethernet 10.0.0.2/8 Router0’s Fa0/1
Router0 Fa0/1 10.0.0.1/8 PC0’s Fast Ethernet
Router0 S0/0/1 192.168.1.254/30 Router2’s S0/0/1
Router0 S0/0/0 192.168.1.249/30 Router1’s S0/0/0
Router1 S0/0/0 192.168.1.250/30 Router0’s S0/0/0
Router1 S0/0/1 192.168.1.246/30 Router2’s S0/0/0
Router2 S0/0/0 192.168.1.245/30 Router1’s S0/0/1
Router2 S0/0/1 192.168.1.253/30 Router0’s S0/0/1
Router2 Fa0/1 20.0.0.1/30 PC1’s Fast Ethernet
PC1 Fast Ethernet 20.0.0.2/30 Router2’s 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.

assign ip address to computer in packet tracer

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.

access router command prompt in packet tracer

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 cable’s 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 let’s 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.To be on same page we have uploaded our practice topology with IP configuration. You can download it form here.

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.

Let’s 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.

That’s 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

That’s 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.

ping command test in packet tracer

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 download and 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.

rip route testing tracert

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].

rip remove route

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.

rip route testing

That’s 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
Router(config-router)#network a.b.c.d Add a.b.c.d network in RIP routing advertisement
Router(config-router)#no network a.b.c.d Remove a.b.c.d network from RIP routing advertisement
Router(config-router)#version 1 Enable RIP routing protocol version one ( default)
Router(config-router)#version 2 Enable RIP routing protocol version two
Router(config-router)#no auto-summary By default RIPv2 automatically summarize networks in their default classful boundary. This command will turn it off.
Router(config-router)#passive-interface s0/0/0 RIP will not broadcast routing update from this interface
Router(config-router)#no ip split-horizon Disable split horizon ( Enable by default )
Router(config-router)#ip split-horizon Enable spilt horizon
Router(config-router)#timers basic 30 90 180 270 360 Allow us to set RIP timer in seconds. 30 (routing update), 90 (invalid timer), 180 ( Hold timer), 270 (Flush timer), 360 (sleep timer)
Router(config)#no router rip Disable RIP routing protocol
Router#debug ip rip Used for troubleshooting. Allow us to view all RIP related activity in real time.
Router#show ip rip database Display RIP database including routes

ComputerNetworkingNotes CCNA Study Guide RIP Protocol configuration Guide with Examples