- [Instructor] In this video,
we want to compare OSPF with EIGRP.
Both are enterprise class routing protocols
but here in the encore course,
Cisco doesn't really have anything else about EIGRP,
we just need to know primarily about OSPF
except there is an item on the blueprint
where we need to compare the characteristics
of OSPF with EIGRP.
You'll get more into EIGRP if you take the ENARSI exam
and study for that, that's one of the concentration exams
as part of the CCNP Enterprise cert track.
But here we just want to do a high level comparison
between OSPF and EIGRP and we're going to compare
based on the following criteria,
we're going to compare the category of routing protocol
that each protocol falls into,
we'll compare their administrative distance,
see which one is more believable than the other.
We'll talk about how each calculates their metric,
timers work different, we'll distinguish between OSPF
and EIGRP timers.
And finally we'll talk about how they differ
in terms of load balancing.
But let's begin by understanding different categories
of routing protocols and seeing where OSPF and EIGRP fit in.
First, let's consider these three different categories,
distance vector, link state, and path vector.
Distance vector tells us in which direction
do we go to get to a destination network and how far is it?
If you think about your high school physics class
or maybe in college when you learned about a vector,
remember a vector gives us two pieces of information,
it gives us magnitude and direction.
In other words, go this way and here's how far it is,
that's what a distance vector routing protocol does.
It doesn't know the entire path that we have to go,
it just knows the next hop is in this direction,
we're going to go to this next hop IP address
or we're going to go out of this egress interface
and here's a metric or a cost representing how far it is
to get to that destination network.
And a link state routing protocol is going to have a map
of the entire topology.
The link state routing protocols use an algorithm,
it's called the Dijkstra algorithm.
It's the same algorithm that works on our navigation systems
in our cars or if you have Google Maps on your smartphone,
those navigation systems that give you directions,
they have a map of the entire topology
that you're going to be traversing and they are going
to assign a cost to each path
and it's going to mathematically determine
the lowest sequence of next hops that will get you there
with the least cost.
So link state routing protocols don't just say go
in this direction and here's how far it is,
it can look at the entire map of the topology
and all the routers within this area of the topology,
they've got the same map so they all agree on how to get
from point A to point B.
In a path vector and we're going to see that only applies
to BGP, a path vector is going to say,
"Yes, here's the direction that you go and no,
"we don't have a map of the entire topology
"but we do know the path, we know the autonomous systems
"that we have to transit to get to the destination network."
Now let's put these different protocols into categories.
RIP, Routing Information Protocol,
that's a distance vector routing protocol.
It says go out of this egress interface
or go to this next hop IP address and here's how far it is,
here's the hop count.
RIP measures how many routers we have to traverse
or hop through in order to get to the destination network.
And by the way, 15 is the maximum with RIP,
if something is 16 router hops away,
it's considered to be unreachable.
Now OSPF, the main focus of this encore course
is a link state routing protocol, it's got a map
of the entire topology.
And IS-IS, Intermediate System to Intermediate System,
that's also considered to be a link state routing protocol
and it also uses that Dijkstra algorithm.
Now EIGRP, that's what we're comparing OSPF with
here in this video.
EIGRP, the Enhanced Interior Gateway Routing Protocol,
it does fall under the distance vector category
but it's an advanced distance vector routing protocol.
And what I mean by advanced is it's not as fundamental
as RIP just saying, "Here's the best path and here's how far
"it is and here's where I'm going to go next,"
no, EIGRP can pre-qualify one or more alternate routes.
Yes, it'll find the best route and we'll talk a little bit
about how it does that in this video but if that best route
were to fail, we don't have to go through
a big massive calculation in all cases to see,
all right, is there another way to get there?
No, it's almost like we have a hot standby route standing by
that we can switch over to in a matter
of just like a couple of seconds or so,
so it's an advanced distance vector routing protocol.
And BGP, the Border Gateway Protocol,
that's often thought of as the routing protocol
of the internet.
As different autonomous systems are interconnecting,
they're going to typically speak BGP between themselves
and BGP keeps track of the autonomous systems
we have to transit to get to a destination network,
but with OSPF, the main protocol we're focusing on
in this course, I said it's going to have a map
of the topology.
I want you to think of that map much like a puzzle
and that map is stored in something called
the link state database.
Now, this is a puzzle one of my daughters
was working recently and it had like 1500 pieces to it
and as I saw it, it reminded me a lot of OSPF and I said
I've got to take a picture of this to show my OSPF students.
The reason I say it reminds me of OSPF is she was working
on this with her boyfriend at the time, fiance now
and they would help each other and they would say,
"Do you have Cinderella's slipper,"
or whatever it was and they would share pieces
back and forth and slowly over many days,
they put together this puzzle.
Well, it's the same thing with OSPF,
with Open Shortest Path First.
We've got different routers that know about different parts
of our topology, different parts of the network,
they're connected to different parts of the network
and they're going to share information.
This information is contained in LSAs,
Link State Advertisements
and these Link State Advertisements are essentially
like these puzzle pieces, we share the LSAs
between all of our members and together,
our collective IQ if you will, amongst all the routers
in the network, they can assemble this map of the topology
much like different people can assemble a puzzle
because they each have pieces of the puzzle,
when you put them all together, everybody has the same view
of the puzzle just like all the routers
within an OSPF network, they've got the same view
of the network once everybody
has the same complete link state database.
Another comparison between EIGRP and OSPF
is administrative distance.
Administrative distance is the believability
of a routing source.
For example, here R5 is being told by various sources
how to get to network 10.1.1.0/24.
R1 says, "This is the way to that network,"
R2 says, "Here's how to reach that network,"
R3 says, "I'll get you there,"
and R4 says, "Here's your ticket to 10.1.1.0/24."
Who do we believe?
Well, it depends on the source of the routing information
and each type of route information source
has an associated administrative distance value
and the lower the value, the more believable that source.
If we have a network that's directly connected to us,
well, that's pretty believable, we know that that network
is connected to us, we know how to get to that network
because we're part of that network
and that's the most believable of all,
so that has an administrative distance of a zero.
However, we could have a static route
that we administratively add to the router.
By default, it's going to have an administrative distance
of a one, so that's pretty believable but then we start
to get into our dynamic routing protocols.
EIGRP has an administrative distance of a 90
and OSPF has an administrative distance of 110.
That means that EIGRP is going to be more believable than OSPF.
Now by the way, this is for EIGRP within a network,
in other words, it's within an autonomous system,
we're not redistributing
another autonomous system into EIGRP.
If something gets redistributed in the EIGRP,
that EIGRP route is going to have an administrative distance
of 170, but here, we're assuming that everybody
is part of the same network
and we've got an administrative distance of a 90.
Now RIP is less believable still with an ED of 120.
So that's another comparison between OSPF and EIGRP,
specifically, EIGRP is a little bit more believable.
Now let's consider how OSPF and EIGRP are going to calculate
the best path to get to a destination network.
OSPF is going to use a metric of cost
and the lowest cost path is going to win.
And the cost is the reference bandwidth
divided by the interface bandwidth.
And by default, and we can change this but by default,
the reference bandwidth is 100 megabits per second.
And we're trying to get from PC1 to PC2 on screen
and one way we could go from R1 to R2 to R3
and then out to PC2 or we could go from R1 to R3
and then out to PC2.
If we were running a routing protocol like RIP
which only takes into account hop count,
it doesn't pay any attention at all to bandwidth,
then it would say it's a shorter hop count to go
from R1 to R3 out to PC2 as compared to going from R1 to R2
to R3 out to PC2, it's one fewer hop.
But we can look at this and say I don't want to use that path
of R1 to R3 because that's a 10 meg link,
I'd rather stay on the hundred meg links
and OSPF is going to agree with this.
So let's see how OSPF will calculate this cost.
OSPF would say the reference bandwidth is 100 meg,
the link speed is 100 meg and 100 divided by 100 is one
so we can give a cost of one to each of our 100 meg links.
What about that bottom link from R1 to R3?
Well, that's the reference bandwidth of 100
divided by the link speed of 10,
that's going to be a cost of 10.
So we can tell from this that we would rather go
from R1 to R2 to R3, that's going to be a total cost of three
as compared to going from R1 to R3 and then out to PC2,
which would have a cost of 11.
So here is our preferred path.
Here's a word of caution, though,
notice I said that the default reference bandwidth
was 100 megabits per second, what if we had a gig link?
Which is very common or a 10 gig link?
If we had a gig link and we had 100 meg
divided by 1000 meg a gig, what would the cost be?
Seem to be a decimal of 0.1.
We're not allowed to have decimal values for our cost
so what would we do?
We would round up to a one, if we had a 10 gig link
or a 100 gig link, they would all be a decimal value
and they would all round up to one.
That means by default from OSPF's perspective,
we've got the same cost for a hundred meg link
as we do for a gig, a 10 gig or even a hundred gig link,
that's not good.
What can we do?
Well as a best practice,
I like to set my reference bandwidth to a higher value,
I like to set my reference bandwidth
to something like 200 gigabits per second.
That way, those different high bandwidth links,
they're going to have different cost values
so just a real world caution for you.
Now let's compare this cost calculation
and a path selection with EIGRP.
EIGRP considers more than just bandwidth
and here's an acrostic to help you remember this.
Remember the acrostic big dogs really like me,
big dogs really like me.
And the B in big is going to remind us of the B in bandwidth,
that's one of the things that EIGRP can consider.
The D in dogs reminds us of the D in delay.
The R in really reminds us of the R in reliability.
The L in like reminds us of the L in load and the M in me
reminds us of the M in MTU.
Now let's talk about each one of these.
The bandwidth is really the weakest link.
As we're going through all these routers
to get to our destination,
whichever link is the slowest bandwidth,
that's the value that we're going to be using
for the bandwidth, in fact, the way we calculate bandwidth
is we take 10 to the seventh power and we divide it
by the link speed that's the slowest link
from point A to point B.
The delay is cumulative, it's not the weakest link,
every time we exit a router interface,
we're adding on a little bit of delay
so delay is cumulative.
And we'll get more into this in the ENARSI course
if you join us for that one.
Reliability, though, it talks about how reliable
the link is and it's some number over 255.
If we're not dropping packets, we're 100% reliable,
then that value is going to be 255.
The load describes how busy our link is,
even though a link might be a high speed link,
if it's congested, it's still not a good link for us.
So load is a number over 255 for a minimally loaded link
would have a value of a one over 255.
So we might have a load of one,
that would be a minimally loaded link.
And as a tiebreaker, we could use an MTU,
the maximum transmission unit, the default is 1500 bytes
for a packet but sometimes we reduce the MTU because we have
some extra header associated with a tunnel
or different reasons but the highest MTU couldn't win
as a tiebreaker.
The MTU itself, though, does not go into the formula
and the formula is a bit intimidating to be honest,
here it is.
Here's the formula for the EIGRP metric.
Now, I don't expect you to memorize this for the exam
but I want you to understand that there are ways
of influencing the metric to pay more attention to bandwidth
or delay or reliability or something like that, for example,
if I wanted to pay more attention to the bandwidth value,
I could change that K1 variable to a higher number.
By default, that K1 value is a one.
In fact, here are all of the default K values that we have
with the EIGRP.
Now this is with traditional EIGRP,
there's something now called named EIGRP
where we actually have a sixth K value.
Again, we'll get into that in the ENARSI course,
this encore course is focused on EIGRP
but notice the default K values,
there are three of them that are zeros, K2, K4, K5,
they're all zeros and if we plug all those in,
the formula honestly kind of breaks down.
Look at that K5, you see the K5 is zero
and part of the formula is K5 divided by K4
plus the reliability.
Well if K5 is zero, that whole thing is zero
and we're multiplying zero times everything
in the parentheses, it's all going to be zero.
Well, there's an exception to this.
It says that, yeah, this is the formula unless K5 is zero.
If K5 is zero, then we assume that K5 over K4
plus reliability, we assume that entity is a one.
I know it kind of breaks the rule but that's the way it works.
Now, if you do the plugging and chugging,
you'll see that it really falls out to where EIGRP
is really only considering bandwidth and delay by default.
In fact, that was a question I missed
on a technical interview when I was getting a job down
at Walt Disney World as a network designer,
they used EIGRP on over 500 routers at Disney World
and they asked me, by default, what does EIGRP use
to determine the metric?
And I knew this acrostic, so I rattled it off,
I thought big dogs really like me and I said really quickly,
I said, "It's bandwidth, delay, reliability, load and MTU,"
and they said, "No, that's wrong."
And I thought, "What do you mean it's wrong?"
But then they pointed out that they had asked by default,
by default, we've got all these zero K values,
we're not using MTU as a tiebreaker.
By default, we're only considering bandwidth and delay.
And that's how the metric is calculated,
now let's see how EIGRP will use that metric
in making its path selection decision.
Take R3 for example, let's say that R3 wants to get
to the network of 10.1.1.0/24 on the left hand side
of your screen, it can get there from R1 or R2.
It's got two EIGRP neighbors and they're each
going to report their distance from the network,
their metric.
Now each of those routers R1 and R2,
their metric to get to 10.1.1.0, they're directly attached,
their metric is, we'll say 1000, okay?
They're going to report that information to R3.
R1 says, "I can get there in 1000" and R2 says,
"I can get there in 1000" but R3 realizes
that it's going to cost something to get to R1,
it's going to cost something to get to R2.
So R3 is going to say let me add those up.
R1 reported a metric of 1000 to get to that network,
that was the reported distance.
You see there on the column of RD, reported distance,
R1 reported that to me of 1000 but it cost me 10,000
because maybe I'm on a serial link,
maybe it's a 10,000 cost for me to get to R1.
Well, I've got to add those two up, 10,000 plus 1000,
that's 11,000.
That gives us what's called our feasible distance or the FD.
What if I went via R2?
Well, it reported a thousand metric to me as well.
How much does it cost me to get R2?
5000, let's add those up, 1000 plus 5000
gives us a feasible distance of 6000.
And I'm going to go with the lowest feasible distance
and that's going to be the path via R2.
That's how EIGRP calculates its metric
and makes a path selection decision.
Another distinction I want to make between OSPF and EIGRP
in this video deals with timers.
When we talk about timers, we're talking about
a conversation that goes on between neighbors
be they OSPF neighbors or EIGRP neighbors.
In order for one router to know that its neighbor
is still there, it expects to hear a hello message
from that neighbor periodically and the timers work
a little bit different with OSPF and EIGRP.
With, OSPF we have something called a hello interval
and there are default values for the hello
depending on what kind of network we're on
and we can certainly set that but I want you to know
about the hello interval.
That says how long we as a router are going to wait
before we send another hello message to our neighbor.
So we have a hello interval
and we've also got a dead interval.
That says how long am I going to wait to hear a hello
from my neighbor before I consider that neighbor
to be no longer available?
And OSPF neighbors, they have to have matching timers,
they have to agree on how often are we going to be sending
these hellos to one another and how long are we going to wait
before I consider you to be down?
Compare that with EIGRP,
EIGRP has the same kind of hello interval,
it says how long are we as a router going to wait
between sending our hello messages to our neighbor
but here's where it gets different,
EIGRP does not have a dead interval,
it has something called a hold time and this says
not how long we are going to wait to receive a hello
from our neighbor, this is information that we send
to our neighbor.
We're telling our neighbor wait for me for this long,
if you don't hear from me for this duration of time,
consider me to be down.
So again, the big difference is OSPF has the dead interval
and it says, if I don't hear from my neighbor
within this time, they're dead to me but with EIGRP,
I'm telling my neighbor, "Hey, wait for me for this long,
"then you consider me to be down."
It's like when I'm going into a cave and I say,
"If you haven't heard from me in 20 minutes,
"send help or something."
We're telling our neighbor how long to wait for us
with EIGRP, that's the difference.
And finally, let's compare how load balancing works
between OSPF and EIGRP.
With OSPF, we can load balance across equal cost paths.
Now in this example, with this topology on screen,
let's say that we're sending traffic from a device
off of SW1 to a device off of SW3.
Well, as we go down the topology and we get to R2,
R2's got a couple of ways of getting to SW3,
it could go via R3 or it could go via R4.
Now OSPF is going to consider only bandwidth
in this calculation and notice the link speeds,
they're different.
We have a 256 K link between R2 and R3,
we've got a 512 K link between R2 and R4.
So OSPF is going to say, "I'm going to choose the best link,
"I'm going to go from R2 to R4.
"Yeah, I might use R3 as a backup if R4 were to go down
"but I'm going to just use R4."
It kind of seems like we're wasting bandwidth, doesn't it?
I mean, sure, it's not as fast but I could still be sending
some traffic via R3, I can send more via R4
but it'd be nice if I could send some via R3 as well.
OSPF doesn't do that but EIGRP can,
EIGRP has a feature called the variance feature
and the variance feature is a multiplier,
let me show you what I mean.
Let's say that the feasible distance from the perspective
of R2 to get to this network off of SW3
is about 10.5 million and if we go via R4,
the cost is about 5.5 million.
Well, what we can do in EIGRP router configuration mode
is give the command variance followed by this multiplier
and let's say it's variance two,
if we multiply our best feasible distance
which is just over 5.5 million, if we multiply that by two,
the variance multiplier, we get about 11 million.
What we're saying is now, we will load balance
across any link whose feasible distance is less than
that 11.028992 million,
not equal to but less than that value.
Now think about that link via R3, it's about 10.5 million,
is it less than the 11 million number?
It sure is so even though it's not as good of a link
as compared to the link going to R4, we can still use it,
we can still load balance across it
if we can figure the variance feature.
And by the way, if we do this,
EIGRP is going to be really intelligent about this
and it's not going to try to send an equal amount of traffic
via R4 and R3, it knows that R4 is better.
It's going to give a proportionally higher amount of traffic
to the link going to R4 as compared to the link going to R3
but this lets us use what would be a just a doormat
standby link with OSPF.
It lets us actively use it to send traffic
and that's a comparison between some of the key features
of OSPF and EIGRP.