In the last guide we talked about Dynamic Routing protocols and in this one one we’ll finish up with OSPF and EIGRP.
Link State Routing Protocols: OSPF
Link State is different than RIP because it doesn’t take its neighbors word for it. With RIP you learn by rumor but with Link State, the router sends out a Link State Advertisement (LSA) from the source router – not some intermediary router in between both of them. With Open Shortest Path First (OSPF), each router maintains the entire link state database with everyone. So each router has a complete picture of the network topology. It isn’t just based on what your neighbor says.
Also the hello timer for OSPF is 10 seconds (versus 30 seconds for RIP). But the difference is that OSPF doesn’t tell every router it’s entire life story with every update. It sends the entire link state database with one update and then takes a chill pill and doesn’t bother sending the database again. The hello packets are really slim usually just a few characters of text.
Let’s see what happens when I changed the routing protocol in our topology:
router ospf 1 network 0.0.0.0 255.255.255.255 area 1
The previous route underwent a metamorphosis:
O 172.17.0.0 [110/11] via 10.1.0.2, 00:00:06, FastEthernet0/0
The output means virtually the same thing as it does for RIP. But there is one major difference: the metric:
The metric is a number that says “Hey, this is how good the route is”. Different routing protocols use different metrics. RIP used the hop count but OSPF uses something called cost which says “This is how expensive the route is” which basically boils down to bandwidth.
It’s actually the number 100 divided by the link bandwidth. So if you have a T1 which is 1.544Mbps, OSPF says:
Okay, the cost of that link is 100/1.544 is 64.7 but I’m a lazy router that doesn’t care about decimals so I’ll just say 64
Then if there’s another link at 100Mbps that goes to the same destination, OSPF will do another calculation:
Alright so I’ve got this fast ethernet link at 100mbps. So 100 divided by 100 is 1. That’s a lower, more desirable metric cost that the other one, so I’ll use that.
The other nice thing about OSPF is that it converges a lot quicker than RIP which makes it ideal for production networks. In today’s modern networks, waiting 90 seconds for a response is completely unacceptable. In many cases, OSPF can converge in the low seconds. It’s very fast. And it’s open so the code isn’t locked away in some bullet proof vault.
EIGRP is not “Ergg Pee”
I once heard someone call EIGRP “Ergg Pee”. I don’t know if this guy was trying to sound intelligent or if he was just being funny but no one calls it “Ergg Pee”. Sometimes it’s better not to say anything if you don’t know what you’re doing lol. Anyway – that’s a little off topic.
EIGRP is Cisco’s proprietary interior gateway routing protocol but most people don’t use it any more because it’s not open like OSPF. It stands for the Enhanced Interior Gateway Routing Protocol and was meant improve on RIP and OSPF.
It can do cool stuff like unequal cost load balancing. So if you have two links to the same router but one is a 56kbps crap link and the other is a 1gbps fiber link, instead completely ignoring the slower link, EIGRP will intelligently balance some traffic over it.
But the cool thing about EIGRP is that it bases its metric off not only the bandwidth but also the delay. It can look at how long it takes to get from point A to point B. So even if you have a high bandwidth link, if the link is super long it might have more delay and be less desirable (for example, a Satellite link)
And like OSPF, it keeps track of all the neighbors and doesn’t flood all the routes every 30 seconds like RIP.
Configuration is a piece of cake:
First let’s axe OSPF so we can get EIGRP going on a clean slate:
no router ospf 1 router eigrp 1 no auto-summary network 0.0.0.0
The D means EIGRP.
EIGRP is actually a pretty complicated routing protocol. The details are messy so I won’t get into that now but I want you to pay attention to the metric:
D 172.17.0.0 [90/284160] via 10.1.0.2, 00:01:07, FastEthernet0/0
That big number 284,160 is based off the bandwidth and delay of the link. So if your router received two routes from two different source it would use the one with the lowest metric. EIGRP also converges super fast (faster than OSPF) which translates to less latency.
Incidentally, latency is a big deal. Large companies often spend hundreds of thousands of dollars to reduce network latency from 2 seconds to 200 milliseconds. This is serious stuff. I bet you know (or have heard) of a company that shelled out big bucks for this sort of thing.
So how do they compare?
Whether you’re using RIP, OSPF or EIGRP, the lowest metric is always the best metric.
EIGRP, knows about the network status faster than RIP. In other words it converges quickly. OSPF requires more router resources than EIGRP because each router knows the link state of the entire network based on the Shortest Path First (SPF) algorithm. This is very different than RIP’s routing by rumor setup. Each protocol has it’s own pluses and minus but all three are collectively known as Interior Gateway Routing Protocols (IGP) because they run instead an organization. Remember, RIP (Distance Vector), OSPF (Link State) and EIGRP (Distance Vector for setup Link State for updates) are really just fancy names for the rules routers follow to get the inside scoop on all the networks. That’s it. These are your Interior Gateway Protocols.
And just as there’s an IGP there’s also a EGP (Exterior Gateway Protocol). BGP (Border Gateway Routing Protocol) is THE exterior gateway protocol and is responsible for making the internet what it is today. BGP routes traffic between groups of tens of thousands of routes collected in what’s known as Autonomous Systems (AS). Service Providers like Sprint and AT&T use BGP to exchange these routes. BGP is just big protocol for exchanging routes between each AS which allows the internet to work.
The Bottom Line
And that my friend is how routing works. You know know about the EIGRP, OSPF and RIP. And why we even have routing protocols! I’ve really enjoyed this three part series on internet routing and I hope you’ve benefited from it. If so, just shoot me an email or leave a comment below.