Simple Dynamic Routing With RIP
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.
- 1Linux Top 3: Fedora 24, Peppermint 7 and Solus 1.2
- 2Linux Top 3: Alpine Linux 3.4, deepin 15.2 and Linux Lite 3.0
- 3Linux 4.7 Set to Boost Live Patching, Security and Power Management
- 4Linux 4.6 Charred Weasel adds USB 3.1 Support
- 5Linux Top 3: OpenIndiana 2016.04, Ubuntu 16.04 and Debian's New Leader