Network Kings

RIP-Routing Information Protocol

What is RIP?

RIP stands for routing information protocol. It is a type of dynamic protocol, comes under IGP(interior gateway protocol).

RIP works on distance vector algorithm.

Use hop count as a metric (one router = 1 hop) irrespective of bandwidth.

Maximum hop count is 15. It means if a route has more than 15 routers (hops) then it is considered as unreachable.

How distance vector algorithm works?

In distance vector algorithm, routers advertise their known destination networks and metric to directly connected neighbors. This method of sharing route information is often called routing by rumor.

This is because the router doesn’t know about the network actually it only knows the information that it neighbor tells it.

Rip has 3 versions-

RIPv1
RIPv2
RIPng (RIP next generation)
RIPv1 and RIPv2 are used for IPv4 address. RIPng used for IPv6.

RIP uses two messages-

  1. Request: RIP uses request message to ask neighbors to send their routing tables.
  2. Response: To send routing table to neighbor routers, RIP uses response message.

Limitation of RIPv1

  1. Only advertise classful addresses (class A, Class B, Class C).
  2. It only advertise IP address, doesn’t include subnet mask information in advertisements.

For example: We have an IP address 10.1.1.0/24. You can clearly see this IP address belongs to class A, but here prefix length is 24.

But, as RIP doesn’t advertise subnet mask information, it only check IP address and assume prefix length is 8 accordingly.

For any class B address, it assumes /16 length.

Similar for any class C address,  it assumes /16 length.

RIPv2: Limitations of RIPv1 are overcome in RIPv2.

It supports VLSM(variable length subnet mask) and CIDR (classless inter-domain routing).

In RIPv2, routers send subnet mask information along with IP address in response message.

Message are multicast to 224.0.0.9.

RIPv1

RIPv2

·         Broadcast

·         Doesn’t support subnetting

·         Only support classful 8/16/24

·         Multicast

·         Support Subnetting

·         Classless 8/10/25/29/16

What is the main drawback of RIP?

RIP uses hop count metric that is not much effective. Let’s understand with example.

In above diagram, there are two paths between source and destination. RIP uses hop count as a metric (one router count as 1 hop). So, path 1 has metric value 2 and path 2 has metric value 3 (metric=3 means routers=3 lie between source and destination). As, path1 has lower metric value RIP uses path1 to forward packet from source to destination.

Now you tell is this really good route or not? From  above figure, you can clearly see that path2 has 10Gb links while path 1 has  1Gb links. So, no doubt, obviously path 2 is good (10Gb links transmit data at faster rate compare to 1Gb link).

Summarization: RIP uses hop count metric that selects route on the basis of number of routers. It doesn’t consider bandwidth. As you saw in above example path2 is good but RIP select path1 because path1 has lower metric value.

Now we will perform a lab using RIP protocol. To perform this lab, I used Cisco packet tracer. 4 Routers (2811).

Configuration: To perform this lab, you need to configure 3 things-

  1. Assign IP address to router interface

interface <interface type><interface name>

ip address <IP address><subnet mask>

no shutdown

For example, R1 interface configuration

interface fa0/1
ip address 192.168.40.1 255.255.255.0
no shutdown

  1. Create loopback interfaces and assign IP address to them

interface loopback <loopback name>

ip address <IP address><subnet mask>

For example for R1

interface loopback 0
ip address 192.168.1.1 255.255.255.0

  1. Then configure rip protocol

router rip

network <network Id>

Configuration might be look lengthy but it’s very simple.Same steps repeat in all routers, commands are same only IP addresses will change.

### R1 Configuration ###

enable
configure terminal
hostname R1
interface fa0/1
ip address 192.168.40.1 255.255.255.0
no shutdown
interface fa0/0
ip address 192.168.10.1 255.255.255.0
no shutdown
interface loopback 0
ip address 192.168.1.1 255.255.255.0
interface loopback 1
ip address 192.168.2.1 255.255.255.0
router rip
network 192.168.1.0
network 192.168.2.0
network 192.168.10.0
network 192.168.40.0

### R2 Configuration ###

enable
configure terminal
hostname R2
interface fa0/1
ip address 192.168.20.1 255.255.255.0
no shutdown
interface fa0/0
ip address 192.168.10.2 255.255.255.0
no shutdown
interface loopback 0
ip address 192.168.7.1 255.255.255.0
interface loopback 1
ip address 192.168.8.1 255.255.255.0
router rip
network 192.168.8.0
network 192.168.7.0
network 192.168.20.0
network 192.168.10.0

### R3 Configuration ###

enable
configure terminal
hostname R3
interface fa0/1
ip address 192.168.40.2 255.255.255.0
no shutdown
interface fa0/0
ip address 192.168.30.1 255.255.255.0
no shutdown
int loopback 0
ip address 192.168.3.1 255.255.255.0
int loopback 1
ip address 192.168.4.1 255.255.255.0
router rip
network 192.168.30.0
network 192.168.40.0
network 192.168.3.0
network 192.168.4.0

### R4 Configuration ###

enable
configure terminal
hostname R4
interface fa0/1
ip address 192.168.30.2 255.255.255.0
no shutdown
interface fa0/0
ip address 192.168.20.2 255.255.255.0
no shutdown
interface loopback 0
ip address 192.168.6.1 255.255.255.0
interface loopback 1
ip address 192.168.5.1 255.255.255.0
router rip
network 192.168.6.0
network 192.168.5.0
network 192.168.20.0
network 192.168.30.0

Verify the connectivity: To verify the connectivity use ping command(in CLI ping command run in enable mode). Below, I share the screenshot of my lab result.

I got ping reply, it means my lab is successful, now it’s your turn try the lab or mention in the comment section you got ping reply or not.