August 22, 2014
 
 
RSSRSS feed

Simple Dynamic Routing With RIP

Inside RIP

  • October 15, 2008
  • By Charlie Schluting

Welcome to the heart of networking: the routing protocols. We begin our series of looks at these protocols with one of the originals, and the most simple: RIP, the Routing Information Protocol.

RIP, like all routing protocols, is designed to disseminate network information pertinent to routers. At the most basic level, routers need to know what networks are reachable and how far away they are. RIP does this, and it’s still widely used today. In fact, we received feedback regarding last week’s Routing Overview from a reader who happily uses RIP at the ISP he works for.

Many people have nasty things to say about RIP. They say it converges slowly, it doesn’t scale, it’s insecure because authentication is only plain text, and it suffers from split-horizon issues. This is all true, but it’s still very useful. We hope this article will shed some light on these issues, and help you understand one of the most widely used interior gateway protocols (IGPs) out there.

RIP comes in two flavors: version one and version two. RIPv1 is very limiting because it doesn’t support CIDR addressing. This means it is classfull only, and you can’t slice up, for example, a /24 space into smaller units. RIPv1 also uses broadcast to send its information, which means that hosts can’t ignore RIP advertisements. Remember that each time a broadcast is sent, every host in the broadcast domain will receive an interrupt, and it must process the packet to determine if it’s something it cares about. RIPv2 uses multicast, which will be covered in a future installment of Networking 101. For now, just trust that hosts can ignore multicast without having to process the packet.

Remember, we said that RIP is a distance-vector protocol. The distance part is referring to the hop count in RIP, and the vector is the destination. Other distance-vector protocols may use other criteria for the vector, like an AS path in BGP. Both RIP flavors send their information every 30 seconds to UDP port 520. But what do they send? If you assumed “their routing information” you are correct. It can send specific information about networks it can reach, and also advertise itself as the default gateway (by sending 0.0.0.0 with a metric of 1).

The RIPv2 packet contains headers, just like any other protocol. Note that RIP is above UDP, so it is essentially an application-layer protocol. Every RIP packet contains a command, a version number, and a routing domain. Then up to 25 routes will follow in the same packet.

Sitemap | Contact Us