RIP Route Determination Algorithm and Metric
(Page 1 of 3)
As I mentioned in the overview topic on TCP/IP routing protocols, one of the defining characteristics of any routing protocol is the algorithm it uses for determining routes. RIP falls into the class of protocols that use a distance-vector or Bellman-Ford routing algorithm. To help you better understand exactly how RIP determines routes, I will now discuss the specific implementation of the algorithm for RIP and provide an example so you can see exactly how RIP determines routes and propagates information across a network.
The job of RIP, like any routing protocol, is to provide a mechanism for exchanging information about routes so routers can keep their routing tables up to date. Each router in an RIP internetwork keeps track in its routing table of all networks (and possibly individual hosts) in the internetwork. For each network or host, the device includes a variety of information, of which the following are the most important:
In theory, the distance metric can be any assessment of cost, but in RIP, distance is measured in hops. As you probably already know, in TCP/IP vernacular, a datagram makes a hop when it passes through a router. Thus, the RIP distance between a router and a network measures the number of routers that the datagram must pass through to get to the network. If a router connects to a network directly, then the distance is 1 hop. If it goes through a single router, the distance is 2 hops, and so on. In RIP, a maximum of 15 hops are allowed for any network or host. The value 16 is defined as infinity, so an entry with 16 in it means this network or host is not reachable.
On a regular basis, each router running RIP will send out its routing table entries to provide information to other routers about the networks and hosts it knows how to reach. Any routers on the same network as the one sending out this information will be able to update their own tables based on the information they receive. Any router that receives a message from another router on the same network saying it can reach network X at a cost of N, knows it can reach network X at a cost of N+1 by sending to the router it received the message from.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.