[AUDIO LOGO]
So now it's time to get a better look at deterministic MED.
We're going to take a look at the difference between what
IOS XE does by default versus what deterministic MED does
to the path selection process.
Now, we'll see, as we go through this discussion,
that deterministic MED is actually
enabled by default on IOS XR.
So this is mostly going to be about what
we have to do to effect this change on IOS XE.
And it is generally considered best practice
to enable deterministic MED.
So let's jump in and take a look at the details of how this
affects the overall process.
So our first example here is where
we're ordered from the newest to the oldest, in other words,
just the order in which the routes were learned.
And this is the default on IOS XE.
Now, what's the problem with this, or why do we care?
Well, the way the IOS picks the best path is it
takes the first two entries and compares them together.
Here's the problem.
This one is from AS 500.
This one is from AS 100.
And since they're from different AS numbers,
that means that the MED doesn't get considered.
Now, moving on, they're both external.
This decision is going to come down to the lowest router ID.
Well, the lowest router ID is 1.1.1.1.
And this becomes the best of those two paths.
So now, entry2 is our best.
Now we compare entry2 to entry3.
Once again, AS 100, AS 500, we don't look at MED.
MED is not considered.
So now, as we go down the BGP path selection,
we're going to prefer external over internal.
And this one is going to become the best.
And as we can see here, entry2 is our best entry
in this scenario.
I think the biggest thing to realize here,
whether deterministic MED changes
the actual ultimate decision or not,
MED wasn't even considered in this discussion.
We just chose the best path, and we crossed out
MED the whole way through.
MED didn't even get a chance to affect the decision.
That's not very deterministic if MED doesn't even get a chance.
Again, will it ultimately change the final decision?
Maybe, maybe not.
But it doesn't even get considered in, we'll say,
just the wrong scenario like this one.
MED wasn't even looked at.
Let's look at that same scenario now but now
with deterministic MED.
So now, we're taking those same prefixes,
but this time, they're ordered by the AS number.
And this is using the deterministic MED feature,
which is actually the default on IOS XR.
So what's changed?
Well, we can actually see here that they are now
grouped by the AS number, not the order in which they
were learned.
Remember that before, router 1 was entry2 up here at the top.
Now, router 1 is entry1.
So now what happens is we pick the best by the AS number.
In other words, we're going to start off
by looking at these two entries because they're
from the same AS.
And what we're going to do is we're going to go down here,
and we're going to go OK, they're
both from a single AS, AS 500.
This one has a MED of 100.
This one has a MED of 150.
Lowest wins, so entry2 becomes the best, the best from AS 500.
But then we clear that out, and we say, OK,
now take the best from AS 500 and compare it to AS 100.
OK, well, again, they're both one AS number.
In this case, they're from different AS's, so once again,
MED gets thrown out.
We prefer external over internal, so guess what?
Entry1 becomes the best.
Now, you might note that it's still router 1.
As I mentioned, deterministic MED
may not affect the ultimate end decision.
And in this case, it didn't.
But you see the important factor here
is that MED at least got considered.
It may not have been the final decision-maker,
but it was at least considered when
making our best path selection.
So let's clear this off, and let's take
a look at this same scenario.
But what if we turn on both?
So what if we do deterministic MED and always compare MED?
Let's see what that changes.
So once again, we're going to start off
by looking at entry2 and entry3 together because they're
from the same AS.
And once again, they're both from 500.
This one has a MED of 100.
This has a MED of 150.
Therefore, once again, entry2 wins.
So so far, entry2 is our winner out of this pairing.
So let's get rid of these.
And now we compare entry2 and entry1.
This one's from a single AS.
This is from a single AS.
So the AS path length is the same.
But now, remember, we have BGP always compare MED enabled.
So now it is going to look at the MED of 200 and 100.
And again, 100 is lower, so this now becomes the overall best.
So using these two features together,
we end up with a different answer.
Now, entry2 is the best.
Now, using these features together, of course,
we still have to make sure that those neighboring AS's,
100 and 500 in this case, are using compatible MEDs.
But you can see that at bare minimum,
we should turn on deterministic MED.
Deterministic MED is, at this point,
considered the best choice for new installations.
This is, again, part of why it's on by default on IOS XR.
You should probably enable it on IOS XE as well.
Now, do you always compare MED?
That one, of course, depends on your scenario.
In this video, we saw how using deterministic MED
actually ensures that MED is always at least considered
if we don't use this feature.
Then we saw, in our first example,
that depending on the exact order that the routes are
learned in, MED might not be considered at all.
Now, again, MED might not be making the final decision
as far as the best path, but at least it
gets to contribute or at least be involved
if we use deterministic MED.
And again, that is generally considered
to be the best practice, and that's
part of why it's enabled by default on IOS XR.
I hope this has been informative for you,
and I'd like to thank you for viewing.