Routing Information Protocol (RIP)

# Routing Information Protocol (RIP) | Computer Networks - Computer Science Engineering (CSE) PDF Download

ROUTING INFORMATION PROTOCOL (RIP)
Each node constructs a one-dimensional array (a vector) containing the “distances” (costs) to all other nodes and distributes that vector to its immediate neighbors. The starting assumption for distance-vector routing is that each node knows the cost of the link to each of its directly connected neighbors. A link that is down is assigned an infinite cost.

The cost of each link is set to 1, so that a least-cost path is simply the one with the fewest hops. (Since all edges have the same cost, we do not show the costs in the graph. Note that each node only knows the information in one row of the table (the one that bears its name in the left column). The global view that is presented here is not available at any single point in the network.

Implementation
The code that implements this algorithm is very straightforward; we give only some of the basics here. Structure Route defines each entry in the routing table, and constant MAX_TTL specifies how long an entry is kept in the table before it is discarded. One of the most widely used routing protocols in IP networks is the Routing Information Protocol (RIP). Its widespread use is due in no small part to the fact that it was distributed along with the popular Berkeley Software Distribution (BSD) version of UNIX, from which many commercial versions of Unix were derived. It is also extremely Simple.

#define MAX_ROUTES 128 /* maximum size of routing table */ #define MAX_TTL 120 /* time (in seconds) until route expires */ typedef struct {NodeAddr Destination; /* address of destination */ NodeAddr NextHop; /* address of next hop */

int Cost; /* distance metric */ u_short TTL; /* time to live */ } Route;

int numRoutes = 0;

Route routingTable[MAX_ROUTES];

RIP is in fact a fairly straightforward implementation of distance-vector routing. Routers running RIP send their advertisements every 30 seconds; a router also sends an update message whenever an update from another router causes it to change its routing table. One point of interest is that it supports multiple address families, not just IP. The network-address part of the advertisements is actually represented as a _family, address_ pair.

The document Routing Information Protocol (RIP) | Computer Networks - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Computer Networks.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

## Computer Networks

21 videos|107 docs|66 tests

## FAQs on Routing Information Protocol (RIP) - Computer Networks - Computer Science Engineering (CSE)

 1. What is Routing Information Protocol (RIP)?
Ans. Routing Information Protocol (RIP) is a dynamic routing protocol used in computer networks to determine the best path for data packets to travel. It uses a distance-vector algorithm to calculate the distance and direction of routes within a network.
 2. How does RIP work?
Ans. RIP works by exchanging routing information between neighboring routers. Each router sends periodic updates, called RIP advertisements, to inform other routers about the network routes it knows. RIP uses hop count as a metric to determine the best path, with a maximum allowable hop count of 15.
 3. What are the advantages of using RIP?
Ans. Some advantages of using RIP include simplicity, as it is easy to configure and implement. It also supports automatic network updates, making it suitable for small to medium-sized networks. RIP is also compatible with a wide range of network devices and can coexist with other routing protocols.
 4. What are the limitations of RIP?
Ans. RIP has certain limitations such as slow convergence time, as it takes time for routers to update their routing tables when changes occur in the network. It also has a limited scalability, making it less suitable for large networks. RIP's hop count limit of 15 can restrict its usability in networks with more hops.
 5. Can RIP be used in modern networks?
Ans. While RIP is still used in some networks, it is considered an older routing protocol and has been largely replaced by more advanced protocols such as OSPF and EIGRP. These newer protocols offer faster convergence, better scalability, and support for more complex network topologies. However, RIP can still be used in smaller networks or for educational purposes.

## Computer Networks

21 videos|107 docs|66 tests

### Up next

 Explore Courses for Computer Science Engineering (CSE) exam

### Top Courses for Computer Science Engineering (CSE)

Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

;