Cisco RIP Configuration Guide – Dynamic Routing with RIP Version 1 and RIP Version 2

By | March 24, 2014

In my last Cisco Networking guide we had seen complete configuration of Static Routing in Cisco router. In this CCNA online tutorial I would like to cover about Dynamic Routing RIP configuration in Cisco router. One of my recent articles titled Type of Routing protocols – Static Routing and Dynamic Routing in the Cisco Networking series covered a brief description about RIP (Routing Information Protocol). But it was only a theoretical explanation of RIP. In this tutorial let’s see the setting up dynamic routing Cisco RIP configuration. This will be a great opportunity to learn networking for beginners via online.
RIP is a dynamic routing protocol, as you are aware, a routing protocol lets routers to talk each other. Among the available Dynamic Routing protocol, RIP configuration commands are the easiest one to configure. The article flows with RIP configuration Cisco packet tracer example.

Cisco RIP Configuration Guide

What is Routing Information Protocol (RIP)?

  • RIP is an open source routing protocol, what it means RIP is compatible with all routers more than Cisco.
  • RIP is Distance vector based Interior Gateway Routing Protocol (IGP).

– What is an IGP? An Interior Gateway Protocol (IGP) is a kind of protocol used for interchanging routing information between gateways (commonly routers) within an Autonomous System

What is Distance vector? Distance vector protocols use a distance calculation together with outgoing network interface (a vector) to choose the best path to a destination network.

  • RIP is the simplest and easiest routing protocol to configure. Every routing protocol has its own metric to calculate best path available.
  • RIP utilizes ‘hop count’ as metric to decide the best path among two locations (Here hop count is calculated by Distance Vector Algorithm).

(I will be posting separate article covering Metric, Administrative Distance, Distance Vector, etc.)

Hop count: Which is the number of routers the packet need go through until it reaches the destination network.

Listen to the following figure,

RIP Hop count

  • Here the hop count of Path 1 (green color) is 4 and that of Path 2 (Blue color) is 3, hence RIP chooses Path 2 as the best path (Even Path 2 having low bandwidth and high traffic- DISADVANTAGE).
  • The extreme acceptable number of hops in RIP network is 15 hops. Means the packet will not be able to reach at the target if the destination is apart from 15 hops.
  • Two variations of RIP are RIP Version 1 and RIP Version 2.
  • RIP Applied in small networks having less than 15 hops.
  • In a RIP enabled network, every router broadcasts its entire RIP table to its adjacent routers in each 30 seconds.
  • When a router receives a neighbor’s RIP table, it updates its own routing table from the received information and then broadcast updated routing table to the adjacent router.

What is the difference between RIP Version 1 and RIP Version 2?

The different versions of Routing Information Protocol (RIP) are RIP V1 and RIP V2. Both are dynamic routing protocols on Cisco Router.
RIP V1

  • RIP Version 1 is a Clasful protocol that is Subnet mask not included while advertising (Doesn’t support VLSM).
  • Advertisement uses Broadcast with destination address 255.255.255.255
  • No Authentication supported
  • Automatic Summarization

RIP V2

  • RIP V2 is an Enhanced RIP V1
  • Class less Routing Protocol that is Subnet mask included while advertising (Support VLSM)
  • Advertisement uses Multicast with destination address 244.0.0.9
  • 2 types of Authentication supported. You can restrict some routers to participate in RIPv2
  • Manual summarization

This is all about the preliminary information about RIP. Now let’s see the Configurations.

How to Configure RIP V1 in Cisco Router (RIP Configuration in Cisco Packet Tracer example)

As we know that RIP V1 doesn’t use subnet mask. For RIP V1 example configuration let’s take our example packet tracer scenario (the same scenario we discussed in Static Routing guide)

Configuration of Router 1 (Assigning IP Address)

Before going to RIP configuration commands, we should assign IP address to each interface in outer 1.

Router>
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R1(config-if)#
R1(config-if)#exit
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R1(config-if)#
R1(config-if)#exit
R1(config)#interface serial 0/2/0
R1(config-if)#ip address 40.0.0.2 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/2/0, changed state to down
R1(config-if)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

Now we assigned IP address to each interface in Router 1. Next is the RIP V1 configuration command

RIP V1 Basic Configuration in Router 1

RIP V1 Configuration in Router 1
Above image comprise the total configuration of RIP. Cisco configuration as follows.

R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#network 20.0.0.0
R1(config-router)#network 40.0.0.0
R1(config-router)#exit
R1(config)#
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#

We had completed Router 1 configuration successfully. The next section is Router 2.

Router 2 Configurations (Assigning IP Address)

As we did for Router 1, just assign IP address to each port of Router 2

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R2(config-if)#exit
R2(config)#interface serial 0/2/0
R2(config-if)#ip address 40.0.0.1 255.0.0.0
R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/2/0, changed state to up

R2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0, changed state to up

R2(config-if)#exit
R2(config)#
R2#
%SYS-5-CONFIG_I: Configured from console by console

Router 2 IP Address assignment completed! Next RIP V1 configuration on Router 2.

RIP V1 Configuration in Router 2

RIP V1 Configuration in Router 2
Image is self explanatory. the configuration commands are followed.

R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router rip
R2(config-router)#network 30.0.0.0
R2(config-router)#network 40.0.0.0
R2(config-router)#exit
R2(config)#
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R2#

This is all about RIP V1 configurations. Now we are going to RIP V2

Routing Information Protocol (RIP) Version 2 Configurations

As far as configuration is concern there is only a small difference in RIP V2 configuration while comparing with RIP V1. It is nothing but the presence of a command line ‘version 2’.

RIP V2 Configuration in Router 1

RIP V2 Configuration in Router 1
RIP V2 commands are followed.

R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 10.0.0.0
R1(config-router)#network 20.0.0.0
R1(config-router)#network 40.0.0.0
R1(config-router)#no auto-summary
R1(config-router)#exit
R1(config)#
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#

Router 1 is configured with RIP Version 1 now!

RIP V2 Configuration in Router 2

RIP V2 Configuration in Router 2
Router 2 command lines are shown below.

R2>enable
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 30.0.0.0
R2(config-router)#network 40.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit
R2(config)#
R2#
%SYS-5-CONFIG_I: Configured from console by console

R2#
R2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R2#

How to Disable RIP in a Router?

To disable RIP configuration from a Cisco router enter the following

R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#no router rip
R1(config)#
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#

What is ‘no auto-summary’

By default RIP summarize subnets classful boundary. For enabling VLSM (Variable Length Subnet Masking) we have to stop this auto summarization.

For example, Let say you have Class A network divided to 2 subnets such as 10.0.0.0/9 with subnet 255.128.0.0 and 10.128.0.0/9 with subnet 255.128.0.0

RIP may not consider this as 2 different networks, instead it summarized as single network 10.0.0.0 with subnet mask 255.0.0.0 at Class A boundary.

‘no auto-summary’ command lets you to design VLSM routing in RIP.

Verification and Testing Commands

Now let’s familiar some basic commands that may be used to verify or troubleshoot RIP configurations. Use privileged mode to enter those commands.

#show ip protocols

This command used to know which routing protocol is enabled in the specific router.

R1#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 6 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 2
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2
FastEthernet0/1 2 2
Serial0/2/0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
20.0.0.0
40.0.0.0
Passive Interface(s):
Routing Information Sources:
Gateway Distance Last Update
40.0.0.1 120 00:00:17
Distance: (default is 120)
R1#

#show ip rip database

Displays content of RIP database inside the router.

R1>enable
R1#show ip rip database
10.0.0.0/8 auto-summary
10.0.0.0/8 directly connected, FastEthernet0/0
20.0.0.0/8 auto-summary
20.0.0.0/8 directly connected, FastEthernet0/1
30.0.0.0/8 auto-summary
30.0.0.0/8
[1] via 40.0.0.1, 00:00:15, Serial0/2/0
40.0.0.0/8 auto-summary
40.0.0.0/8 directly connected, Serial0/2/0
R1#

#debug ip rip

This command shows RIP updates occurring in the system

R1#debug ip rip
RIP protocol debugging is on
R1#
R1#RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0 (10.0.0.1)
RIP: build update entries
20.0.0.0/8 via 0.0.0.0, metric 1, tag 0
30.0.0.0/8 via 0.0.0.0, metric 2, tag 0
40.0.0.0/8 via 0.0.0.0, metric 1, tag 0
RIP: sending v2 update to 224.0.0.9 via FastEthernet0/1 (20.0.0.1)
RIP: build update entries
10.0.0.0/8 via 0.0.0.0, metric 1, tag 0
30.0.0.0/8 via 0.0.0.0, metric 2, tag 0
40.0.0.0/8 via 0.0.0.0, metric 1, tag 0
RIP: sending v2 update to 224.0.0.9 via Serial0/2/0 (40.0.0.2)
RIP: build update entries
10.0.0.0/8 via 0.0.0.0, metric 1, tag 0
20.0.0.0/8 via 0.0.0.0, metric 1, tag 0

#undebug all

Once you turn on #debug ip rip router will keep showing RIP updates. The command #undebug all will stops such RIP updates.

R1#undebug all
All possible debugging has been turned off
R1#

#show ip route

To check ‘routing table’. It will show you which networks are directly connected and which one is learned via RIP.

R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 route

Gateway of last resort is not set

C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, FastEthernet0/1
R 30.0.0.0/8 [120/1] via 40.0.0.1, 00:00:09, Serial0/2/0
C 40.0.0.0/8 is directly connected, Serial0/2/0
R1#

#show running-config

This command is used to get the current configuration from the Router.

R1#show running-config
Building configuration...

Current configuration : 663 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
spanning-tree mode pvst
!
interface FastEthernet0/0
ip address 10.0.0.1 255.0.0.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 20.0.0.1 255.0.0.0
duplex auto
speed auto
!
interface Serial0/2/0
ip address 40.0.0.2 255.0.0.0
clock rate 64000
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 10.0.0.0
network 20.0.0.0
network 40.0.0.0
no auto-summary
!
ip classless

 

Is RIP configuration step by step guide lends a hand to you for familiarizing Cisco dynamic routing configuration commands? Let me know your comments about this PIP configuration tutorial via comment box below. Feel free to ask any doubts.

Next article we may cover IGRP (Interior Gateway Routing Protocol)

5 thoughts on “Cisco RIP Configuration Guide – Dynamic Routing with RIP Version 1 and RIP Version 2

  1. ishtiaqahmed

    ASSALAM-O-ALIKUM A VERY GOOD TUTORIAL THIS IS EASY AND SIMPLE TO UNDERSTAND. I PRAY TO ALMIGHTY ALLAH TO GAVE US STRENGTH AND KNOWELEDGE TO DO MORE AND MORE WORK . (AMEEN).

    Reply
    1. Admin Post author

      Hi Mzii,
      Thank you for your valuable feedback.

      Reply

Leave a Reply

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