Many networks and Internet sites rely on dynamic routing protocols to properly connect users to their services. In this video, you’ll learn about distance vector, link-state, and hybrid dynamic routing protocols.
We’re surfing around to different websites. We often don’t think about the process it takes to get information from our computer to that remote web service and then back again. This process is handled by a series of routers on the internet, and each one of the routers knows exactly where your traffic should be going at every hop. It’s able to accomplish this thanks to a series of routing tables within the router, and one very common way to update that routing table is through the use of dynamic routing protocols.
The way that most dynamic routing protocols work is that they perform a listening process where they determine what other routers may be located close to them. They’ll then build a table within the router, and they’ll send their own advertisements out to those routers that are nearby. These advertisements allow routers to work together to build a series of routing tables, and those routing tables are used by the router to determine where traffic should be forwarded.
There are many different dynamic routing protocols, and each protocol has its own way of determining how it should build this table and determine what the best route is between point A and point B. Another important task of these routing protocols is to work around any outages that may occur. Our networks are constantly changing, and if suddenly your route becomes unavailable, the router performs a convergence process where it recompiles the routing table to work around this particular outage.
With all of these different routing protocols to choose from, which one should you use on your network? Well, the answer to that may depend on a number of different criteria. For example, are you trying to determine where a route might be based on the state of that link, whether the link is up or down, or is the important determination based on how far away that particular connection might be? And is distance something relating to the number of hops between one point and another, or is it related to the speed of the communication between those connections?
Another important consideration is how the routing protocol determines what the best path might be. This may be determined based on a certain set of criteria, and from that, it determines what a metric might be to a particular site. This metric allows the routing protocol to rank these routes from best route to worst route, and then it will send your data through the one that is the best type of connection.
Some dynamic routing protocols are very good at convergence. They very quickly can identify when an outage may occur and then can quickly redefine the routing tables to work around that outage. Other routing protocols may take longer to determine if a route is no longer available, and the convergence process may be very lengthy. Your requirements for writing protocol might also consider whether the protocol itself is something that many devices can use or whether it’s something that’s more proprietary and specific to a certain type of router.
Some routing protocols will determine what the best route might be based on how far away a particular connection is. These are called distance-vector routing protocols because the information between the routers is able to determine how many hops or routers away another network might be. If a link between two locations has a shorter distance, which means a smaller number of hops, then that is the vector that will be used to send that traffic.
The process for configuring a distance-vector routing protocol is relatively simple. On most routers, you simply enable the protocol, and the protocol takes it from there. This is a very good protocol to use for smaller networks, but they don’t tend to scale very well when you have hundreds or even thousands of routers that you have to manage. Some good examples of a distance-vector routing protocol are the Routing Information Protocol, or RIP, or one that’s very common to Cisco devices, EIGRP. This is the Enhanced Interior Gateway Routing Protocol.
Here’s a very simple diagram explaining how distance-vector routing works. You can see that we have Sam on one side of the network, and Sam wants to send some traffic to Jack. Between those two connections are a couple of different ways the traffic could take. It could hit R2 and then be sent directly to R1, which is then sending that traffic to Jack. And sending over that connection is a 100-megabit link.
There are faster connections in between, however. You can see that R2 is connected to R3 over a 1-gigabit per second connection. 10 times faster than the 100-megabit per second, but there’s another hop that has to take place, which is also 1 gigabits per second. If you were to look at this diagram, you may even consider that the faster connection between these two would be to take an extra route to be able to make its way to Jack. But with most distance-vector routing protocols, the most important criteria are the number of hops, or the distance. And because the shortest number of hops is two hops to be able to communicate between Sam and Jack, the default for a distance-vector protocol will take this connection between R2 and R1 and finally make its way to Jack’s workstation.
In our previous example, you could see that there was a faster way to communicate between those two devices, but it required an extra hop. In order to take that speed into account, we can use a different type of routing protocol, such as a link-state routing protocol. With a link-state protocol, the status of the network is what determines whether traffic can flow across that connection. If the network is up and running and performing at high speeds, you can send traffic over that link. If there’s a similar connection, but the bandwidth is not as available or perhaps not available at all, then obviously we would not send traffic over that connection.
Many link-state routing protocols also consider the speed of the network links when calculating the metrics. This means you may end up taking some additional hops, but ultimately, you’re transmitting that traffic over a much faster network. Link-state routing protocols are generally very scalable, and you often see them used on very large networks. One very common version of a link-state routing protocol is OSPF, or Open Shortest Path First, and it’s commonly used on some of the largest networks to provide dynamic routing.
Let’s look at the same network configuration we saw before where Sam is sending information to Jack. With our distance-vector protocol, we went the shortest number of hops, which was from router 2 to router 1 and then finally to Jack. But as we saw, there are faster connections if the traffic was to go between R2 to R3 and then R3 to R1. With a link-state routing protocol, we’re taking these speeds into account, and the routers know that the faster link is going to be through R3 at these 1-gigabit links rather than hopping from R2 to R1 over the 100-megabit connection.
As you can see, there are both advantages and disadvantages to both distance-vector and link-state protocols. But what if you could combine some of these protocols together to make an even more knowledgeable dynamic routing protocol? Well, there are some dynamic routing protocols we refer to as hybrid routing protocols where we’re using a little bit of link-state intelligence and combining that with distance-vector information to create a more hybrid routing protocol.
A good example of this is BGP, or the Border Gateway Protocol, which is commonly used on the internet to connect sites together. This type of hybrid routing protocol determines what the best route might be based on a number of different criteria, including the path the traffic will take, the policies that you’ve configured on the network, the speed of the connections, or even specific rules that you can integrate into the BGP protocol.