What are Routing Protocols?
In most cases, dynamic routing protocols are simpler than static routes. However, they still have the same goal – To build the routing table with accurate routing information.
Routing Protocols (RPs) discover connected routers that are also running the same protocol. These are called neighbours or peers. Once they establish a relationship with their neighbours, they share any routing information that they know.
Some routing protocols collect routing information to build a ‘map’ of the entire network. Others collect just enough to know the next hop along the path (like following road signs).
A router will ‘advertise’ routes that are locally connected. These advertisements are messages that tell the neighbours about the network. Those neighbours will pass on the information to other routers as well.
Sometimes there is more than one path to a network. If a routing protocol learns more than one path, it needs to decide which is the best one. To to this, it measures how good a path is and gives is a value called a metric. The metric is like measuring how long the path is. The shortest path is the best.
When the RP finds the best path, it sends the information to the routing table.
If there’s a failure along the best path, then the RP can inform the routing table about an alternative path. This is how dynamic routing protocols can respond to problems automatically.
Static routes still have their uses though. One key point is that a static route will override a dynamic route. This means we can use static routes during testing and troubleshooting.
Comparing Routing Protocols
There are two types of routing protocol:
- IGP (Interior Gateway Protocol) – Used within an organization
- EGP (Exterior Gateway Protocol) – Used between organizations
Often the organization is called an Autonomous System – A network that’s managed by a common group. Some large companies/organizations may have more than one Autonomous System, as they’re managed by completely different teams.
- BGP (iBGP)
- BGP (eBGP)
RIP is an old protocol that isn’t very good by today’s standards. It calculates its metric using hop count, which doesn’t take link speed or quality into account (so it might see a bad path as a good one).
EIGRP is a protocol that Cisco made. They eventually made it available to other vendors, but not many decided to use it. EIGRP has a very complex metric, which takes into account delay, load, reliability, MTU, and bandwidth.
OSPF is supported by all vendors. It has a good metric, which looks at the bandwidth of a link.
IS-IS is a very robust protocol, which is commonly found in the backbone of large networks (such as internet service providers). It is not as popular in small, medium, and enterprise networks.
iBGP is BGP when it’s used within an Autonomous System. It is complicated, but extremely tunable/customizable.
If we want to see the routing protocols in use on a router, use the show ip protocols command.
When we look at the routing table, take a look at the protocol codes in the far left column. These codes explain how a route was learned (which routing protocol learned it).
If a routing protocol knows of more than one path to a destination, it will use the metric to select the best one. This is then offered to the routing table.
If multiple paths have the same metric, they can all be installed in the routing table. This is called ECMP (Equal Cost Multipath). This enables these paths to share the load.
Each routing protocol can have very different metrics, which can mean very different things. Metrics from one RP are never compared to the metric of another RP.
If the routing table gets offers for a route from two or more RPs, it will choose the best based on Administrative Distance (AD). AD is how much the router trusts a particular routing protocol.
Cisco’s default AD’s are:
|Routing Source||Administrative Distance|
|show ip protocols||Privileged Exec||Shows routing protocols in use on the router|
|show ip route||Privileged Exec||Display the routing table|