Networking Concepts: Distance-Vector Routing Protocols

by | Jan 19, 2016 | CCNA | 1 comment

What you will learn?

  • Working of Distance-Vector Routing Protocols
  • Routing Information Protocol
  • Different Versions of RIP
  • RIP Timers
  • Configuring RIP in a network
  • Command guide for RIP

One of the biggest problem of Static Routing is Administrative Overhead. Imagine having 50 routers in a network, each of them having some directly connected networks. What if you have to manage all of them with static routes. A nightmare? Yes, indeed. Installing and troubleshooting of static routes is difficult. One solution can be default routes but what about security? Everyone gets access everywhere. Not feasible in all cases. Solution is Distance-Vector Routing Protocols.

Working of Distance-Vector Routing Protocols

As name implies, DVRPs work on the concept of Distance and Vector (Direction); means in which direction, distance is less? It measures distance in terms of Hop counts. Hop counts are numbers of “network changes” from source to destination. Or in other words, number of intermediate devices through which data must pass in order to reach the destination. Distance-Vector Routing Protocolswill never consider second path if first path has less number of hop counts from source to destination, even if second path is much more faster than the preferred one.

Hop Counts in Distance-Vector Routing Protocols

How to count number of hops in Distance-Vector Routing Protocols ?

And one last thing, there is limit of maximum number of hop counts in Distance-Vector Routing Protocols. Crossing that limit will result in unreachable network. There are two protocols in this category RIP and IGRP. In case of RIP, Max Hop count is 15 while in IGRP it is 255.

Routing Information Protocol

Moving on to our first Distance-Vector Routing Protocol: RIP. There are a few things to consider while using this protocol in a network,

  1. It uses Hop Counts to determine the best path from source to destination. Path with less hop counts is always preferred. Maximum hop count is 15. 16th hop means unreachable. So you can not apply in in a very large network.
  2. It is classful routing protocol that means it doesn’t send subnet mask information to its’ neighbor.
  3. It sends periodic updates in every 30 sec. These are full routing table. It use UDP port no 520 to broadcast the update. When a router receives update from neighbor, it compares it to its’ routing table and updates as required.
  4. We only have to give the information of directly connected networks only. Rest it will automatically learn by update packets.
  5. AD Value is 120. Not so reliable, I know but at least we don’t have to manually give information of complete network.
  6. There can be upto 6 paths for load balancing in the routing table. By default it is 4. It doesn’t support unequal cost load balancing.
  7. RIP works at OSI Layer 7.
  8. By default, it doesn’t support Subnetting, VLSM and Authentication.
  9. It relies on it’s neighbor for update information and will blindly trust the neighbor, causing loops in the network.
  10. It converges very slowly that’s why most of the time companies avoid using it.

Different Versions of RIP

There were a lot of problem in RIP so some modifications were done and RIPv2 came in existence. Not too many differences in both.

Difference in different versions of RIP (Distance-Vector Routing Protocol)

Difference in different versions of RIP (Distance-Vector Routing Protocol)

There is also a default version that works like Version 1. When we don’t specify a version, default version is being used. The only difference is that Default version can receive updates from both version 1 and version 2 but will send only version 1 updates.

RIP Timers

RIP uses four different kinds of timers to regulate its performance: Update timer 30 seconds between periodic routing updates. Router sends a complete copy of its routing table to all neighbors. Route invalid timer If a network is down or if it didn’t receive any update for a network, it will start a invalid timer for 180 secs. If it hasn’t heard any updates about a particular route for that period, it will consider that route as invalid. The router will send out updates to all of its’ neighbors telling them that the route is invalid. Hold-down timer If a route is into the hold-down state, it will “not believe” any equal or less impressive (worse) route updates for that route for a particular Hold-Down time period. This continues either until an update packet is received with a better metric or until the hold-down timer expires. The default is 180 seconds. Route flush timer It sets the time between a route becoming invalid and its removal from the routing table (240 seconds). Before the route is removed from the table, the router notifies its neighbors of that route’s failure. The value of the route invalid timer must be less than that of the route flush timer. This gives the router enough time to tell its neighbors about the invalid route before the local routing table is updated.

Configuring RIP in a network

Commands are very simple for RIP. Watch the following video for more details.

However, here is a quick command guide for RIP,

Commands Description
Router(config)#router rip Enables RIP as a routing protocol
Router(config-router)#network a.b.c.d a.b.c.d is the network address of the directly connected network you want to advertise.
Router(config)#no router rip Turns off the RIP routing process
Router(config-router)#no network a.b.c.d Removes network a.b.c.d from the RIP routing process.
Router(config-router)#version 2 RIP will now send and receive RIPv2 packets globally.
Router(config-router)#version 1 RIP will now send and receive RIPv1 packets only
Router(config-router)#no auto-summary RIPv2 summarizes networks at the classful boundary. This command turns auto summarization off.
Router(config-router)#passive-interface s0/0/0 RIP updates will not be sent out this interface.
Router(config-router)#no ip split-horizon Turns off split horizon (on by default).
Router(config-router)#ip split-horizon Re-enables split horizon
Router(config-router)#timers basic 30 90 180 270 360 Changes timers in RIP: 30 = Update timer (in seconds) 90 = Invalid timer (in seconds) 180 = Hold-down timer (in seconds) 270 = Flush timer (in seconds) 360 = Sleep time (in milliseconds)
Router#debug ip rip Displays all RIP activity in real time

cisco ccna ebook


Register for Free Demo Session