How does that work again?
In this video, we're going to take a look at MPLS,
just a quick review-- we already had a previous set of videos
on it--
just to make sure we understand the basic transport mechanism
that's being used with MPLS because it's
critical for our layer 3 VPNs to work.
[MUSIC PLAYING]
So let's you and I focus on just the provider network
because that's the only place that MPLS, the label switching,
is going to take place.
The customers don't touch, or don't use,
and don't implement MPLS as they interface with us. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and don't implement MPLS as they interface with us.
It's just a game we play internally.
Now, in the videos we looked at with MPLS,
it was basically two commands to enable it.
One in Global Config, mpls ip, that
enables the feature, and then another command
called mpls ip in Interface Config.
And boom, we've now enabled Multiprotocol Label Switching.
So if we did it here on R1, we'd enable the command globally,
and then we'd enable MPLS IP on this interface. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and then we'd enable MPLS IP on this interface.
And R2, we do it globally, plus on this interface,
and this interface, and this interface, and this interface,
and that interface, and globally on all of those, and it's done.
And once they start up, they'll be running LDP.
Every router is going to generate a local label
for every route they know about, every IP route.
R1 is going to create its own set of local labels, R2, R3,
R4.
Then, with LDP, they're going to start advertising
those labels to each other.
So R2 and R3 will share everything
they know about their local labels WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
they know about their local labels
with their buddy, and R1 and R2, and R3 and R4.
And then, based on the routing table--
because it's all based on the IP routing table which has
to be in place to begin with--
based on the routing table, they'll
figure out, oh, if I get a packet that
comes in with a certain label, I know
exactly how to swap it out.
So let's imagine that we're going to focus on one network,
and that is 4.4.4.4, which is the loopback on R4.
That's advertised to be a OSPF, or IS-IS. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That's advertised to be a OSPF, or IS-IS.
All the routers know about it.
They all generate a local label.
Let's imagine that R1 generates a local label of 102
for the 4.4.4.4 network.
And R2 generates a local label of--
I'm just going to use the same number, 202.
And then R3 generates a local label of 302.
And then R4, because directly connected,
it's going to use the implicit NULL, which
is a special label of 3, which says I'm directly
connected to this network.
Now, all these routers, besides identifying a local label WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now, all these routers, besides identifying a local label
for the 4.4.4.4 network, they are also
going to have identified, based on the routing table,
the forwarding path if they got a packet for 4.4.4.4, which
outbound label they would use and which interface.
And if they received a labeled packet,
they would also know how to swap it out.
And let's give it a practice run with this example.
Let's imagine that R2 for the 4.4.4.4 network
has a local label of 202 and, through LDP and the IP routing
table, it's identified that the outgoing label is WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
table, it's identified that the outgoing label is
302, which is R3's local label.
And as part of that, it also specified the interface, which
on this guy would be Gig1/0.
In its table it would say, OK, regarding 4.4.4.4,
my local label is 202, and the outgoing label is 302,
and the egress, or outgoing interface, is 1/0.
So if we sent a packet and it had a label of 202 on it,
R2 would say, oh, here's my local label of 202. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
R2 would say, oh, here's my local label of 202.
I'm going to just swap it out with label 302 and forward it.
Done deal.
It never had to look at layer 3 information at all.
It just did a label swap.
So that's referred to as a swap, where I took one label,
came in with the label.
I removed it, put my new label on, and sent it.
Next packet, please.
I could do a million of these, and they do.
All right.
So that's referred to as a label swap.
Now, what happens if R2 receives a packet?
Let's say we have some other router that's not running LDP.
Let's say it's Router 9. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's say it's Router 9.
And Router 9 sends a packet, and it's destined for 4.4.4.4.
So R2, when it receives a packet for 4.4.4.4,
it's not coming in with a label so it just
is a normal IP route look up.
But it takes a look at that route and says,
oh, I've got an outbound label associated with that network
of 4.4.4.4, and it's 302.
So, what does it do?
It injects, it imposes, it pushes on a label of 302,
and ships it out 1/0, and then lets R3 deal with it. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and ships it out 1/0, and then lets R3 deal with it.
And then R3 receives that label and says,
based on my MPLS forwarding table, I know what to do.
So, whether we receive a packet that has a label,
or we receive a packet that's IP and we have an outbound label,
we are going to act on it based on our MPLS forwarding.
And it's all cached.
Part of CEF caches all that information.
So it can handle an incoming label,
or it can handle a destination IP address
and insert a label based on its forwarding table.
So here's what I'd like to do.
These numbers I just use here are a little bit hypothetical. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
These numbers I just use here are a little bit hypothetical.
I did constrain all the labels on these routers
so the router number is-- for example,
Router 1 is going to have 100 through 199 for its labels.
I touched on that and how to do that in the MPLS skill,
on those set of videos.
And I told R2 to use 200 through 299.
And the benefit-- and you'll appreciate this as we get
closer to the end with the VPN labels that are also going
to be used--
is that when we ever see a label that has this range,
we know that R2 generated that label. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
we know that R2 generated that label.
It's fantastic.
All right.
And same thing for R3, and same thing for R4.
So let's do this.
In the lab-- and this is a virtual lab,
so if you'd like to click on the link for the virtual lab
and join me, I would love it.
Let's take a look at R2.
We'll take a look at the labels that it currently
has for 4.4.4.4.
And we'll verify what its local label is.
It may be 202.
It may be different because in the lab,
depending on which order you put things on,
you're going to have possibly a different label that the router WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
you're going to have possibly a different label that the router
locally generates.
But we'll verify what the local label is.
We'll verify what the outbound or outgoing label is.
And then we'll verify that it works.
And that will help reinforce our concept of MPLS, just MPLS
and label switching, which, again,
is going to be a core part of the overall Layer 3 VPN
solution coming up.
All right, let's go to the lab.
All right.
So here in the lab, let's go to R2,
and let's do a couple things.
Let's do a show ip route for 4.4.4.4.
I want to make sure we have one.
We do. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We do.
And the next hop is 10.23.0.3.
Great.
And if we do a show mpls forwarding-table,
that's going to cut right to the quick
with what the forwarding decision's going to be.
And regarding 4.4.4.4, it just so happens--
now, maybe I remember this from the previous time
I was in this lab, but it is using 202 for its local label.
That's the example we used previously.
Sometimes you just get lucky.
That's the local label for 4.4.4.4. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That's the local label for 4.4.4.4.
And this is the outgoing label of 302.
And there's the egress for outgoing interface.
So what this means is that, if R2 receives a packet destined
for 4.4.4.4 with no label, it's going
to impose label 302 and forward it.
That would be the first label that's
being imposed on this packet.
If, however, we receive a packet and it
has the current label of 202, we already know what to do.
We're basically going to take that label,
remove it, replace it with 302, and then forward it out Gig1/0.
And that's called a label swap.
So there's a push, or imposing a label, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So there's a push, or imposing a label,
or we can swap label, which is really pulling off or popping
off the old label and putting on a new one,
and we have a pop, which is simply
popping off the label without placing a new label on it.
All right.
In this case, it would do a swap if R1
sent a packet to 4.4.4.4 and R1 imposed label 202,
it would simply do a swap right there with the new label.
Now, one way of verifying that--
I got to admit, this is so much fun.
If we go to R1, first of all, lets do a ping to 4.4.4.4. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
If we go to R1, first of all, lets do a ping to 4.4.4.4.
And let's do a show mpls forwarding-table.
And this says, OK, for 4.4.4.4, my local label is 100,
and my outgoing label is 202, which, if we sent that to R2,
it would know exactly what to do with it.
Let's watch.
The way we can see this work--
by default, on this lab, is we can do a trace to 4.4.4.4.
And because we're doing it from a Cisco router,
it's going to show us the labels. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
it's going to show us the labels.
So this is the first hop.
We're imposing the label of 202.
For the next hop, it swapped that out with label 302.
And then R3 popped off that top label
because R4 was directly connected
and he advertised that as an implicit NULL,
meaning no explicit label for that.
And it forwarded nakedly.
So we've covered those topics in the MPLS videos,
but I just wanted to reinforce it here with the fact
that we're doing label swapping in the middle of our provider
network. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
network.
And at the edges of the network we're normally doing a pop,
taking off that top label and then forwarding
the packet on the way to the router, which
is the final destination.
And one interesting game we can play-- this isn't required,
but if you want to do this, check this out.
If we go to R2--
and right now R2 has a local label of 202
for that 4.4.4.4 network.
If we want to mix it up a little bit,
we can do a config t, no mpls ip.
Give it a second.
That should break all the neighborships, the LDP. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That should break all the neighborships, the LDP.
And then we'll just put it back on, mpls ip.
And, yeah.
So, the neighborships came back.
That means the actual mpls ip command is still
on the interface.
This is great.
But check out the labels now.
This should shake up the labels if you want
to change them a little bit.
We'll do a show mpls forwarding-table.
And now, to get to 4.4.4.4, our local label is 206.
So if we receive a label with 206, then we'll go ahead
and we'll swap it out with 302 and send it on its way. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and we'll swap it out with 302 and send it on its way.
And, because LDP is advertising this information,
let's go look at R1.
So on R1, a moment ago, it was going
to impose for the 4.4.4.4 network,
it was going to impose label 202.
But that's no longer R2's local label.
But it's been advertised, so we can actually just
show mpls forwarding-table.
Check this out.
Now, for 4.4.4.4, it knows, hey, the label
I'm going to impose on this is 206.
And that way, when R2 receives it, it gets the label 206,
swaps it out with 302, and sends it on its way. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
swaps it out with 302, and sends it on its way.
Just doing pure label switching, forwarding packets
based on labels, not having to look at the IP address
at all, in the case of R2.
All right.
So that's a review of some basics of MPLS.
And, in our topology, this MPLS is already
set up in the provider network.
So R1, R2, R3, and R4, we have a label switching path
that represents label switching across that path,
with those devices running MPLS.
Also, by default, they're running
Label Distribution Protocol, which
advertises to the neighbors. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
advertises to the neighbors.
And every router that's participating with MPLS
is also considered to be a Label Switching Router, an LSR.
So now that we have MPLS in our service provider network,
next thing I'd like to chat about
is using VRFs, Virtual Routing and Forwarding instances
on the provider edges to contain and hold
the routes from specific customers that
are going to be part of a specific customer's VPN,
or VPN routes.
We'll tackle VRFs in the very next video,
so I'll see you there in just a moment.
Meanwhile, I hope this has been informative for you, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Meanwhile, I hope this has been informative for you,
and I'd like to thank you for viewing.