In this set of videos we've had a fun time
in describing and Implementing layer 3 VPNs.
And in this video, what I'd like to do
is open the kimono a little bit and share with you
some of the details regarding labels that
makes all of this possible.
And let's again use this topology and our existing
configs for this discussion.
Inside this provider network we have
MPLS, label switching that's working from one end WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
MPLS, label switching that's working from one end
to the other.
So R1 is using 1111 and R4 is using 4444.
And if we have packets that go between them,
they are going to be label switched because of our LSPs,
just with the basics of MPLS.
And let's take a moment in the lab
and just verify those labels and the label switching
path between 1111 over here and 4444 over here.
So here on R1, if we do a show MPLS forwarding
and we specifically look for 4.4.4.4, the 32-bit route, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and we specifically look for 4.4.4.4, the 32-bit route,
it's going to show us, yep, if I get
a packet that has the label of 100,
I'm going to swap it out with 202 and forward it.
Boom.
Or if I get a packet destined to 4.4.4.4,
I'm going to impose the label of 202 on it
and then forward it out gig 0/0.
And if we do the same command across the whole path
between R1 and R4--
and let's take that same command and let's issue it on R2.
And R2 is saying, hey, if I get a frame
and it had an MPLS label of 202, I would swap it out with 302.
And I would forward it on its way. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And I would forward it on its way.
Or if it got a packet, an IP packet for 4.4.4.4,
it would impose the label 302 and send it.
So R3 would be the same command.
And R3 says, if I received the packet
and it had the label of 302, I would go ahead and pop off
that label.
And I would forward it on to 4.4.4.4
because R4 is directly connected to that network.
He owns it.
So that's our label switching path.
And we could verify that, too.
If we just go back to R1 and just do a trace route over
to 4.4.4.4, there's our label switching path. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to 4.4.4.4, there's our label switching path.
We're imposing label 202.
R2 is swapping that out for label 302, sends it to R3.
And R3 pops off that label and then forwards
on to the final destination, which is R4.
All right.
So that's MPLS.
And we're going to call our service provider
network the transit network.
That's the network that is allowing the traffic
to cross from one end to the other,
from one PE router to another PE router with label switching.
OK.
So that part is a little bit of a review.
But what also is happening is that when
the VRFs are receiving routes from customers, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
the VRFs are receiving routes from customers,
the provider edges are also assigning MPLS labels
to those routes in the VRFs.
And those are referred to as VPN labels.
They're still labels, just numbers,
but they're assigned to the routes inside of a VRF,
inside of a customer's VPN, in the context of layer 3 VPNs.
They're a grouping of routes.
And so those are referred to as the VPN labels.
So let's take a look at those next.
So to do that, we could do that from any PE router.
Let's go over to R4.
It's a PE router.
And let's do a show IP route for-- WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And let's do a show IP route for--
and let's go ahead and use customer 1-- so VRF customer 1.
And here's all the routes regarding customer 1.
So this one right here, 33.33.33.33,
that is a loopback interface on--
let me point them out-- that's on customer 1, site 2.
It has a loopback interface of 33.33.33.33.
And it's in the customer 1 VRF right here on router 4.
But what is also happening with that specific route
in that VRF, it's also being assigned an MPLS label WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
in that VRF, it's also being assigned an MPLS label
for that customer's VPN route of 33.33.33.33.
Now, to see the details of that label
that R4 has assigned to that route,
we can go ahead and do a show BGP VPN,
do a question mark here, V4 because we're using IPv4,
question mark and then unicast.
And we'll say all-- actually, we can just
do them for VRF customer 1.
That will be a little bit smaller.
Fantastic.
So there's all the VPNv4 routes associated with customer 1. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So there's all the VPNv4 routes associated with customer 1.
And if we want to see label information regarding routes,
we can do a show BGP VPNv4 unicast
for VRF customer 1 space.
And, then, I believe there's the option for labels.
Yeah, sure enough, L-A-B-E-L-S, labels.
And that's showing us the labels associated
with those routes in that VRF.
Now, these would be referred to as the VPN labels.
So let's focus on this one route still, this 33.33.33.33,
that 32-bit route.
And here it's also showing the next hop. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And here it's also showing the next hop.
Now, this next hop is the IP address of our customer edge.
It's also showing us here, the label,
which means that if we sent an MPLS packet
and we had label 405 on it, what would happen is this router
would say, oh, I know what to do.
I'm going to go ahead and pop off that label
and send it to this next hop.
So what I need to keep in mind is
that if we send an MPLS label of 405, this router, when
he sees that--
R4, when he sees a 405--
he'll say, oh, I know what to do.
And he'll pop off that label because there's
no outbound label associated with it. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
no outbound label associated with it.
And then he would forward it nakedly
to this next hop of 172.16.3.33, which
is the next hop for that 33 network.
So I'd like you to remember 405.
And we're going to call that the VPN label associated
with network 33.33.33.33.
Now, part of the scenario in getting this all to work,
is that this router, R4, needs to advertise his local label,
that he's associated with this network with his iBGP buddies. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
that he's associated with this network with his iBGP buddies.
In this case, he only has one, it is R1.
So via BGP advertisements with VPNv4 routes,
it's not only going to advertise a prefix of 33.33.33.33,
it's also going to include, as part of that, the route
distinguisher, which makes that route
unique inside of multiprotocol BGP,
It's also going to include its local label associated
with that route.
So when R1 receives this information,
it's going to say, oh, I get it.
33.33.33.33, the next hop is going
to be R4, who is sourcing this route. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to be R4, who is sourcing this route.
And there's an associated outbound label of 405
that I can stick on there.
And so R4 knows what to do with it.
Now, we can view that by using the same exact command
over on R1 and looking at the label associated
with the 33.33.33.33 network over on R1.
Because what we're going to see is we're
going to see this network.
We're going to see the next hop of R4.
And it's going to have the outbound label of 405
because that's the label, the local label, that R4 announced WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
because that's the label, the local label, that R4 announced
with that prefix.
Let's go take a look at R1.
So I'm going to copy this command because we're going
to use the same exact command.
We'll go to R1 and right click.
And there it is.
So here is the network 33, 33, et cetera.
Here's the next hop of 4.4.4.4.
And as far as an outgoing label, it can stick on label 405.
And then when that packet or that label
reaches R4, if R4 sees it, he'll know
exactly what to do with it.
He'll say, oh, 405.
I know what that label is.
And he'll strip off that label and then forward it WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And he'll strip off that label and then forward it
to the customer edge for a transit packet,
for a packet that's going through the network.
So I'm going to jot down these labels, so 405, which
is the VPN label, which is generated by R4 for the network
33.33.33.33.
And R1, the other BGP speaker, knows about that label
that R4 generated for it.
That's referred to as our VPN label regarding that network.
So R1, if it ever needs to forward a packet
to 33.33.33.33, it can impose or add the label 405, the VPN WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to 33.33.33.33, it can impose or add the label 405, the VPN
label, and ship it.
But take a look at the next hop.
The next hop is 4.4.4.4.
So 4.4.4.4, don't we also have, like,
a label switching path between R1 and R4 for that network
as well?
And the answer is yes we do.
We introduced that way back when we
started taking a look at MPLS in the previous skill.
So if we take a look at the label switching path
to get to 4.4.4.4, I bet you that's going
to involve imposing yet another MPLS label.
Let's take a close look. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's take a close look.
So here on R1, if we do a show MPLS forwarding table
and we put in the IP address of 4.4.4.4 with a 32-bit mask,
here's what this router is saying,
well, if I have a packet that I need
to forward to the next hop of 4.4.4.4,
I'm going to impose the label of 202 and send it out gig 0/0.
And then it's up to R2 to take that and label switch it to R3.
And then R3 would take it and continue the forwarding.
So, also, if a packet came in that was labeled as 100, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So, also, if a packet came in that was labeled as 100,
the router would also know what to do.
I'm going to swap that label with 202 and send it.
So now we have yet a second, from R1's perspective,
we have a second label.
And that is label 202.
And that's referred to as the transit label.
And that label 202 is going to be used
as part of our transit network.
So if we had our service provider cloud right here,
and we were going to forward packets from one edge
to the other, like PE1 to PE4, the label switching
would be forwarding based on that top label.
So here's the game that's being played. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So here's the game that's being played.
We have a label switching path between 1.1.1.1 and 4.4.4.4.
And it's being used as a transit network
to get from one edge of the provider to the other.
So we're going to do label switching.
But we're also going to include, R1 is going to include,
a VPN label below it of 405.
So here's what it would look like.
Let's go ahead draw this out.
So I've got 1, 2, 3.
Great.
We've got R1, R2, R3, and R4. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We've got R1, R2, R3, and R4.
So the top label, based on our output here,
if there was a packet that was being sent to 33.33.33.33,
R1 would first implement the bottom label of 405.
And then it would implement the top label
to get to the peer of R4, which is going to be label 202.
So the top label would be 202.
And then that shows up at R2.
And then R2's going to take it.
And R2 is just going to look at the top label of 202 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And R2 is just going to look at the top label of 202
and say, whoa, I need to swap that out.
So let's take a peek at R2 and ask him, hey, what would you
do regarding forwarding?
Oh, and here it is right here.
So here's what R2 would do.
R2, when it receives the label of 202,
it would swap it out for label 302.
So it would do a removal of that top label.
It would put in 302.
And it wouldn't even touch or be aware of the label below it.
All it's doing is taking the top label,
swapping it out with the next label, and anything
else beyond that.
For example, after this top label is being swapped, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
For example, after this top label is being swapped,
the router is forwarding the frame.
It's not even paying attention to anything higher.
So whether it's carrying IPv6 traffic or IP
traffic or something else completely different,
it doesn't care.
It's just label switching.
And it's leaving that VPN label in place.
It doesn't even look at it.
And then when we get to R3, R3 receives
this frame next in this path.
And then it would make its decision.
Let's go ahead and take a look at R3,
see what it would do when it receives this packet
with a top label of 302.
So we'll go to R3.
And we have that command already here. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we have that command already here.
I'll bring it up so we can see it.
So when this packet reaches R3 with a label of 302,
its instructions are to pop off that label.
So R3 says, OK, great.
I'm going to pop off that label and forward.
You notice, nowhere here does it say, hey, go deeper and see
if there's another label.
It just pops off the label.
And then when it pops the label, it's
just going to forward it out gig 0/0.
And all that information is cached on the router.
It doesn't have to rethink it every time.
So it's going to pop the label, forward it.
But what it did not do, it did not WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But what it did not do, it did not
mess with this second label.
So at this moment, once it leaves R3,
there is only one label left.
And that is this label, the 405.
So then when R4 receives it, there's one MPLS label,
it's 405.
And R4 says, I know to do with this.
Let's take a look at R4 to confirm.
So we'll go over R4 and we'll hit the Up arrow key
a few times.
And what this is saying is that, hey,
if I receive a label of 405 regarding this customer 1 VRF,
I receive a label of 405, I know exactly what to do.
My next hop is 172.16.3.33, which is this customer WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
My next hop is 172.16.3.33, which is this customer
edge over here on the right.
And it will just forward it.
So it'll strip off the VPN label of 405
because the customer doesn't understand anything
about labels.
And R4 will simply forward it to that customer edge.
And I thought it would be interesting,
now that we've taken a look at what the labels would be,
let's go ahead and verify that.
So let's do this real quick.
Let's go to our customer edge.
This is customer 1, site 1.
And let's do a ping to 33.33.33.33. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And let's do a ping to 33.33.33.33.
And let's source it from our loopback
0, which is 11.11.11.11.
Oh, I thought loopback 0.
I didn't say it.
OK, so let it go.
We could also do a trace to 33.33.33.33 and source that
from loopback 0.
And that will also confirm the labels for us.
So here's the play-by-play, R1 injected two labels.
It injected the VPN label.
And then on top of it the transit label.
And then the next router left alone the VPN label
and swapped out the top label, that WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and swapped out the top label, that
would be R2 on behalf of R3, swapping that out.
And then R3 popped off that top label,
left the VPN label, which was received
by R4, who is then able to go ahead and forward it.
And I thought it would be fun to take a look at that traffic
that we just sent--
and actually take a look at the packet capture of the traffic
as it went across the network.
So this is being captured right here between R1 and R2.
And so here's our layer 3 header.
And the source is the 11.11.11.11,
that's the loopback of customer 1, site
1 with this destination of 33, et cetera, which WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
1 with this destination of 33, et cetera, which
is customer 1, site 2 over on the right-hand side
of our network.
And when this packet was sent, here's what R1 did.
R1 received it and said, oh, I've
got a VPN label associated with the destination 33.33.33.33.
And so it imposed this label right here,
which is the VPN label of 405.
This is the one that R4 generated and advertised
via multiprotocol BGP between R4 and R1.
So R1 injects that label, the VPN label, and then WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So R1 injects that label, the VPN label, and then
realizes, oh my gosh.
The next hop for this is 4.4.4.4.
So it injects a second label to get to the next hop of 4.4.4.4.
And it used label 202 from the MPLS forwarding table
we looked at just a few moments ago.
Also, you notice that we have two MPLS labels.
How do we know if there are, like,
three or four MPLS labels?
How do we know when the end is there?
Well, this right here, this bit, called,
"Bottom Of Label Stack", if it's on,
if that bit is on, that means this is the last MPLS label.
So that's how you know you've gotten to the last MPLS label, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So that's how you know you've gotten to the last MPLS label,
because that "Bottom Of Label Stack" is set to on.
So this transit label right here has a stack bit set
to 0, which means, hey, there's another MPLS label below this.
So after R1 spits this out, it's received
at R2, who looks at this incoming label and says,
hey, I know what to do with that.
So let's take a look at a protocol capture between R2
and the next hop, which is R3.
And that capture between R2 and R3 is right here.
So this is the packet capture between R2 and R3.
So R2 swapped out the top label and it WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So R2 swapped out the top label and it
put the new label of 302.
And that way when R3 receives it, it knows what it should do.
And it left the VPN label alone.
So R2 only had to take a look at the top label.
It removed it, put a new one on, and then sent it on his way
over to R3.
Next, let's take a look at the packet between R3 and R4.
And that's coming up in this next capture.
So R3 popped of the top label and that
was because R4, via label distribution protocol,
advertised, regarding the 4.4.4.4 network, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
advertised, regarding the 4.4.4.4 network,
the implicit null, to which R3 says, OK.
Well, if you're directly connected,
I'm going to pop that top label off for you.
So it removed the top label and it left the VPN label in place.
And then when R4 got it, it could go ahead
and say, wait, label 405, I know exactly what to do.
And then it took the packet, stripped off that VPN label,
and then forwarded it over to the customer edge, which
would be customer 1, site 2.
So there you have it, my friend, the inside scoop
on how the labels are used for two specific purposes-- one WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
on how the labels are used for two specific purposes-- one
is for the actual VPN routes, for the customer routes that
are assigned inside the VRFs; and another set of labels
that we're going to use for transit to get
between one PE and another PE.
And as a result, we're going to find
there are two MPLS labels stacked on top of each other.
The bottom label is the VPN label for the actual customer
route.
And the top label is the transit label
on how to cross the service provider network.
So if you're up for a lab and you want some reinforcement
of layer 3 VPNs, I'll see you in the next video WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
of layer 3 VPNs, I'll see you in the next video
for that hands-on lab.
Meanwhile, I hope this has been informative for you.
And I'd like to thank you for viewing.