One of the best ways of learning about a tool or a method
for manipulating routing is to actually do it.
So in this video and hands-on lab,
I encourage you to click on the link for the Virtual Lab
and join me as we take a look at using distribute lists
and prefix lists to change the attitude
and behavior of a Cisco router.
And here's our game plan.
Let's implement EIGRP on all these devices.
And what we'll discover is that for the 10.0.1 network WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And what we'll discover is that for the 10.0.1 network
and some other 10.0 networks up here, and also the 1.1.1.1,
R8 is going to have two equal cost paths, one going
this way, one going that way.
We can verify that in the lab.
And what I'd like to do to manipulate R8's behavior
is change the way R7 is advertising over to R8.
What we can do is, we can use what's
called a distribute list.
And a distribute list, as used as part of EIGRP
is something to say, oh, don't bother
sending him this information or advertising this information.
So we can say, hey, regarding the networks of 10.0, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So we can say, hey, regarding the networks of 10.0,
anything, if they're 24-bits long,
go ahead and don't bother advertising them.
So if R7 doesn't advertise that and doesn't advertise 1.1.1.1,
which we can also control, if it doesn't advertise those to R8,
R8 is no longer going to have that route.
And it will stop using it.
So in conjunction with the distribute list,
we can use an ACL to identify the networks that we don't
want to advertise via EIGRP.
We could also use something called a prefix
list, which can also be used.
And it's a little more granular.
So lists in our example and our walk-through, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So lists in our example and our walk-through,
let's use a distribute list that calls upon a prefix list that
is matching on 10.0.1.anything and also matching on that
specific route, and restricting those routes from being
advertised to any neighbors.
And then I'll walk you through it step by step.
So here's our lab environment.
And I'm just going to bring up Notepad for a moment
because part of our exercise here is
to make sure EIGRP is running.
And it is not at the moment.
So we do a show IP protocols.
It's got no dynamic routing protocols.
So let's bring up a fresh Notepad document. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's bring up a fresh Notepad document.
And we'll do a config T and a router
EIGRP We use autonomous system number one.
If you want to use named EIGRP feel free as well.
And then we'll do a network of everything.
Great.
So we'll do a Control A and a Control C to copy all that.
And then I'll just do a right click on each of these devices
and paste it in.
EIGRP is so stinking fast.
Oh my gosh.
We do a show IP route for EIGRP learned routes.
Boom.
It's done.
It's very, very fast.
So the two routes I want to just pay attention to here
would be these guys right here. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
would be these guys right here.
So first of all, 1.1.1.1 it has a next hop of dot 7
and dot 6, which we look at our topology, that
would be R7 and R6.
And if we go back to the CLI.
And we look at the network 10.0.1.1,
it's got a next hop of 6 and 7 as well.
And what we're going to do is I want
to make those routes coming from R7 not look as good.
And one way of doing that is by simply telling R7,
don't advertise those routes.
And that will give us an example of practicing
with both distribute lists in EIGRP
and also with prefix lists. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and also with prefix lists.
So let's do this.
Let's go ahead into R7, get on the right router.
And we'll do a show IP prefix lists just
to make sure I don't have any in place.
And let's create some.
We'll get to configuration mode IP prefix list,
and a question mark.
So let's call this OURLIST.
And then you can give him a sequence number.
Now, if you don't give it a sequence number,
it'll automatically sequence them for you.
But if you want it nice and tight,
and you want to know what the numbers are,
you can just put them in manually.
I'm going to call this sequence-- you know what? WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I'm going to call this sequence-- you know what?
What the heck.
I'll live on the edge.
I think it's going to start with sequence number 5.
And that's going to be fine with me.
So let's specify deny.
And you might say, Keith, what is
this prefix it's going to deny?
We don't-- we're going to use this prefix list as part
of the EIGRP with a distribute list option.
So let's go ahead and deny 1.1.1.1,
which is a 32-bit route.
I need to check on that real quick.
But back to R8, it is indeed a 32-bit route right there.
So if we just pressed Enter right here, boom.
This prefix list, if called upon, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
This prefix list, if called upon,
is going to deny the exact 32-bit route of 1.1.1.1.
Boom.
All right.
Next, let's go ahead and deny something else.
Do an IP prefix list.
And we'll call this OURLIST.
And, again, in the background, this
is automatically sequencing them for us.
So we'll do a deny.
And let's do a 10-- you know, let's do this.
Let's come up with a plan together.
Let's imagine that we want to have R7 not advertise WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's imagine that we want to have R7 not advertise
10.0.anything if it's a 24-bit mask, a 24-bit route.
Now, to do that, prefix lists rock because we can specify not
only that these two octets here can be wildcards,
it doesn't matter what's there, but we also have the ability
with a prefix list to say exactly the length
of the network or prefix that we're looking for.
Let me show you how to do that.
This is really cool.
Let's go back to our CLI. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's go back to our CLI.
And at the CLI we'll do a deny 10.0.0.0.
And then we can say slash 16, like that.
And then if we add on, if we add on a GE or an LE, which
is greater than or equal to, or less than or equal to,
it then says OK.
There's more conditions that apply.
So it has to be 10.0 and, we could say, needs be less than
or equal to a 24-bit route.
And press Enter.
And so what that would do, that would say, OK, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so what that would do, that would say, OK,
only 24-bit routes that have the first two octets of 10.0.
But any time we see the LE or GE after it,
think of the slash 16 or the slash 24, whatever is there,
just think of that as everything after that part of the mask
is a wild card.
And that we're looking for the links.
We could also, if we wanted to add on to that,
we could also do something like this.
We could say, let's say that 10.2, let's
say that anything that starts with 10.2.
But it has to be greater than or equal to--
let's imagine, how about 19 bits-- WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
let's imagine, how about 19 bits--
and then less than or equal to 31 bits.
Press Enter.
So we can be very granular if we have a certain quantity.
So this means 10.2.anything, if the mask or the length
of the network is between 19 and 31 inclusively.
That's what this says.
So if we do a do show IP prefix list.
Let's see what we have so far.
We've got three deny statements.
Well, just like an access control list,
if we don't have some permits in here,
there's not going to be a whole bunch being allowed. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
there's not going to be a whole bunch being allowed.
So let's add one more sequence.
And we'll do it IP prefix OURLIST.
And we'll say permit.
And here's how we do the wild card that means let everything.
It is 0.0.0.0/0.
But we're not going to press Enter there.
And then we're going to add-- this is important
for the everything-- is that we're
going to do a less than or equal to 32,
which basically means any IP address that wasn't matched
earlier is going to match here.
And in this case it's a permit.
So what we could do now is we could go to R7 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So what we could do now is we could go to R7
and tell R7 in its routing protocol
to go ahead and apply this as an outbound distribute list.
And it will not advertise, if you take a look at this,
it won't advertise 1.1.1.1.
It won't advertise 10.0.anything if it has a mask exactly equal
to 24.
And it won't advertise 10.2.anything if it has a mask
between 19 and 31.
So those are the three categories
of routes it will no longer advertise.
And then the last line here says permit
everything else, which means advertise everything else. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
everything else, which means advertise everything else.
So let's go ahead and apply this by going
into router configuration mode.
So do show IP protocols.
Just remember what routing protocols I have.
OK.
It's EIGRP 1.
So we go to router EIGRP 1.
And then we'll do a distribute list.
And there's a whole bunch of things to start with dist.
So D-I-S-T-R. Great.
Distribute list.
And then we'll go ahead and-- this
is where we could call on an access list
to match on what we want to permit or deny out.
Or we could use the word "prefix".
There's also the keyword for route map WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
There's also the keyword for route map
if you wanted to call on a route map.
So this time we created the prefix list.
Now let's call on the prefix list
by using the keyword "prefix".
And then we'll call OURLIST.
And then a question mark, and then we'll specify "out".
Now before we press Enter, let's go to R8.
So a moment ago, if we do a show IP route for EIGRP
learned routes or the-- let me press Enter again.
So for the 10.0.1 we are going to 7 and 6.
And also for the 1.1.1.1 we are going to 7 and 6. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And also for the 1.1.1.1 we are going to 7 and 6.
And basically R7 is going to stop advertising that.
And as a result, we're no longer going
to use R7 as the next hop.
Let's go back to R7 We'll press Enter.
We'll do a show run section router just
to verify what we did.
And survey says, all right.
Pretty straightforward, distribute
list, prefix, the name of our prefix list, out.
And let's go take a look at R8.
And here on R8, we'll do an Up arrow key show IP route EIGRP. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And here on R8, we'll do an Up arrow key show IP route EIGRP.
And check it out.
We no longer have two routes to 1.1.1.1.
And that's because R7 is no longer advertising that
based on the prefix list.
Also, if we had the route for 10.0.1, which we also had
R7 as the next hop for.
And we no longer have it there, either.
But what we do have, I'm just looking for dot 7
as the next hop, he is advertising to us the 10.1.5
and the 10.1.35 and the 10.1.7.
So we're still learning routes, except he is not
advertising the routes that we told it not
to based on the distribute list, which was associated WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
to based on the distribute list, which was associated
with the prefix list.
So thanks for joining me in this lab
on implementing some filtering of routes
for outbound advertising with EIGRP using
distribute lists in combination with prefix lists.
And I'll see you in the next video.
Meanwhile, I hope this has been informative for you.
And I'd like to thank you for viewing.