[AUDIO LOGO]
So now that we've optimized our network core,
we're now ready to actually start
setting up our layer 3 VPN.
Now, the steps needed to do this can be done in whatever order
you want, for the most part.
But what we're going to do is we're
going to start by creating the VRFs apps on the PE routers.
So let's start by taking a look at our goals,
planning out what we're going to do.
Then of course, we'll look at the diagram
to make sure we know what we need to configure where.
And then we'll jump into the command line
and get our VRFs up and running.
So the overall goal here is we need to configure
VRFs for each of our customers.
We're going to have customer A and customer B. So
what we're going to do is we're going to configure route
distinguisher 100:10 for customer A
and 100:20 for customer B. For the route targets,
we'll use 100:1000 for customer A and 100:2000 for customer B.
Now, there's really no good reason
to make the route target and the route distinguisher
different in these examples.
The only reason we're really making them different
is simply to demonstrate that the route distinguisher
and the route target really don't have anything
to do with each other and that they're two
completely independent numbers.
Normally, these might be kept the same.
But the point is they have nothing to do with each other.
And therefore, they don't have to match or anything like that.
So now let's jump over and take a look at our topology.
So VRFs, of course, get configured on the PE devices.
So this will be routers 1, 2, and 5.
On router 1 here, we're going to need a VRF for customer A.
On router 5, we're actually going
to build two VRFs for customer A.
So we'll make these customer A1 and customer A2.
And then on router 2, we're going
to need a VRF for customer B. And router 5,
we'll need a VRF for customer B as well.
We can also see here, of course, the interfaces on each router
that we need to put into those VRFs.
But we'll do that as we go.
So let's go ahead and jump into the command line.
We'll start on router 1.
So let's start by creating the VRF itself.
We'll just create VRF Customer A. Next,
we'll set the route distinguisher.
We said we were going to use 100:10.
Next, we'll go into our address family
specifically for IPv4 unicast.
And we'll set up our route targets.
So we're just going to use the same route target
for importing and exporting.
So we'll say import route-target.
And we can simply put the number right here--
100:1000.
And we'll do the same thing for the export.
So again, we'll just import and export the same two numbers.
And just to get this ready for IPv6,
we'll do the exact same thing but for address-family ipv6.
And we will actually use the same import
and export route targets.
Let's go ahead and commit those changes,
make sure we don't have any errors.
So we see that that was successful.
Now let's go into our interfaces.
Here it's going to be interface gig 0/0/0/0.
We'll put this in the VRF Customer A.
And if we commit this and we look at our interface again,
notice that there's no IP address on it.
It's also shut down.
This interface was not yet configured.
So let's go ahead and finish up that configuration.
For now, we'll just put on an IPv4 address.
This is going to be 16.1 going towards router 6.
And we'll just make it a /24.
We'll also bring that interface up.
Commit those changes.
And we should see the interface come up.
So just to wrap up with some verification here,
let's do a show ip interface brief.
And what we see on this output is that our gigabit 0/0/0/0
interface not only has the IP address we gave it.
But we can also see here that it is
in the VRF called Customer A.
We can also do a show vrf all.
This will show us that the VRF Customer A has been configured.
It has the route distinguisher that we gave it.
And we can see that it has the import
and export route targets set both for IPv4 and IPv6 unicast.
So it looks like router 1 is configured correctly.
Let's hop over and do router 2.
Router 2 here is going to be very similar, except our VRF is
going to be named Customer B. And of course, it
will use a few different numbers.
First, we'll set the router distinguisher to the 100:20.
That's what we said we were going to use.
We'll go into our address-family for ipv4 unicast.
We'll set our import route target to be 100:2000.
And we'll do the same for export.
Once again, we'll do it for IPv6 as well.
Commit the changes.
Just make sure everything works correctly.
We're good.
This, again, is going to be interface gig 0/0/0/0.
We'll put it in our VRF.
Once again, there's no IPv4 address on this.
So we're going to do the 192.168.
And this is going to be .27 because it's
between routers 2 and 7.
And this side is going to be .2.
Once again, this will be a /24.
Bring the interface up.
And commit our changes.
Let us do our show ip interface brief.
And we see that we have our interface gig 0/0/0/0 with
the correct IP address and, again, in Customer B.
So this looks like router 2 is correct.
So let's go ahead and move on to router 5.
Now, on IOS XE, the syntax is just a little bit different.
We say vrf definition and then give it the name.
Now, remember, here we're going to want a customer
A1 and a customer A2.
We still specify our route distinguisher right here.
And we'll make this 100.
Let's make these a little different
since they're going to be two different customers
on the same router.
Let's actually make these 11.
So we'll make a change on the fly here a little bit.
And then we'll set up our route target's.
Here its route-target export.
And then we'll put in the number.
Again, this should be 100:1000.
We'll do the same thing but for import.
And then we have to activate our address families.
If I just said do show vrf here on IOS XE,
notice it's created the VRF Customer A1.
And it's put on the route distinguisher.
But notice, under Protocols, unlike our management VRF,
which I have created just for our lab environment here,
of course, which is enabled for IPv4, well,
this one is enabled for nothing.
We have to actually say address-family ipv4 and
address-family ipv6 if we want to enable those.
If we look at our VRFs again, we see now
that IPv4 and IPv6 are enabled for that VRF.
So just to be clear, we don't have
to actually configure anything under those address families.
But we do have to at least type address-family ipv4 and/or
address-family ipv6 to enable the address family in the VRF.
So now let's go ahead and create our other VRF.
And we can use a lot of command history for this.
This is just going to be A2.
Next thing, of course, would be we go back
to the route distinguisher.
And let's go ahead and make this one 12.
Now, the route targets, of course, will be the same.
So we'll set up our export and our import route targets.
And then we'll do our address families.
As you can see, technically, we don't have to hit exit there.
It just makes it a little bit cleaner
when you're typing it in.
But we don't have to.
If we say do show vrf now, we can
see that we have our Customer 2 using the other route
distinguisher.
And it still has both protocols.
So the last one we have to create here is Customer B.
And again, we can still use a bit of our command history.
Of course, we're going to change this
to Customer B. The route distinguisher is, of course,
going to be different.
It's going to be 100:20.
And our import and export route targets
are going to change as well.
But we just have to change the one number.
So we can just change that.
Change that.
And we're going to go.
And then, of course, it's our address families.
They're going to be the same.
So we can just command history those as well.
Do our show vrf again.
And we see that now we have our Customer A1, our Customer A2,
our Customer B all with the appropriate route
distinguishers and with the appropriate protocols enabled.
What we don't have yet are the interfaces.
So let's go ahead and configure those.
On router 5, we'll start with interface gigabit 2.
The way we configure this on IOS XE is we say vrf forwarding,
and then list the VRF.
So this would be Customer A1.
We put on our IP address.
Just as another quick note here, if these interfaces already
had IP addresses on them--
I'm sure you've probably done this before--
as soon as you put it in a VRF, it will remove that IP address.
So that's sort of why in our preconfiguration,
I didn't even bother to configure these interfaces.
But if there was an address already, it would remove it.
And we would just have to put it back on,
assuming we wanted the same IP address on it.
Or of course, put on whatever new IP address you want to use.
So again, this is going to be 192.168.58.5.
Once again a /24.
And we'll do a no shut.
Using our command history, we can just do gigabit 3.
This is going to be VRF Customer A2.
And we can even do the command history for the IP address
here because it's going to be very similar.
Instead of 58, it's simply 59.
We'll do our no shut.
And finally, interface gig 4.
This is in VRF Customer B. And even its IP address
is not that different.
It's in 51.5 /24.
Once again, a no shut.
And we'll exit configuration.
Now, let's do a show ip interface brief.
One thing to note is that on IOS XE,
notice that the show ip interface brief does not
show the VRF like IOS XR did.
Now, what we can see, of course, is
that we've put the correct IP addresses on interfaces 2, 3,
and 4, and that they are up, up.
But if we do a show vrf, this is where
we can see which interfaces are actually in which VRFs.
We can see over on the right, the gigabit 2
is in Customer A1; gigabit 3, Customer A2;
and gigabit 4 is in Customer B. Gigabit 5, of course,
is simply what we're using for management of our lab
environment.
So in this video, we went through,
and we set up all the VRFs for customer A and customer B.
We put the correct interfaces into those VRFs,
made sure the proper address families were enabled.
And we put our IPv4 addresses on those interfaces.
We then, of course, did a few commands
to verify that the VRFs were configured properly.
Our next step for configuring layer 3 VPN
will be to configure multiprotocol BGP in the core.
And that's exactly what we get to do next.
Until then, I hope this has been informative for you,
and I'd like to thank you for viewing.