Friday, January 20, 2012

Routing Information Protocol (RIP) - Routing Legend

RIP in short

The RIP or Routing Information Protocol is a distance-vector routing protocol that uses hop counts for its metrics. That means that RIP prevents routing loops by limiting hop counts, to be more precise 16 of them. If more than 16, packet is discarded. Although old and not so scalable, RIP is even today widely used in local networks throughout the world.

RIP is Interior Gateway Protocol (IGP) and is used inside local networks or autonomous systems. The RIP predecessor was Xerox protocol - GWINFO, which later version is known as routeD. There are 3 versions of RIP, two for IPv4; RIPv1 and RIPv2 plus one for IPv6, RIPng. 

RIP implements the split horizon, route poisoning and holddown mechanisms to prevent incorrect routing information from being propagated. These are some of the stability features of RIP. It is also possible to use the so called RMTI (Routing Information Protocol with Metric-based Topology Investigation) algorithm to cope with the count-to-infinity problem. With its help, it is possible to detect every possible loop with a very small computation effort.

RIP is implemented on top of the User Datagram Protocol as its transport protocol. It is assigned the reserved port number 520.


Routing updates

RIP sends its routing-updates after certain interval of time or when network topology changes. After router receives routing-update which has route that doesn't exist in current routing table new record is added. Hop count is increased by 1 every time routing-update traverses the router. RIP routers maintain only route with lowest metric or better to say, the best route. After updating its routing table, the router immediately begins transmitting routing updates to inform other network routers of the change.

RIP timers

RIP has several timers in order to increase its performance. Routing-update timer, which triggers periodic routing update. By default, this timer is set to 30 seconds with a small random number of seconds added each time the timer is reset to prevent collisions.

Hold-Down timer, generally set to 90 seconds, takes care if there is no routing-update in that period, route is withdrawn from routing table.

Route timeout indicates period after which route is marked as unavailable. Default values is 180 seconds. In that period if there is no routing-update with information about this route, it is dropped from router announcements.

Route flush timer tells how long to wait before completely delete route from routing table. Default value is 120 seconds.


RIPv1 vs RIPv2

Let us see what enhancements RIPv2 has compared to RIPv1. The one of most valuable differences is using of Classless Inter-Domain Routing (CIDR), which means that RIPv2 is capable to carry subnet information.

Another important feature is that RIPv2 uses multicast on 224.0.0.9 to send its routing table to neighbours, opposed to RIPv1 which uses broadcast which "spam" all devices on the network.


Route tags were also added in RIP version 2. This functionality allows for routes to be distinguished from internal routes to external redistributed routes from EGP protocols.

RIPng

RIPng (RIP next generation), defined in RFC 2080 is an extension of RIPv2 for support of IPv6, the next generation Internet Protocol. The main differences between RIPv2 and RIPng are:
  • Support of IPv6 networking.
  • While RIPv2 supports RIPv1 updates authentication, RIPng does not. IPv6 routers were, at the time, supposed to use IPsec for authentication.
  • RIPv2 allows attaching arbitrary tags to routes, RIPng does not;
  • RIPv2 encodes the next-hop into each route entries, RIPng requires specific encoding of the next hop for a set of route entries.

No comments:

Post a Comment