RIP is a distance vector routing protocol. As all routing protocols are using a metric, the one used by RIP is the hop count. The shortest the hop count, the more likely RIP will chose that path to reach the destination network. However, RIP’s maximum hop count is 15(CCNA exam question). Any route with a hop count greater than 15 is considered unreachable. Routing updates are broadcasted by default every 30 seconds. They are sent in UDP packets with both source and destination port numbers set to 520. Because the maximum datagram size is only 504 bytes, there’s a maximum of 25 routes that can be announced in a single packet. Having more routes will cause the router to send more packets.

There are only two message types used by RIP. Request message and Response message. The names are as descriptive as they can be. When a RIP enabled router interface comes up, it sends out a Request message. The other RIP enabled routers in the network are responding with Response messages. When the first router receives the Response messages, it installs the new received routes in it’s routing table. If the router already has a route in it’s table but it gets one with a better hop count, the old route is replaced. After that, the router sends its own routing table to its neighbors.

The default Administrative Distance for RIP is 120(another CCNA exam question). In routing, the AD is used as a reference of trustworthiness. The lower the value, the higher the priority of that route. For example, if you have a route received through RIP, which has an AD of 120, and you have the same route received from a higher priority protocol like OSPF, which has a default AD of 110, OSPF will be in charge to route the packets through its route, even if the routing protocol metric is greater. Due to its lack of scaling capabilities, RIP is the least-preferred protocol from all Interior Gateway Protocols (IGPs).

There are three versions of RIP. RIPv1, RIPv2 and RIPng, but only the first two are required for the CCNA certification.

RIPv1

RIPv1 is the first version of this protocol. The main disadvantage of this protocol is that it’s a Classful Routing Protocol, meaning that you cannot use Variable Length Subnet Masking (VLSM).

The configuration of the RIPv1 protocol is pretty straight forward. You must enable RIP routing with the router rip global configuration command, then specify the networks you want to announce with the network network-address command. RIPv1 assumes the default subnet mask for the IP address you specify. The default masks are: class A – 255.0.0.0, class B – 255.255.0.0, class C – 255.255.255.0. Please note that if you will enter a classless IP address like 192.168.1.32 the router IOS will convert it automatically to the classless one, 192.168.1.0.

To check that RIP is receiving updates from other routers, you use the show ip route command. RIP routes can be easily identified as they are prefixed with R. Also, show ip protocols can give you plenty of information if you want to check if you correctly advertise your routes to others.

Router(config)#router rip

Router(config-router)#network 192.168.1.0

Router(config-router)#network 192.168.2.0

Router(config-router)#ctrl-Z

Router#show ip route

Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP

…………………..((output omitted)……………………..

 

Gateway of last resort is not set

 

R    192.168.4.0/24

[120/1] via 192.168.2.2, 00:00:02, Serial0/0/0

R    192.168.5.0/24 [120/1] via 192.168.2.2, 00:00:02, Serial0/0/0

C    192.168.1.0/24 is directly connected, FastEthernet0/0

C    192.168.2.0/24 is directly connected, Serial0/0/0

Router#show ip protocols

Routing Protocol is “rip”

Sending updates every 30 seconds, next due in 2 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: rip

Default version control: send version 1, receive any version

Interface        Send  Recv   Key-chain

Ethernet0        2     2      trees

Fddi0            2     2

Automatic network summarization is in effect

Maximum path: 4

Routing for Networks:

192.168.4.0

192.168.5.0

If you can’t figure out what’s happening, debug ip rip might be your last step in verifying the configuration. Be careful while using debugging in larger networks. If your router doesn’t have enough CPU and memory, debugging will “kill” him. If you are working remotely, you may find out that there is not way you can connect back to your router, and that the router is not responding to any requests. Use debugging with caution and only when it’s the last solution.

Router#debug ip rip

RIP protocol debugging is on

RIP: received v1 update from 192.168.2.1 on Serial0/0/0

192.168.1.0 in 1 hops

RIP: recevied v1 update from 192.168.4.1 on Serial0/0/1

192.168.5.0 in 1 hops

RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (192.168.3.1)

RIP: build update entries

network 192.168.1.0 metric 2

network 192.168.2.0 metric 1

network 192.168.4.0 metric 1

 

By default, RIP is sending out updates on all interfaces. In some cases, this is not the expected behavior. Sending out updates on an interface can be stopped with passive interface interface-type interface-number router command.

Router(config-router)#router rip

Router(config-router)#passive interface FastEthernet0/0

To send out a default route through RIP (and many routing protocols), you must use the default-information originate router command. A default route received through RIP is show in the show ip route output prefixed by R*.

Router(config-router)#router rip

Router(config-router)#default-information originate

 

Router#show ip route

Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP

…………………..((output omitted)……………………..

 

Gateway of last resort is not set

 

R    192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:02, Serial0/0/0

R    192.168.5.0/24 [120/1] via 192.168.2.2, 00:00:02, Serial0/0/0 

C    192.168.1.0/24 is directly connected, FastEthernet0/0

C    192.168.2.0/24 is directly connected, Serial0/0/0

R*   0.0.0.0/0 [120/1] via 192.168.2.2, 00:00:02, Serial0/0/0

 

RIPv2

RIPv2 was developed because networks needed VLSM. RIPv2 is able to send out updates which includes the subnet mask of the advertised network. The characteristics of RIPv2 are the same with RIPv1, except, instead of broadcasting the advertised routes through the whole network, RIPv2 uses the multicast address 224.0.0.9 to announce the routes to the other routers in the network.

To enable RIPv2 in a router you must use the version 2 router configuration command. You can always revert to RIPv1 with version 1. You can check what version of RIP you are using with show ip protocols.

Router(config)#router rip

Router(config-router)#version 2

Router(config-router)#ctrl-Z

Router#show ip protocols

Routing Protocol is “rip”

Sending updates every 30 seconds, next due in 2 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Redistributing: rip

Default version control: send version 2, receive version 2

Interface        Send  Recv   Key-chain

Ethernet0        2     2      trees

Fddi0            2     2

Automatic network summarization is in effect

Maximum path: 4

Routing for Networks:

192.168.4.0

192.168.5.0

 

Even if RIPv2 is a classless routing protocol, its default behavior is to summarize the routes, meaning that if you have two classless route, let’s say 172.16.1.0/24 and 172.16.2.0/24, RIPv2 will summarize them as 172.16.0.0/16, just like as you would expect from RIPv1. To take advantage of the classless routing features you must disable the route summarization with the no auto-summary router configuration command.

Router(config)#router rip

Router(config-router)#no auto-summarization

When you’ll check the routing table of a RIPv2 enabled router, you will be able to see the the classless routes.

Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP

…………………..((output omitted)……………………..

Gateway of last resort is not set

172.30.0.0/16 is variably subnetted, 6 subnets, 2 masks

R       172.30.200.32/28 [120/1] via 192.168.1.2, 00:00:02, FastEthernet0/0

R       172.30.200.16/28 [120/1] via 192.168.1.2, 00:00:02, FastEthernet0/0  

R       172.30.2.0/24 [120/1] via 192.168.1.2, 00:00:02, FastEthernet0/0  

R       172.30.1.0/24 [120/1] via 192.168.1.2, 00:00:02, FastEthernet0/0  

R       172.30.100.0/24 [120/1] via 192.168.1.2, 00:00:02, FastEthernet0/0  

R       172.30.101.0/24 [120/1] via 192.168.1.2, 00:00:02, FastEthernet0/0

C    192.168.1.0/24 is directly connected, FastEthernet0/0

C    192.168.2.0/24 is directly connected, Serial0/0/0

 

RIPng

RIPng or RIP Next Generation was developed to support IPv6. However, RIPng is not included in the CCNA course.

Troubleshooting RIP

As a network administrator and CCNA candidate, make sure you really understand the show and debug commands and the output you get from them. Use them as often as possible until you get familiar with them. A good practice for starters is to check the output of those commands after each modification you make on the router configuration.

We hope you found this CCNA 640-802 topic a good introduction to the world of dynamic routing protocols. Dynamic routing is one of the core requirements for Cisco’s CCNA exam and you must have a very good understanding about the concepts of dynamic routing as well as a strong knowledge about the operation of different routing protocols.