I thought to myself, self, let's have a video and a hands
on lab that will help reinforce the label concept with MPLS us
and give us the chance to implement and verify
MPLS and label switching paths.
And that's the opportunity we're going to take right here.
We're going to focus on these four routers.
R1, R2, R3 and R4.
Now currently, this is really important for MPLS to work.
We have to have routing, IP routing, already working. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We have to have routing, IP routing, already working.
So there's no dead areas.
We have full connectivity inside of this provider cloud.
R1 knows how to reach R4 and all the networks in between.
So IP routing and having correct IP routing
is a critical starting point for this topology.
So, in the hands on lab, let's verify that first
before we implement MPLS.
So if you're logged on from a computer
to the CBT Nuggets website, go ahead
and click on the link for the virtual app
and follow right along with me.
All right.
So here in the provider network on the left hand side,
we have R1.
We'll just show IP route for the IP routes. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We'll just show IP route for the IP routes.
And OK.
We've got some OSPF routes.
We have some static routes.
That looks all great.
Let's just verify we can ping this guy right here.
Four, four, four, four, which is the loop back over on R4.
So we'll do a ping to four, four, four, four.
That's great.
Let's also verify the path.
Do a trace out to four, four, four, four.
Fantastic.
So the next hop after R1 R2. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So the next hop after R1 R2.
Then R3.
And then finally going to R4.
So we have full reachability inside this provider network.
Which again, is critical for our success when working with MPLS
and implementing MPLS.
So let's go ahead and take it to the next step.
And that's this.
We can use the command the global command MPLS, space, IP.
So that's in global config.
And then we can use the interface config
of MPLS, space, IP.
And that enables it on the interfaces WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And that enables it on the interfaces
and they'll be able to go ahead use LDP label distribution
protocol to share their local labels with the other routers
as well that they peer with.
Now for learning.
And this is really important.
I found about maybe a decade ago when I first
started really learning about MPLS
and corresponding layer three VPNs,
I learned that this router right here.
Let's focus on one network four, four, four, four.
Which is here on R4. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Which is here on R4.
So that way we can focus on a single route
and not have to say, oh there's all the routes
and all the labels.
We'll just focus on one at a time.
It's possible that R1 could create the label of 1,000
associated with that route.
A local label of 1,000.
And could R2 create the same label of 1,000?
Yes.
Because they're just local labels.
And then R3 could do 1,000 and associate with that network.
Now here's the problem.
When you're just learning this or trying to figure out WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
When you're just learning this or trying to figure out
what label and whose label is that,
it feels like three or four labels
that are all the same number.
Like 17 or 1,000.
It's sometimes difficult to remember
who generated that label?
And where did it come from?
So I'd like to share with you one other,
I feel, really important trick.
Or at least something that we should
do as an educational measure.
And that is we can control the range of labels.
So what if we did this?
What if we told router 1, hey.
Out of all the labels you could choose, please use labels
between the number of 100 and 199. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
between the number of 100 and 199.
And that way, if we see any labels in that range,
we know, hey, this is a label that R1 generated.
And on R2 we could say, hey Mr. R2.
Or Mrs. R2.
Or Ms. R2.
Any labels you create, please constrain
them to be from 200 to 299.
And that way anytime we see a label in that range,
we know it came from router two.
This is really important for learning.
Because that way you can track the labels.
And when you do this lab, you might
have slightly different label numbers
because the routers you're just choosing them.
And so by constraining them into certain areas,
that way you can always know if you see a label that's 320, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
that way you can always know if you see a label that's 320,
you know, oh that's a label that R3 generated locally
because he's the only one that we've specified that range for.
So what we'll do, is I'll walk you through setting up that
as well.
The syntax is actually pretty simple.
It's in global configuration mode.
And it would be MPLS, space, label, space, range.
And then we specify the range.
So on R1 we could just say 100 through 199.
And R2 would say 200 through 299. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And R2 would say 200 through 299.
And R3, 300 through 399.
And so forth.
I found that to be one of the most helpful aspects
in learning labels and getting it straight
when we implement it.
So without further ado, let's go ahead in the lab.
I'll walk you through step by step implementing this.
And I'll share with you some of the commands that
are some my favorites to look at the labels that are dynamically
being generated for all the routes
that are in the routing table on the respective routers.
All right.
So let's go to the CLI. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's go to the CLI.
So back at R1, and I also have this topology
on a piece of paper.
So if you want to have the topology printed or a snapshot
or somewhere else you can refer to,
that's also helpful so we get the right interfaces involved
with MPLS.
So on R1 we'll do a show IP interface brief.
That'll also be a good way to remind ourselves
of where stuff is.
So the 10 network is the provider network.
So everything that starts with 10 is the provider network,
and the 172s are going to be the edges.
Which will take look at in a separate set of videos.
So the 10 networks are going to be the provider networks. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So the 10 networks are going to be the provider networks.
So we'll go ahead and go into configuration mode.
And we'll do MPLS, and we'll specify label, range.
And let's tell router one that we
want it to use 100 through 199.
Great.
And now we'll do MPLS IP.
And we'll also go into interface gig zeros slash zero.
And we'll enable MPLS IP on that interface as well.
So there's nobody out there right now who's
also running label distribution protocol,
but once we get our two up and running they'll WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
but once we get our two up and running they'll
see each other's hellos.
And then they'll form an adjacency, a neighborship.
And then they'll start exchanging
what each other's local labels are
for their respective routes.
But check this out.
If we do a show MPLS LDP, and let's use a question mark here.
Let's go for bindings.
That's going to show us all the bindings for all
the routes this router has.
And there's more than a page worth.
So if we wanted to see just a specific one,
we do a show MPLS LDB bindings.
Put in the route we're looking for. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Put in the route we're looking for.
We have a 32-bit route that we are
learning from R4 on the other side of the network.
Space.
And we'll specify it's a 32-bit route, which it is.
And this is the information from R1 saying, OK.
Regarding this network, my local binding is label 102.
So it has a local label for that network, four, four, four,
four.
Along with it has local labels for other networks as well.
And we'll go more into detail as we continue together.
So then let's go to R2 and do a similar treatment.
So here on R2. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So here on R2.
We'll go into configuration mode.
MPLS and label.
And we want to say range.
And we'll say 200 through 299 here.
And then we'll enable it.
MPLS.
IP.
And then we'll go into interfaces.
So the interfaces here are going to be
zero, zero, and one, zero.
They're both gigabit.
So we'll go to interface gigabit zero, zero.
MPLS IP.
And interface one, zero. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And interface one, zero.
And MPLS IP.
Now you notice also we have a message here
that's saying we have the LDP neighbor.
And that's R1.
So now, R2 knows about it's local labels,
and it also has information about R1 via LDP
about R1's local labels.
In fact, we can see that right here with a show
MPLS LDP binding.
And let's go for four, four, four, four with a 32-bit route.
Which is a 32-bit route.
So there's our local label for four, four, four, four. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So there's our local label for four, four, four, four.
And here is the label that R1 is advertising to us.
Which is 102.
So we peek over at R1 again.
I just want to confirm that it really
is the local label of 102 that R1 has associated
with that specific route.
So let's proceed, and let's enable MPLS IP on R3, and R4.
So we'll make a road trip over to R3.
And config T. And MPLS label, range. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And config T. And MPLS label, range.
And here we want to have it be 300 through 399.
And then MPLS IP and then we need to enable it
on both of its interfaces.
So we only need to enable MPLS IP on the interfaces
that we expect to have another neighbor on.
So we can do the LDP exchange with the enabler.
So here on R3, it's going to be gig zero, zero, and one zero.
So we'll do that.
Interface gig zero slash zero.
And MPLS IP interface gig one slash zero. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And MPLS IP interface gig one slash zero.
MPLS IP.
And we should have an LDP neighbor coming up.
There it is with R2.
So R2 has a local label of 202 regarding
the four, four, four network.
So if we did this same command here on R3,
and right clicked and pasted in, he's saying, yeah.
My local label is 302, and I also
know that R2's label for that same network is 202. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
know that R2's label for that same network is 202.
So I just wanted to show you that as LDP
is sharing that information, each router has
its own local label.
And with LDP we're sharing that information with our neighbors.
We'll take a look at how that's all glued together here
in just a moment.
And let's go to R4.
And config T. MPLS label range.
And we'll say you should use 400 through 499.
And then MPLS IP.
And then we need to enable it on just one interface,
and that would be gig zero, zero here on R4. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and that would be gig zero, zero here on R4.
So interface gig zero slash zero.
And MPLS IP.
And we're done.
And our neighborship should come up.
Sure enough.
And here, if we did that same command, which
I will go ahead and copy paste.
Show MPLS LDP bindings for that same network.
Now this is local to R4, so it's going
to be a little bit different.
And he has something called an implicit null.
If the router is directly connected to the network,
it's not going to generate a high numbered label number. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
it's not going to generate a high numbered label number.
It's going to use a special label.
it's actually label three behind the scenes.
Called the implicit null.
It implies that, hey, it's directly connected.
Which is going to mean something as we
take a look at the whole LSP path here coming up.
But also, it shows here that the remote binding for the four,
four, four, four from its neighbor R3
has the local label of 302 for that same network.
All right.
So let's draw this out, and let's make a prediction.
I think this will be really, really effective.
If we were to do a ping.
And let's draw this out.
This will be a lot of fun. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
This will be a lot of fun.
I'm talking a lot of fun.
Let's say R1 was going to type ping.
And we can actually demonstrate this in lab.
Ping to four dot four dot four dot four.
What the router is going to do, it
has cached information both for the routing table, IPv4,
and also for label switching.
It's called the label forwarding information base.
And it's going to look at the destination four four
four four, and what it's going to do,
it's going to identify whether or not
it knows to impose a label based on that destination WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
it knows to impose a label based on that destination
before it forwards it.
And actually there's one better command
that we can even do right here just
to verify the labels that are going to be imposed as he
show MPLS forwarding table.
And that's the winners.
So out of all the information that the router
has about labels and forwarding, and we'll
take a closer look at that as we progress together.
This is the forwarding table it's
going to make decisions on.
So check this out.
Right here it shows the local label for 102,
and right here it shows the outgoing label.
So basically what that says, if there's a packet coming in
to label 102 on this router, it's going to pull that off WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to label 102 on this router, it's going to pull that off
and it's going to impose the new one of 202.
But because router one is doing its paying originally
to four, four, four, four, and it has an outgoing label,
here's what it does.
It injects label 202, and then it makes a forwarding decision
out gig zero zero.
And the next hop is 10.12.0.2 as a reference.
So let's draw this with our four routers.
So we have R1, R2, R3, and R4.
So when R1 sends this, it's going to impose or add label WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So when R1 sends this, it's going to impose or add label
202 right between the layer two header and the layer three
header.
So I'm going to put impose.
So there's a couple of words there.
We can say impose or push or insert a label.
It's going to impose label 202 for the benefit of R2.
Now let's take a look at what R2's
going to do based on the same information
when it receives a packet that has an MPLS label of 202.
So we'll go over to R2.
And on R2 we'll do a show MPLS forwarding table.
And what this says right here, is that R2, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And what this says right here, is that R2,
if it receives a MPLS label of 202,
it's going to pull that one off.
Which is called a pop.
And it's going to push or insert the label of 302,
and then forward it out gig one slash
zero, which is going to go over to R3.
So if we continue this, it's going to go ahead
and I'm going to say a pop off the label 202,
and it's going to impose label right here.
302.
And then forward it out gig one slash zero on its way to R3. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And then forward it out gig one slash zero on its way to R3.
Now let's take a look at what R3's going to do with it.
So here on R3, let's do a show MPLS forwarding table.
And here R3 is saying, if I receive a label of 302, which
it would be receiving here from R2,
its instructions are to pop off that label.
So it's going to pop off the label.
And then, because there's no inserted label that
needs to put, it's just going to forward that as a naked IP
packet to R4, who's going to get this packet destined
for four, four, four four.
Now, the reason that R3 didn't impose another label here, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Now, the reason that R3 didn't impose another label here,
is because R4 is directly connected
to four, four, four, four.
And it has that default label 3, which is the implicit null.
And so when R4 with LDP, when it was advertising
its local label, it was advertising
implicit null regarding four, four, four, four.
Which tells R3, hey, there's no outgoing label.
Just pop off your existing label-- says R3, that 302--
and just forward it natively as an IPv4 packet.
And then it helps R4 by not having to pop off a label.
And then saying, oh now I've got to make a routing decision WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And then saying, oh now I've got to make a routing decision
to four, fourn, four, four.
So this is called the PHP.
The penultimate hop pop.
The router right before the end of the label switching path
is going to pop off that label to save the last router
or having to do it.
Because he was going to have to do that anyway.
So that's called the penultimate--
like the one before the very ene--
hop pop.
And that's why we have no label being imposed here.
And that's why R3 is pulling off this label.
And for grins, and in this lab, I'd
like to do this one more time with a brand new route WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
like to do this one more time with a brand new route
that we haven't seen yet.
So if we add a new route on R4, every router,
because of the dynamic routing protocol.
We're running OSPF.
Every router is going to know about that new route.
They'll generate a new label for it.
And then we can follow the label switching path one more time
with new labels for the new network.
So here is what I propose we do.
Let's go to R4.
And let's do a show IP protocol and see
what routing protocols we're running.
We're running OSPF and we have a network statement
of ten anything.
So let's add a new loop back on R4. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's add a new loop back on R4.
We'll do a interface loop back.
We already have loop back zero.
Let's add loop back one.
And an interface loop back configuration mode
will give the IP address starting with 10.
Let's do 44 dot 44 dot 44.
And we'll do a mask 32 bits.
All right.
So now, let's just verify that's in OSPF.
Show IP OSPF interface brief. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Show IP OSPF interface brief.
And there we have it.
So there's loopback one.
It's in OSPF.
Now if we went to R1, R1 has a local label for that.
R2 has a local label for it.
R3 has a local label for it.
And they've all shared that information with each other.
And they've all cached information regarding the MPLS
forwarding table.
So if we went to R1, and did that same command,
show MPLS forwarding table.
Now take a look at this.
It's using the local label of 105,
and if it's going to send traffic to 10 44 44 44, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and if it's going to send traffic to 10 44 44 44,
it's going to impose label 204.
Which is R2's local label for that.
And then ship it out gig zero, zero.
If we go to R2 and hit the up arrow key for the MPLS
forwarding table.
It says, I'm going to go out and swap that out with label 304,
and forward it out gig one slash zero.
This is label switching.
We are forwarding this packet, and R2 never
looks at the IP header.
Because it received a label it ad in its forwarding table,
how to replace that label, and forwarded
on to the next device. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
on to the next device.
If we go to R3, and issue that same command,
show MPLS forwarding table.
If it receives label 304, which is its local label,
it's going to pop off the label, and then forward it
nakedly out gig zero, zero.
And the next hop is 10.34.04.
At which point R4 would receive that.
And check this out, if we want to see those labels?
Let's do this.
Let's do a trace To 10.44.44.44 and here's the play by play.
R1 is going to impose the label of 204 for the benefit of R2. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
R1 is going to impose the label of 204 for the benefit of R2.
R2, when it gets it, it's going to strip off that label,
and impose a label of 304.
And R3, when it gets that, for label 304,
it's going to pop off that label,
and then forward it nakedly over to R4, who's directly connected
to that network.
And with a trace, check this out.
By default, you can see those stinking labels in the trace.
So there is the label that R1 injected for the benefit of R2.
There's the label that R2 injected
for the benefit of router 3.
And then the final packet has no MPLS label. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And then the final packet has no MPLS label.
And that's because R3, popped off
the label it received and just sent the packet nakedly.
Because R4 was directly connected
and had the implicit null label associated with it.
All right.
So that's been some fun and games
in the world of implementing MPLS.
And also, a few commands to help verify that it's working.
But one question remains.
How did the routers know if they have two neighbors--
and they're both advertising their local labels for some
network--
how do they know which one to use?
Do we use label x and send it this way, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Do we use label x and send it this way,
or label y and send it that way?
And that's what I'd like to discuss
with you in the next video.
Using this existing lab topology and talk with you
about how those decisions are made,
knowing which label to put on and which
interface to forward out of.
So that's coming up in the next video.
Meanwhile, I hope this has been informative for you.
And I'd like to thank you for viewing.