Now that we have our routing protocol configured
to support segment routing, and we've configured our devices
to inject a prefix SID for their loopback interfaces,
it's probably about time that we configure our environment
to actually use the segment routing labels or the prefix
SIDs.
Now, as we saw in the previous video, the reason
it's not doing it right now is that LDP is still enabled
and being preferred in our environment.
Now, we could just jump right in and turn off LDP
and hope everything works.
But probably a better choice, particularly if you're doing
a migration would be to actually just change the preference
to prefer segment routing, then check and verify
that everything's working.
And then finally, turn off LDP if that's our end goal.
So in this video, we're going to be
doing the first half of that.
We're going to configure our devices to prefer segment
routing over the LDP labels.
Then of course, we'll verify that it's still
working, we still have reachability,
and that it's in fact using those labels.
So let's go ahead and jump in and get started.
We'll bring up our topology real quickly just as a reminder
of what we're working with.
And then we're going to jump into the command line
and configure our devices to prefer
segment routing over LDP.
So we are still on MPLS Topology 1.
And again, all we're going to be doing now
is preferring this segment routing labels.
So there's not going to be a lot to see as far as the topology.
But we are going to be focusing on the traffic going
from router 6 to router 5 loopback.
And what we're really looking to see
is which label router 1 is imposing on to this traffic.
We'll verify this when we get to the command line.
But right now, it's using the LDP label.
We want to stop using that and we
want to start using the segment routing label.
So let's jump into the command line there on router 6
and verify what the environment is currently
doing before we switch it over
So we'll start off tracing the router 5 loopback sourced
from our loopback.
And what we see focusing particularly on hop 2
is when router 1 is putting this label on,
it's putting on label 24,006 or 24,009
depending on which equal cost path it's
choosing towards router three or router 4.
But the point is router 1 is clearly using the LDP label.
So now let's go ahead and change that preference.
We'll start here on router 1.
So all we have to do is go into configuration, into the ISIS
process, into the address family.
And then on the command where we did segment routing MPLS,
we simply have to add sr-prefer.
We can see here that it flat out says
that it's going to prefer segment routing labels
over LDP labels and that's, of course, exactly what we're
trying to do.
So we'll Enter that command, commit our changes,
and end configuration.
We can now do a show cef for 10.5.5.5.
And notice here, regardless of which path
it's choosing, either the path through router 4 or router 3,
notice that both of these paths are now imposing the same label
and it's the segment routing label 16,005.
Don't forget that's the prefix SID
that we assigned to router 5's loopback in the previous video.
So now we see that it's clearly using the segment routing
labels to do the forwarding, at least
according to the cef table.
Let's do some more verification.
We could also do a trace right from here.
Now, since this is router 1 doing the trace,
we see that it's locally imposing this label of 16,005.
So now that we see that this is working the way
we want it to, let's go ahead and turn this
on on the rest of our routers.
So let's hop over to router 2.
Once again, we go into configuration mode,
into router ISIS 1, into our address family.
And we turn on sr-prefer.
Routers 3 and 4 will be identical
so we'll simply paste that configuration in.
So there's router 3 and router 4.
Again, iOS XE, slightly different configuration.
So let's go over to router 5 and take a look.
So on iOS XE we want to go into configuration mode.
Then we go into segment routing MPLS right
from global configuration.
And there's a choice here that we can use to set attributes.
And this will Enter the sr. set attributes mode.
So it's a sub configuration mode.
So we'll say set attributes.
And then under here we go into our address family.
And again, the command is slightly different here.
It's sr-label preferred so we'll configure that.
Exit configuration.
And now let's do some final verification.
Let's go back over to router 6.
We'll do our trace again.
So based on this output, let's take a look at two things,
again focusing on hop 2.
First, we see it's still doing equal cost
multipathing between routers 3 and 4 as it should.
However, notice that it's now using the exact same label
for both routers 3 and 4.
If you remember, we had mentioned previously
in a different skill that one of the things about segment
routing is the labels or the prefix SIDs become global.
Since router 5 is the one announcing
what label to use for its loopback,
everybody's using the same label.
So previously with LDP implementation,
each device was making up its own label
to get to a destination.
Now, theoretically, if all the routers
had the exact same routes with the exact same time when
they all reloaded and everything was hyperconverged identically,
well, all the routers might have magically come up
with the exact same labels for the exact same prefix
but it would have just been random luck.
Here, the label becomes global because router 5 is telling
everybody which label to use.
And we can see that here represented in the traces.
When we were using LDP, we were using different labels
for routers 3 and 4 because that's
what they told us to use.
But now since we're using the label from router 5,
we can see that because it's 16,005
and that's what we had configured on router 5.
So routers 3 and 4 aren't making their own labels
up for this destination.
And of course, the other thing to pick up off the trace
since we said there were two things
is that it is in fact now using the segment routing label
which we've already discussed.
So that's obvious.
But those are the two big things here.
The label is global now and we're actually
using that label.
Now, just to verify our iOS XE configuration,
we should probably do a trace the other direction.
So now let's go from router 8 over to router 1.
So what we see here out of our trace,
particularly here on hop 2 is that we are in fact
using that segment routing label, the 16,001 which
of course, is the prefix SID that we configured on router 1.
So now our environment is doing segment
routing all the way through end to end in both directions.
In this video, we saw how to configure our devices.
Again, iOS XR and iOS XE being slightly different,
but we saw how to configure them to prefer the segment routing
labels over the LDP learned labels.
And we saw that it switched over and started
using those segment routing labels as we desired.
Now, since we're not using the LDP labels anymore,
we probably don't need LDP anymore.
So why don't we go ahead and turn that off.
That's exactly what we're going to do in our next video.
Until then, I hope this has been informative for you
and I'd like to thank you for viewing.