Dynamic routing protocols fall into several categories that determine how routers exchange and calculate path information across a network. Understanding the differences between interior and exterior gateway protocols, as well as distance vector and link state approaches, guides the selection of the right protocol for a given environment.
Dynamic Routing Protocols
So which dynamic routing protocol are you going to use? That is going to be determined by the different scenarios that are out there, by the scenario of the network that you're trying to set up. There are different types, so let's go over those different types.
The most obvious one here is IPv4 versus IPv6. If you're using RIP, RIP version 2 will handle IPv4 versus RIPng, which is going to be IPv6. Same thing with EIGRP: you have EIGRP and then you have EIGRP for IPv6. You have OSPF version 2 and you have OSPF version 3.
These fall into two major categories. One are interior gateway protocols and the others are exterior gateway protocols. I'm going to get a little more in depth into that, but just know that the interior gateway protocols are designed more for businesses and larger networks, versus the exterior gateway protocols, which are more designed for internet service providers. The interior gateway protocols use a distance vector or a link state to transfer the information back and forth, and we're going to go into the differences of that as well, versus an exterior gateway protocol, which is going to use path vector.
Depending on the different scenario that you have, you would choose whether you're going to have an interior gateway protocol or an exterior protocol. Probably if you're working with a corporation then you're talking about more of an interior gateway protocol. Then you're going to choose whether you need distance vector or link state — if you need the advantages of link state, or if distance vector is going to work out for you — and then whether you're using IPv6 or IPv4, and then you would choose whichever one is going to meet your specific needs.
So what is the difference between an interior gateway protocol versus an exterior gateway protocol? If you have your network right here, what you want to do is transfer information from router to router — that is the interior gateway protocol. So those are the interior networks, here, here, here. These could be different interior networks that you have, or maybe it's interior networks between many different companies. Then between internet service providers you are going to have an exterior gateway protocol. So these are the exterior gateway protocols that are going to operate between these networks, and so many different ISPs are out there, and when they interconnect they're interconnecting with an exterior gateway protocol.
As we saw a couple of slides ago, interior gateway protocols have either distance vector or link state, and you're going to have to choose which one is going to be best for your network. We also mentioned that exterior gateway protocols use path vector. We're not going to get in depth into path vector; it operates quite a bit differently than distance vector and link state.
With distance vector and link state, the differences are these. First of all, from a design perspective, a distance vector is much more simple: it's passing the whole routing table from one router to the next. Versus link state, which is a little more complex — it's sending a lot of little bits and pieces of information about each one of the links on that network. It will label the links and then send information about those links to the other routers. So that is the difference between distance vector and link state.
From an implementation standpoint, distance vector tends to be easier to implement because it's much more simplistic in how it operates, versus link state, which tends to be a little bit harder. Distance vectors tend to have fewer features involved, whereas link state tends to have more features involved. Distance vector tends to have less bandwidth usage because there are fewer updates being sent back and forth, versus link state, which has a lot more smaller pieces of traffic being sent all the time, and so it tends to be more chatty — it sends more information.
A distance vector bases how to get to these different networks off of hop count: how many hops does it take to get from the destination to the final destination, to the final network. Versus link state, which uses the shortest path metric, and so it creates a cost of how to get to the end destination, and then based off of that cost you're going to choose the best route.
Does each router have a global view? With distance vector, no. All it's seeing is just how do I get, where do I send it to get closer to that end destination, versus the link state, which has the whole picture in mind. This is kind of like the difference, I'd say, between if you print out instructions to get somewhere and they're listed — take a right at this gas station, take a left to get onto the freeway — and they're all printed out in words, versus you print out a map and now you have multiple routes to get to the end destination.
The infinite count problem: this can have routing loops when it comes to distance vector, versus link state, which can deal with those a little better.
Some examples of this: RIP is an example of a distance vector; OSPF and IS-IS are examples of link state. Notice I left EIGRP out. EIGRP can be considered more of a hybrid. It really is distance vector in how it works, but it has a lot of extra functionality and has quite a few advantages of link state as well, so think of EIGRP as being a little more of a hybrid there.
Distance vector is designed for smaller networks and networks that have similar bandwidth, because the metric is hop count. All your links need to be similar, otherwise it can't take into account the bandwidth between two different links, versus link state, which can, and it's built for larger networks with dissimilar bandwidths. The algorithm that distance vector tends to use is Bellman-Ford, versus link state, which tends to use Dijkstra's algorithm, and we are going to get more in depth into that as well.
Why would we choose one over another? Convergence speed means how fast these devices communicate and a router in the network gets the full view of what's going on, of where it now knows all the best routes to all of the networks. So from a convergence speed, distance vector tends to be slower because it's sending all the information about the routing table from router to router — it's a lot of information to pass off all at once — versus link state, which tends to be faster because it's sending out just bits and pieces about each of the networks, each of the links. It's the link state once again, so each of the links and the state that they're in.
From a scalability standpoint, distance vector doesn't scale well; there's a limit to how big those networks can be. Versus link states, which do scale much better. And remember, EIGRP is kind of that hybrid that's in here.
Resource usage: because distance vector doesn't have a lot of information that's being chatty all the time — it just needs to send a few updates now and then — there's less processing that happens, so there's less CPU usage. It's less information, so there's less data being stored, so there tends to be lower resource usage, versus link state, which tends to have a higher usage involved.
From the implementation and maintenance standpoint, distance vector tends to be simpler and you don't have to change as much or do as much configuration to get it to work correctly, versus link state, which can be more.
Let's look at a few highlights of some examples. We have RIP, Routing Information Protocol. RIP uses a metric — the metric is what it's determining the best route off of — and it uses something called hop count. Every hop that it takes, every layer 3 device that it hits between that router and the end network, the destination network, is considered a hop, and so it'll just count those up and then you come up with the metric of hop count. If it takes three hops to go one direction and five hops to go another direction, then it's going to take the route that only has three hops to get to that final destination. This works fine as long as all of your links have the same speed to them, but perhaps that five-hop route actually has faster connections with it; then that would actually be a faster connection, even though RIP would choose the three hop count.
So in that case, maybe you choose something like Open Shortest Path First. OSPF uses cost as a metric. What it's going to do is get a little more sophisticated with its calculation. It's not only going to take a look at the hop count, but really it's looking more at the bandwidth, the bandwidth of all the links between the router and the final destination, the final route that it's going. It'll plug that all in there, and it will then choose the faster links and send it across the faster links. Faster links equals lower cost, lower cost equals better, and so therefore that is what's going to get chosen.
Then we have Enhanced Interior Gateway Protocol, EIGRP. Its metric is cost, so it does use bandwidth as a calculation, but it also uses delay values, so it can actually see if there are delays. It can use a couple of other things as well: it can use reliability and load to choose what is the best route to get to the final destination.
In this chapter we're going to be talking a little more about RIP and some of the advantages of RIP, and we're going to get in depth into OSPF and what the cost is, how to calculate that. A good portion of this is going to really focus on OSPF, because that's primarily what you're going to see on the CCNA.
We started out with the table that shows a broad overview of the different routing protocols and how they differentiate themselves from each other. Then we got into the difference between interior versus exterior gateway protocols, interior gateway protocols being more designed for companies and large infrastructures, versus exterior protocols, which are more for internet service providers and the internet, and so that's where we would see the exterior gateway protocols.
Within the interior gateway protocols we have both distance vector and link state vectors. For smaller networks we would want to use more distance vector, versus the bigger networks, where we'd probably want to use more link state, and there are a few other decisions that we would make on choosing whether we want distance vector or link state. Then we gave some examples between RIP, EIGRP and OSPF. Moving forward we'll talk a little bit about RIP, but mainly this module is going to be about OSPF, because that's what you'll be tested on.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →