[MUSIC PLAYING]
So let's get started here with an introduction
to segment routing.
Now, what we're going to really be focusing on
is, what does this give us that we
don't get from traditional MPLS forwarding.
The fact of the matter is at the end of the day,
this really is MPLS forwarding.
What changes a bit is how we're using the labels
and how the labels get advertised to neighbors
and things like that.
So that's the purpose of this video
just to get some of the concepts and a little bit of terminology
out of the way.
And then, of course, in the later videos,
we'll be jumping into most of these topics
in a bit more detail.
So let's go ahead and get started
with a good introduction to segment routing.
So again, keep in mind that segment routing is really
just building on top of the basic or traditional MPLS
forwarding paradigm.
We're still using labels.
We're still forwarding our traffic
and doing label switching based on those labels.
However, the way we use them and the way
that they're going to be learned is slightly different.
But again, the data plane, at the end of the day,
still using MPLS.
So that part's not changing.
The headers don't change.
The label structure itself doesn't change.
Everything here as far as the MPLS side
is exactly the same as traditional or legacy MPLS.
The major difference between the segment routing
and the legacy or traditional, or you
could say LDP-based MPLS, lies in the control plane.
And that main difference is we're going to see as we go.
We're going to be getting rid of the LDP.
We're not going to be using label distribution
protocol any longer.
So what does that really mean at the end of the day?
Well, it means that we're going to be changing things in sort
of two significant ways.
The first is the labels are usually going
to be having identical values.
And because of this, in the SR domain,
these labels are going to have global value
because it'll be the same label for the prefix on every device.
And as we sort of already mentioned,
our second big change here is that the labels
are going to be advertised not by LDP but by our IGP, which
would be either OSPF or IS-IS.
Of course, these two protocols will
need to be modified to support this,
and we'll be talking about how they're modified
as we move through this skill.
So those are some changes to the operation,
but what is this really all about?
What are we trying to achieve here?
Well, there's really two major concepts
that surround the idea of segment routing.
The first is this is a form of source routing.
In case you're not familiar with source routing, what
this means is that the source, or the ingress router,
is the one that actually chooses the path that is then
encoded into the actual packet.
This is going to be done in an ordered list of segments,
or we can also call these labels.
And then the rest of the network simply executes
those encoded instructions.
In other words, we're going to forward the traffic
along the path specified by the source.
Then of course, we have the segments themselves.
Now, like we said, the segment is a label,
but that segment or label can mean different things
or be used for different things.
The segment can really identify any type of instruction.
It can be a service.
It can be a context, a locator, an IGP-based forwarding
construct, a BGP-based forwarding construct.
It can be a local value or a global index.
Now, of course, we're going to talk about more of these things
as we go through the rest of this skill as well.
We're not going to cover all of these,
but we'll cover the major ones that are
involved in segment routing.
So each of these segments is actually identified
by a segment ID, or what we generally call the SID.
Those SIDs also come in two different types.
So the two different types of segments, or SIDs,
are first we have the global segment.
The global segment represents a node,
also known as a prefix-SID.
This is really any node in the SR domain
that can interpret an associated instruction.
Each node in the SR domain then installs
that associated instruction into the forwarding table.
This, of course, is what we're going
to be using in MPLS to actually forward the traffic then.
Now, one interesting thing here about segment routing
is these prefix-SIDs have a label value that is manually
assigned from what's called the Segment Routing Global Block,
or the SRGB.
Now, we'll be talking about this manual assignment and the SRGB
in more detail here coming up.
Now, since this is a manual assignment essentially
identifying a prefix, much like IP addresses,
this cannot be duplicated in the SR domain.
This must be a unique value.
So keep that in mind when we're assigning prefix-SIDs.
What we're actually talking about here
are the labels that we're going to be using for our destination
networks.
So typically, client-facing networks, loopback interfaces
on PE routers, things like this, those
are the things that are going to get prefix-SIDs identified
or assigned to them.
We're not going to be assigning these
to every prefix in our routing table, just the prefixes
that we're going to be using as destinations.
The next type of SID we're going to have is a local segment.
This represents a link.
This is known as the adjacency SID.
And here, this is only going to be for devices on the segment.
So only the segment originating nodes
can interpret the associated instruction on this type
because it's for connected neighbors.
This label, much like traditional MPLS labels,
are still going to be dynamically allocated
from the dynamic block, so in other words,
the same block that MPLS would normally
be pulling its labels from.
Now, this does vary a little bit on iOS XE versus iOS XR,
but we'll cover that more when we get to implementation.
And again, since this is an adjacency,
this is going to be allocated to physical links
in our environment.
So now that we have sort of a rough idea
here of these two different segment types,
let's focus in a little bit on that SRGB.
So the Segment Routing Global Block
defines the actual label range that we're
going to be using for segment routing.
This has to, of course, be defined
on all of the devices in the environment,
and then it gets distributed as a combination
of the label range itself, as well as an index number
for things like the prefix-SID.
Now, on iOS XR, this defaults to 16,000 through 23,999.
Now, this range is going to be reserved on iOS XR
even if segment routing is not enabled.
The IGP will register this range when
segment routing is enabled.
We'll, of course, see this in action
when we get to our implementation skill.
So ultimately, this is all put together.
The assigned label to a particular prefix
will be the prefix index number plus the SRGB base.
So let's discuss a little bit about what that means.
Let's say that we have a prefix that we have, we'll say,
10.1.1.1-32.
We want to give this a label in segment routing.
Well, there's actually two ways to do that.
We could say that the absolute value is say,
for example, 16,010.
Or as another choice, we could say that it's an index of 10.
So what it'll do is take this index number
and add to that the base of the label range, which again,
remember is 16,000 by default. So it would add 16,000 to this.
And ultimately, of course, we're going to end up
with the same label 16,010.
So as we're configuring this, we can actually
configure either one.
We can configure this as an absolute value,
or we can configure it as an index.
It really doesn't matter as long as we end up with the label
that we want to use for each given prefix.
Now, as far as the rest of the label range,
the range above the 24,000 is still
going to be used for dynamic labels,
such as the adjacency set and any other MPLS
labels that might be used on this particular device.
So again, just keep in mind that 16,000 to 23,999 is on iOS XR,
that default label range.
Now again, we'll see as we jump into this,
iOS XE acts just a little bit differently here as far
as the SRGB goes.
But we'll see how that works when
we get into implementation.
Just to point it out, it simply doesn't reserve the range
automatically and by default and start the dynamic range
above 24,000.
It actually starts the dynamic range
at 16, which is above the reserved MPLS labels of 0
through 15.
So it just doesn't pre-reserve the SRGB range on iOS XE.
But again, we'll see that when we get to implementation.
Now, something else pretty cool here
is since segment routing is still just using
MPLS for the data plane, that means
that segment routing and traditional or legacy MPLS
can be mixed with no problems, which
means these can easily coexist.
Now, if they do coexist, and we have both LDP and SR
labels, by default LDP is still going to be preferred.
Now, we're going to see when we get to implementation
we can, of course, change that.
But if they do both exist, the default behavior
is still to prefer LDP.
That behavior may change in the future.
However, the way it is right now, this
is actually very, very convenient
when it comes to doing things like migration.
This means that you can have your LDP functional environment
continue operating while you implement segment routing,
and then at some point in the future, simply
change this preference right here
and switch over and start using segment routing.
So as we've mentioned, a segment is simply
encoded as an MPLS label.
An ordered list of segments that we want to traverse
is going to be encoded as an MPLS label stack.
We know that MPLS can support more than one label.
Each label is simply put in the order of the segments
that we wish to cross.
That's how the source-based routing operates.
Once that segment is actually used, in other words,
once we're past that segment in the forwarding,
that segment is then removed from the stack
so that the next label for the next segment
is then the top label, and that's
how we do our forwarding.
So our final thing to cover here,
how does a node decide whether it should impose
a prefix-SID label on a packet?
And the answer has a couple of things.
First, the destination itself or the next hop
that the destination resolves on matches
a forwarding equivalency class that has
a prefix-SID assigned to it.
Also, the downstream neighbor has to be SR-enabled.
It will, of course, know this from the IGP.
Also, the node has to be configured to prefer the SR
label over the LDP label.
Now, of course, we only have to prefer one
if LDP is configured.
The other option would be LDP is not configured.
So guess what.
It doesn't even have an LDP label.
If it doesn't have an LDP label, then there's
nothing to fight with.
And if we have an SR label, then that's clearly the one
that we would use.
So in this video, we jumped in and got an introduction
to segment routing.
We talked about how it uses source-based routing
and a label stack with prefix-SIDs to get traffic
to the destination.
We also talked a bit about how the control
plane is going to be replaced.
We're no longer going to use LDP.
And instead, we're going to use the IGP.
Now, that change in the control plane
is, of course, going to take a more detailed look
to understand how it works.
And that's exactly what we're going to do next.
Until then, I hope this has been informative for you,
and I'd like to thank you for viewing.