Dynamic routing
Unlike static routing, dynamic routing is based on information exchanged between network devices to select the best available route to a certain destination. This adds scalability and adaptability that does not exist in static routing. Dynamic routing uses one or more Routing Protocols that create, maintain, and update the dynamic routing table. The logic and the algorithms used vary from one protocol to the other and in every scenario there is one or more routing protocol that better fits to the networking needs. The protocol that we will select depends on a number of factors. Before we can compare the different protocols with each other it is necessary to introduce three basic concepts: convergence, technology used to calculate the best route, and protocol support for Classless Inter-Domain Routing (CIDR). The concepts are explained in the following list:
Convergence: Each routing protocol has a different method to update the routing table. This will affect the time to converge the routing tables.
Technology: The two main methods are Distance Vector and Link-State. Distance vector protocols use a distance value that is based on the number of hops (devices along the path) to the destination. Distance vector protocols usually send the whole routing table to their neighbors as soon as there is an update. Link-state protocols use information sent from all the connected devices and are related only to the directly connected networks. Link-state protocols also take into account other factors when making routing decisions such as bandwidth. The routing information is sent in incremental form.
Support for CIDR: Routing protocols include classful protocols that do not send subnet mask information with their routing updates. With the other kind (classless routing) a series of addresses can be combined into one entry also because subnet mask information is transmitted.
The following table contains a comparison of three widespread routing protocols: RIP, OSPF, and BGP.
Protocol |
RIP (v2) |
OSPF |
BGP |
---|---|---|---|
Technology |
Distance Vector |
Link-state |
Distance vector (path vector) |
CIDR |
Yes |
Yes |
Yes |
Update |
30 seconds plus triggered |
30 minutes plus triggered |
Triggered |
Metric |
Hop |
Cost |
Path attributes |
Scalability |
15 hops |
Around 50 routers per area, a few hundred areas |
Thousands of routers |
Routing protocols are also divided into two categories that determine the most suitable use scenario:
Exterior routing protocols: Best used to distribute routes between different companies or organizations (BGP).
Interior routing protocols: Designed to distribute routes inside a single organization (RIP and OSPF).
Each of the protocols listed has its own method of operation. RIP is less complex to manage, but due to its characteristics, it can be considered suitable only for networks of very small dimensions. OSPF and BGP are more complex but will give a much greater scalability. Being the most commonly used protocol, OSPF will be the routing protocol explained in the text.