How to configure RIP on a Cisco Router

In this article, we will discuss RIP configuration. If you didn’t studied RIP yet, you can see my  Introduction to RIP article.

We will use the following topology to see how to configure RIP on a cisco Router:

riptopo

We have 3 routers, and 4 different networks. We’ll start first by configuring each router:

RABAT#configure terminal
RABAT(config)#interface loopback 0
RABAT(config-if)#ip address 1.1.1.1 255.255.255.0
RABAT(config-if)#exit
RABAT(config)#interface fa0/0
RABAT(config-if)#ip address 192.168.1.1 255.255.255.0
RABAT(config-if)#no shutdown
RABAT(config-if)#exit
PARIS#configure terminal
PARIS(config)#interface f0/0
PARIS(config-if)#ip address 192.168.1.2 255.255.255.0
PARIS(config-if)#no shutdown
PARIS(config-if)#exit
PARIS(config)#interface f0/1
PARIS(config-if)#ip address 192.168.2.1 255.255.255.0
PARIS(config-if)#no shutdown
PARIS(config-if)#exit
AMSTERDAM#configure terminal
AMSTERDAM(config)#interface f0/0
AMSTERDAM(config-if)#ip address 192.168.2.2 255.255.255.0
AMSTERDAM(config-if)#no shutdown
AMSTERDAM(config-if)#exit
AMSTERDAM(config)#interface loopback 0
AMSTERDAM(config-if)#ip address 2.2.2.2 255.255.255.0
AMSTERDAM(config-if)#no shutdown
AMSTERDAM(config-if)#exit

Here is the configuration of our 3 routers. Note that we configured some loopback interfaces on router Rabat and Amsterdam to simulate hosts in network 1.1.1.0/24 and 2.2.2.0/24.

Let’s take a look to the routing table of the 3 routers:

RABAT#show ip routeCodes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnets
C    1.1.1.0 is directly connected, Loopback0
C   192.168.1.0/24 is directly connected, FastEthernet0/0
PARIS#show ip routeCodes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static routeGateway of last resort is not set
C   192.168.1.0/24 is directly connected, FastEthernet0/0
C   192.168.2.0/24 is directly connected, FastEthernet0/1
AMSTERDAM#show ip routeCodes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static routeGateway of last resort is not set2.0.0.0/24 is subnetted, 1 subnets
C   2.2.2.0 is directly connected, Loopback0
C   192.168.2.0/24 is directly connected, FastEthernet0/0

Great! As we didn’t enable RIP on the 3 routers, there is only the directly connected interfaces of every router in the routing table.

Let’s enable RIP on the 3 routers and see what’s happens:

RABAT(config)#router rip
RABAT(config-router)#network 192.168.1.0
RABAT(config-router)#network 1.1.1.0
RABAT(config-router)#exit

To configure RIP :

  • We use the router rip Command to go to RIP configuration
  • Once we are in the RIP configuration, we use the network command. This command has two effects:

1.  All networks that fall in the range of the network command will be advertised to other routers.

2.  RIP updates will be sent on the interface that falls in the range of network command.

Are you following me here? Here is a nice example:  🙂

On router Rabat, once we added the command network 192.168.1.0, the interface that falls in the range of the network 192.168.1.0 will be added in the RIP database and it will start sending RIP updates. In our case this interface is fa0/0. You can see it in green on the following picture.

RIPCONFIGINT

Let’s continue configuring RIP on the 2 other routers:

PARIS(config)#router rip
PARIS(config-router)#network 192.168.1.0
PARIS(config-router)#network 192.168.2.0
PARIS(config-router)#exit
AMSTERDAM(config)#router rip
AMSTERDAM(config-router)#network 2.2.2.0
AMSTERDAM(config-router)#network 192.168.2.0
AMSTERDAM(config-router)#exit

We are done from the configuration. Let’s check if everything works well. To do so, we have to check the routing table of one of the 3 routers. Let’s check router Rabat:

RABAT#show ip route rip
R   2.0.0.0/8 [120/1] via 192.168.1.2, 00:00:19, FastEthernet0/0
R   192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:19, FastEthernet0/0

The show ip route rip command allows you to see only the RIP routes. You can see that RABAT has known two RIP routes: 192.168.2.0/24 and 2.0.0.0/8.

Why 2.0.0.0/8? If you remember we specified network 2.2.2.0. So we should find 2.2.2.0/24 network.

No we’ll never find this network, because we’re using the Default RIP version which is version 1. And as you know, RIPv1 is Classfull, which means it don’t send the subnet mask with the RIP routing update.

You can see here the other routing tables:

PARIS#show ip route rip
R   1.0.0.0/8 [120/1] via 192.168.1.1, 00:00:13, FastEthernet0/0
R   2.0.0.0/8 [120/1] via 192.168.2.2, 00:00:05, FastEthernet0/1
AMSTERDAM#show ip route rip
R   1.0.0.0/8 [120/2] via 192.168.2.1, 00:00:03, FastEthernet0/0
R   192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:03, FastEthernet0/0

Let’s analyze the entry in green:

  • R means that we are using RIP;
  • 1.0.0.0/8 is the network that router Amsterdam learned;
  • [120/2]120 is the Administrative distance of RIP, 2 is the metric;
  • Via 192.168.2.1 is the next-hop router. If we want to reach network 1.0.0.0/8 we have to send packets to router Paris;
  • 00:00:03 is the time since the last update of this entry. Remember that there is an update every 30s;
  • FastEthernet0/0 is the outgoing interface of the local router (Amsterdam in our case).

Last thing before moving to RIPv2 is the command show ip protocols. This commands is very important for troubleshooting routing protocols:

RABAT#show ip protocols
Routing Protocol is “rip”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 13 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface             Send Recv   Triggered RIP Key-chain
FastEthernet0/0       1       1 2
Loopback0                1       1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
192.168.1.0
Routing Information Sources:
Gateway         Distance     Last Update
192.168.1.2         120     00:00:14
Distance: (default is 120)

This command gives you a lot of useful information such as which routing protocol you are running, the timers, here we have the version of RIP, the interfaces that are sending and receiving routing updates and the networks that we advertised.

RIPv2 configuration

It’s time to move to RIPv2 configuration:

RABAT(config)#router rip
RABAT(config-router)#version 2
RABAT (config-router)#no auto-summary
PARIS(config)#router rip
PARIS(config-router)#version 2
PARIS(config-router)#no auto-summary
AMSTERDAM(config)#router rip
AMSTERDAM (config-router)#version 2
AMSTERDAM (config-router)#no auto-summary

To move to version 2, you have to add version 2 and no auto-summary commands. Because when we enable the version 2, by default behaves as classfull. To work as Classless, we have to add the no auto-summary command.

If you look at the routing tables know, you’ll notice some changes:

RABAT#show ip route rip
2.0.0.0/24 is subnetted, 1 subnets
R       2.2.2.0 [120/2] via 192.168.1.2, 00:00:25, FastEthernet0/0
R   192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:25, FastEthernet0/0
PARIS#show ip route rip
1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/1] via 192.168.1.1, 00:00:27, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
R       2.2.2.0 [120/1] via 192.168.2.2, 00:00:04, FastEthernet0/1
AMSTERDAM#show ip route rip
1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/2] via 192.168.2.1, 00:00:06, FastEthernet0/0
R   192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:11, FastEthernet0/0

You can see that we have the exact match (1.1.1.0/24) of the RIP routes in the routing table.

If you want to see the RIP version, you can use the show ip protocols command.

Routing Protocol is “rip”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 16 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface             Send Recv   Triggered RIP Key-chain
FastEthernet0/0       2       2
Loopback0               2       2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
1.0.0.0
192.168.1.0
Routing Information Sources:
Gateway         Distance     Last Update
192.168.1.2         120     00:00:15
Distance: (default is 120)

You can see that we are using the version 2 of RIP.

This is all I have for you in this article. I hope you enjoyed this post, if so just leave me a comment!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *