RIP : Routing Information Protocol
This article explains how to configure Routing Information Protocol (RIP) Version 1 and Version 2. In this tutorial you will learn RIP commands, metric and RIP configuration.
RIP is Dynamic Routing protocol which works on Distance Vector technique.
Distance: Means actual distance, how far is a network. In RIP distance is measured in hop counts.
Vector: Means direction, to reach a destination which direction should I take.
Below is some information about RIP:
- Open standard Protocol
- Classful Routing Protocol
- Administrative Distance is 120. Administrative distance means the trustworthiness if a particular route. Since there are many different protocols, if we have more than one route to a destination, each route with different routing protocols, which one to select is decided by its administrative distance, lesser the better.
- Metric is Hop Count ( where least hop count is best)
- It supports Maximum 15 hops and Maximum 16 routers. 16th Hop is not reachable.
- Load Balancing of 4 Equal paths
- Used for small organizations
- Sends periodic updates and exchanges the routing table every 30 seconds
- Available in 2 versions RIPv1 and RIPv2 (Classless)
- Supports IP and IPX
- It uses the UDP port 520
- Classful routing Protocol which means the subnet mask is not included in routing table updates.
- Does not support VLSM
- Send updates as broadcast to IP address 255.255.255.255
- Classless Routing Protocol which means subnet mask is included in routing table updates
- Supports VLSM
- Send updates as Multicast using IP address 188.8.131.52
- Supports Encryption and Authentication
RIP v1 and RIP v2 have interoperability.
RIP users certain timers to sends its information to other neighboring routers.
- Update Timer: is of 30 seconds by default. It is the time between consecutive updates i.e. router send updates every 30 seconds.
- Invalid Timer: is of 180 seconds by default. It is the time a router waits to hear an update before marking it as invalid. If an update is received before the timer expires, then the timer is reset. The route is marked unreachable if there is no update during this interval
- Flush Timer: is of 240 seconds by default. It is the time before an invalid route is removed/flushed from the Routing Table. It runs along with the Invalid timer and if a route is marked invalid, after 60 seconds, it is removed from the routing table.
- Hold down timer: is of 180 seconds by default. The amount of time for which the information about poorer routes are ignored.
Advantages of RIP:
– Easy to configure
– Less overhead
– No complexity in design like OSPF
Disadvantages of RIP
– As updates are sent via broadcast every 30 seconds , bandwidth utilization is high
– Only considers hop count to reach a destination does not take bandwidth of link into consideration
– Limited scalability, only up to 15 hops
– Slow convergence ( time taken by router to use alternate or backup route if best route is unavailable)
Let’s take a scenario, consider the below diagram with three routers.
Now let us configure RIP on the devices and establish connectivity.
The command ‘router rip’ will enable the RIP process. The ‘version 2’ command tells RIP to use version RIPv 2. The ‘network 192.168.1.0’ command tells RIP to advertise the network 192.168.1.0 to other RIP routers. We do not mention the subnet mask while giving the network to advertise.
Now that we have configured RIP, Let us try to ping the other network and see if they are reachable.
We see that when we ping from Network 192.168.1.0 to any of the PCs in the other network, we are getting successful pings J. We have configured RIP successfully and established connectivity.
Let us have a look at the routing table to see how it looks after RIP configuration.
If you do a trace route from PC 0 ( 192.168.1.1) to PC 5 ( 192.168.3.1), we see the path that is followed.
The show ip protocols command will give us good information about the protocol RIP
It tells us, the protocol configured is RIP. It also says the updates are sent every 30 seconds. The timers are shown with their default times. We also see what version of RIP is being used. Information about Network which are being routed using RIP is also mentioned. The administrative distance is also seen in this output of show ip protocols.
Routing Loop Avoidance
Consider the above diagram, If no loop avoidance mechanism has been configured and if the network 192.168.3.0 /24 goes down, Router C will update Router B within the update times limits ( 30 seconds) mentioning that the route is unreachable i.e. a metric of 16.
But it could be possible that Router B, sends an update to Router C first. So, as Router B knows it can reach network 192.168.3.0 /24 in one hop via Router C. This creates an impression for Router C, that it can reach the network 192.168.3.0 /24 in two hops, through Router B.
Thus, each router continues to increment the metric of the network till it reaches the hop count of 16. This is known as counting to infinity.
Such issues can be prevented by using loop avoidance mechanisms.
Split Horizon: This is a mechanism in which , if a Router learns something from a neighbor router, it will NOT advertise that same information to it.
Considering our example, Router B actually learnt about the network 192.168.3.0 /24 from Router C, so it will never give information about the network 192.168.3.0 / 24 back to Router C. Cisco devices have split-horizon enabled by default on all routers.
Route Poisoning: If a network goes down ( e.g. 192.168.3.0 /24) a triggered update is sent to all its neighbors. The triggered update contains the network that is down as an infinite metric (16).
Hold-down Timer: When the other routers know that network 192.168.3.0 /24 is down, they start the hold-down timer which runs for 180 seconds and the below happens:
– If any information about the 192.168.3.0 /24 network from another router with a same or poorer metric than existing in the router, then the information is ignored.
– If information with better metric for network 192.168.3.0 /24 is received, then the hold-down timer is stopped and the routing table is updated with the new information.
– If no information is received and the hold-down timer expires the network is removed from the routing table.
Hope this information is of some help 😉 !!
- Routing and Routing Protocols
- Routing, Static Routing, Dynamic Routing
- Default Route and Static Routes Configuration