[AUDIO LOGO]
So now that we understand that MPLS is all about label
switching-- it's right in the name--
it's time to actually jump in and take a look
at what these labels look like.
Where are they actually carried in the packet structure?
And what's the structure of the label itself?
So that's what we're going to be exploring in this video.
So let's just go ahead and jump in
and start talking about those details.
And then we're also going to jump in to Wireshark
and see what an MPLS packet actually
looks like on the wire.
So let's go ahead and get started.
OK.
So the MPLS label--
first, this is a 32-bit header.
And we refer to it as a shim header.
The reason for this is it doesn't exactly
fit into the OSI model in any of the particular layers,
because it actually goes between layer 2 and layer 3.
So I've heard it referred to as layer 2 and 1/2.
Or again, the more common term is a shim header.
But again, it goes between the original layer 2
and layer 3 headers.
Now, the complication with that is
if we're going between layer 2 and layer 3,
remember that layer 2 has an EtherType field.
Now, that is assuming, of course,
we're running on Ethernet.
But regardless of the layer 2 transport,
there is some type of a field that identifies
what protocol comes next.
Typically, this would be to indicate
that the next header is, say, for example, IPv4 or IPv6.
However, that's not the case here,
because the next header is now an MPLS label.
And we're going to focus, of course, on Ethernet here.
But therefore, we need to change the EtherType field to indicate
that the next thing in the header
is actually the MPLS label.
To do that, we use EtherType 0x8847.
So any time we see this-- or more importantly,
the devices see this--
in the original layer 2 header, it's
going to know that the next thing in the header
is an MPLS label and know to translate it as such.
So what's actually in this shim header?
Well, the first thing is, of course, a 20-bit label.
The label, of course, is the main purpose
for doing this to begin with.
However, we do have some other fields that go along with this.
First is a 3-bit EXP field, or Experimental field.
Most vendors actually use this field
to carry QoS, or Quality of Service,
information inside the MPLS header.
Then there's 1 bit which is referred
to as the bottom-of-stack indicator
or, more commonly, because, well, it's
easier to say, the S-bit.
Now, we'll get more into what this bit is
actually for in our next video, when
we talk about label stacks.
But the quick version, it's a way
to indicate if there's more than one label, because there
can be, it's to indicate which one is the last label.
And why do we need that?
Because after the last label, it knows
to go back and look for that original layer 3 header again.
Last but not least, we have the 8-bit TTL field.
And just like the TTL field in the IP header,
this is used to mitigate loops.
I hear people say a lot that it's there for loop prevention.
That's actually not entirely correct.
It's there in case a loop does occur so that the packets don't
loop forever.
So again, I prefer to refer to it as loop mitigation.
But either way, this is there for that reason.
If a loop were to occur in the MPLS environment,
we don't want this packet to loop forever.
The reason we need this here we actually
sort of indicated in our previous video
but not directly.
Remember we talked about the FIB and the LFIB?
When we're forwarding packets that are labeled,
rather than just standard IP packets, we use that LFIB.
Well, guess what.
If we're forwarding based on the LFIB and the label,
that means we never look at the IP header.
So is there still a TTL in the IP header?
Yes, of course there is.
But if the routers in the middle never look at that-- so say,
for example, our service provider core, if they never
look at the IP header, then they're
never going to see that TTL.
That TTL doesn't get decremented, and so on.
So we need this other TTL in the label field
that we're going to be using for loop mitigation in the middle
of the MPLS core for those devices that aren't even
looking at the IP header.
So now that we've covered a little bit here
about where these labels ride and what they contain,
let's take a look at our topology
that we're going to be using for most of the MPLS skills.
And we'll jump into Wireshark and see what these labels
actually look like on the wire.
So for a good deal of our MPLS skills,
we will be using MPLS Topology 1.
Although, we do have a few others
we'll use with some minor modifications.
But generally speaking, this is going to be our MPLS topology.
The only reason I'm really bringing it up right
now is to explain what we're going to be looking
at as we go into Wireshark.
We already have MPLS up and running right now
in the MPLS Core, which is shown here by this light-green box.
And what we're going to do is we're
going to jump on to one of the either PE or P routers.
And we'll examine traffic that's flowing
from one of the customer routers to another customer router
and just take a look at one of the labels.
So for now, we don't have to be incredibly
familiar with this topology.
But this is the general idea of what we're going to be doing.
So what we're going to do is we're going
to set up a Wireshark capture.
Then we're going to generate traffic
going through the environment.
And then we'll jump into Wireshark
and take a look at that traffic.
So I've started the Wireshark capture on gigabit 0/0/0/1
on router 1, which is, of course,
an MPLS-enabled interface.
And now here on router 6, let's go ahead
and generate some traffic.
Let's just, for example, trace over to router 8.
Now, a couple of things here, right away on the trace,
we can already see that it's going through MPLS.
We see our labels being swapped as it
goes through the environment.
So we know it's doing MPLS label switching,
based on the output of the trace command.
But now let's go over to Wireshark
and actually examine one of the packets.
So here's our Wireshark capture.
And it's simply filtered by UDP.
But we want to look at a packet specifically going
from router 6 to router 8.
So we're going to take a look here at packet 109.
Now, if we look down here in the decoding window,
we see the Ethernet II header.
And then we see the MultiProtocol Label Switching
Header, followed by the Internet Protocol Version 4 header.
So we can see how this is clearly being inserted
between layer 2 and layer 3.
If we open up that layer 2 header,
inside the layer 2 header, notice the MPLS EtherType
field.
It's set to MPLS label switched packet 0x8847, just
as we would be expecting it to.
So let's go ahead and shrink that back down.
And next, let's open up the MPLS header itself.
First thing to note is that Wireshark nicely
breaks down all the fields right on the MPLS header line.
It tells us that the label is 24012.
The experimental bits are 0.
The bottom-of-stack indicator, or the S-bit, is set to 1.
That would, of course, be set to 1 because there
is only one label.
Therefore, it is inherently the bottom of the stack.
And then of course, it's showing us that the TTL is currently
set to 2.
However, we can also see that it breaks down
each one of these fields for us down below.
And it shows us how many bits are associated with each one.
So we can see our 20 bits right here
for the MPLS label, our three bits right here
for the EXP bits, one bit, of course,
the flag bit for the bottom-of-stack indicator,
and of course, that MPLS TTL.
Now, if we were to open up the IP header as well--
and let's just close the MPLS header--
as we mentioned previously, the IP header of course
still has its own TTL shown right here.
And notice that it's a 2.
And the reason for this is simply
that the default behavior on a Cisco router
is to copy the TTL from the IP header to the MPLS header
when it imposes the label.
Now, that may or may not be desirable behavior.
And we'll discuss that in some future videos and skills.
So in this video, we jumped in and we took a look
at the actual label itself.
We talked about where it rides inside of the header.
And we took a look at the different fields
in the MPLS header, including that 20-bit label.
Now, as we mentioned, you can have more than one label.
And a lot of our applications need that.
So that's what we're going to be discussing next.
Until then, I hope this has been informative for you,
and I'd like to thank you for viewing.