Chapter 1 – Introduction
In the last few videos, we’ve only been using static routes. These are fine to a point, but as the network grows, it requires a lot more effort to maintain. Also, static routes don’t respond to changes in the network.
So we’re now going to get an overview of dynamic routing protocols. In the following videos, we’ll pick one, and look at how it works in more detail.
Chapter 2 – What are Routing Protocols?
The goal behind dynamic routing protocols is the same as with static routes. That is, to build a valid routing table, so a router can forward packets to the right place.
But, the approach they take is very different.
When we configure a static route we do two things. We tell the router about a remote network, and will tell it how to get there.
This is a manual process, which can be a pain when you have a lot of routes.
Dynamic routing protocols have a different approach. Routers running one of these protocols will find other connected routers. We call these ‘neighbours’ or ‘peers’.
The router does this by sending out ‘hello’ messages on its interfaces. When it gets a hello in response, it knows there’s another router there.
These routers then form a neighbour relationship. They use this relationship to share information about the subnets they know, and how to get there.
Some routing protocols will use this information to build a full map of the network.
Others only concern themselves with direct neighbours. This is more like following road signs to get to a destination.
Each router will ‘advertise’ their connected networks. They are saying, “if you want to reach this network, send your packets this way”.
A neighbouring router then receives this advertisement. It will then store a copy of the route in a database in memory. If this is the best route, it installs it into the routing table. We’ll look at that in more depth later.
When a router learns a route, it will share it with other routers it knows about. Each of these store the route in memory, and advertise to their neighbours.
Convergence is the term used when the network has finished learning about all routes.
After the network has converged, routers continue to advertise their networks. This is their way of saying “They’re still here”.
What happens when a router learns the same route from two different places? In this example, a router is learning the 10.0.10.0 network from two different neighbours.
In a case like this, the routing protocol selects the best path to the destination. This path goes into the routing table.
The method it uses is like spanning-tree. Each path will have a metric. This is a number that shows how long this path is.
The routing protocol will see that one path has a lower metric than another. The lower the metric, the better the path.
There are a few different routing protocols. Each has their own way of calculating the metric, and deciding which path is better. We’ll look at that some more in a moment.
This will give you an idea of how routing protocols handle changes in the topology.
When a router or link in the network fails, the advertisements along that path stop. When a router notices this, it updates its list of neighbours.
It may need to update the routing table too. This may mean that the router has to remove some routes.
Or, there may be alternate paths available. In this case, the routing protocol adds the alternate route to the routing table.
This enables the network to automatically work around failures.
We can see then, that there are a few advantages to static routes.
Routes are automatically learned from neighbours
The best path is automatically selected
If we add a router or link, we don’t need to manually configure routes
If a router or link fails, the routing table can be automatically updated
Static routes still have their place though. In some cases, they’re quick and simple, and they help during troubleshooting.
Static routes are more lightweight than routing protocols. Routing protocols generate a small amount of traffic, and use CPU and memory on the router. Generally, this is not a big concern, but in large networks it can be an important factor.
If you have a moment, take a look at these quiz questions, to see if you’ve got a solid grasp on what we’ve been discussing.
Chapter 3 – Comparing Routing Protocols
As I said earlier, there are a few routing protocols to choose from. They fall into two groups. Interior Gateway Protocols, or IGPs, and Exterior Gateway Protocols, or EGPs.
It’s very simple. IGPs fit within your organization. As you can see there’s quite a few IGP options available.
An EGP provides dynamic routing between two different Organizations. Routing protocols often call different organizations Autonomous Systems. The only EGP available today is BGP.
The simplest example of using BGP is between your company and your internet provider. You are both different Autonomous Systems, as you’re both managed by different people.
This is common if you have a backup internet connection. If your primary connection fails, BGP routes traffic across the backup connection.
BGP is a special routing protocol which may be an IGP or an EGP. It gets complicated, and isn’t covered in the CCNA exam, so we won’t talk about it a lot.
For IGPs, we have five options available, but they’re far from equal.
The oldest is RIP, or Routing Information protocol. Unfortunately, it has critical limitations, and is not very good.
It uses hop-count as its metric. Remember that the metric is how a routing protocol measures how long a path is.
Hop-count is a very simple metric. Imagine a destination network is four routers away. Then RIP will measure this as 4.
Unfortunately, this is not a good metric. It doesn’t measure how good those links are. One path might have a metric of 2, but have very slow links. Another may have a metric of 4, but have fast links. RIP will think the slow path is better.
So the lesson here is, avoid RIP. It’s not worth the hassle.
One of the better options is EIGRP. Cisco designed EIGRP, so it was for Cisco routers only. They then allowed other vendors to use it, but few have taken them up on the offer, so we still consider it to be Cisco only.
It has a very detailed metric for measuring network paths. It looks at things like bandwidth, delay, link reliability, and link load. It puts those values into an algorithm, which creates the metric.
It’s also very easy to work with. At least, I think it is. Many people prefer our next option, which is OSPF
Another fantastic option is OSPF. This one has also been around for a long time.
OSPF wasn’t designed by one specific company. This means it’s used by all vendors. This makes it a popular choice in a network that uses equipment from various vendors. It’s the most popular IGP for that reason.
OSPFs metric is good, but much simpler than EIGRP. It defines each link as having a cost. This cost comes from the bandwidth of the link. The lower the cost, the better the link.
And OSPF organises the network into areas. This makes it easier to organise and plan out.
We’ll look at OSPF in more detail in the following videos.
IS-IS is a very robust protocol. It’s not common at all in small and medium networks. In fact, it’s generally only used in very large networks, like service providers. This is because it creates a logical backbone that can grow as needed.
While it works well, it’s definitely not as popular as other routing protocols.
Also, it’s a bit different to the others, which can make it harder to learn and use.
And finally, iBGP. We can use BGP in two ways; Internally as an IGP, and externally as an EGP. That’s why we use the terms iBGP and eBGP.
You can do some amazing things with BGP, as it’s extremely tunable. On this other hand, this often leads to a lot of manual configuration.
Usually, you would only use iBGP if there’s a particular reason to do so in your network. If you don’t have a particular reason, you would usually stick with OSPF or EIGRP.
BGP is difficult to learn to start with. Many network engineers never end up completely mastering it.
Now, here’s the interesting thing. We don’t need to select only one protocol and stick with it alone. A router can run more than one routing protocol at a time.
If we run the command show ip protocols, we get a list of all the routing protocols on this router.
Here we can see the router is running:
- And BGP
There’s a lot of information in this command. Don’t worry too much about the details yet.
If we now take a look at the routing table, we can see that this router has learned a few routes.
If you look at the column on the far left, you can see a letter next to each route. This is the code that tells us which routing protocol learned the route. The codes section at the top helps us to decipher this.
- The S is a static route
- The O is for OSPF
- EIGRP is slightly different, it has a D
- And B for BGP, whether it’s iBGP or eBGP
We’ve looked at a broad range of routing protocols now. Keep in mind though, that the CCNA exam will only look at OSPF in detail.
When you’re ready to go to the next level of certification, CCNP, then you will need to know EIGRP and BGP as well.
Chapter 4 – Path Selection