If we're doing redistribution, and we
want to do like four or five different things
to a specific route, like maybe set
the metric type or the metric itself or tag it,
instead of doing all those individually,
we can also use the method of route map.
So in this video and hands on lab,
I'd like to walk you through a scenario of what
we'd like to do.
We'd include all those details inside of a route map
and then attach that route map to the redistribution
to see it all happen.
Let's take a look at our topology. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's take a look at our topology.
And for the demonstration for the lab,
let's just do redistribution from EIGRP,
including the 78 network and the 38 network
and so forth into OSPF.
But instead of specifying all the details
for the metric and the metric type,
what we could do during the redistribution
is call upon a route map.
In that route map, we could match on one or more
of our routes with a match statement,
and then based on it matching, we could go ahead and do set.
We could set things like a tag.
We could set things like the metric type. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We could set things like the metric type.
We can set things like the actual metric
that those rules will get as they're brought into OSPF,
and for routers one and two, we'll just bring all the routes
in for OSPF.
So router OSPF 1, and then we'll do a network in area 0.
So that last set of four zeros right there, that'll be
flipped to 255s as a wildcard mask.
This is a quicker way of implementing it,
and we'll do that on R1 and R2. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and we'll do that on R1 and R2.
So we'll copy all that, right-click copy,
and then we'll go ahead and go to R1,
paste it in, R2, paste it in.
And let's take a look at R3 and 4.
Now, R3 and 4, we don't want everything brought in.
But R3 and R4, we want 10.0 dot anything.
So we'll go ahead and implement that with a 0.0.255.255.
And that'll be great for R3 and R4.
Also, on R3 and R4, we'll need EIGRP,
so let's also add that right here, the router EIGRP,
autonomous system one, and we'll do network 10.1 and also WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
autonomous system one, and we'll do network 10.1 and also
network 10.2, and that'll be appropriate for R3 and R4.
That's great.
We'll do a control A.
Oh, also, you know what?
For R3's benefit, we'll need network 10.38 as well.
That's the link from R3 that goes down to R8. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
That's the link from R3 that goes down to R8.
All right.
And we'll do a control A, grab all that, right-click, copy,
and we'll get R3, paste it in, R4, paste it in.
And then let's do the rest of the routers, 5, 6, 7,
8 with all EIGRP on everything.
So we'll go to config t, and we'll
do router EIGRP, autonomous system one, net zero, zero,
zero, zero, and we're done.
That'll be on routers 5, 6, 7, and 8.
So copy that and then router 5, router 6, router 7, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So copy that and then router 5, router 6, router 7,
and router 8.
Then we could spot check the interfaces, as well.
So if we go to R3, and let's take a look at our topology
together.
So on R3, you should have gig 10 and FA 4/0 in OSPF.
Those are 10.0 networks.
And FA 4/1 should be in EIGRP.
Let's verify that real quick, as well.
So here on router 3, we'll just show IP OSPF interface brief.
And sure enough, we have 0.
0, which was in our topology, but 10 and FA 4/0 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
0, which was in our topology, but 10 and FA 4/0
all running OSPF, show IP EIGRP interface.
And that should be FA 4/1 and 3/2.
And that is FA 4/1 and 3/2.
Let's take a look at my topology again.
Oh, yeah.
3/2 goes down to R8, and that is in EIGRP, as well.
Fantastic.
All right.
So let's see if we have any route maps to begin.
We'll do show route map.
Great.
No route map, so we'll go ahead and create one,
and I'm going to use all caps here.
So let's go ahead and call it EIGRP number 2 OSPF. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So let's go ahead and call it EIGRP number 2 OSPF.
So that's the name or route map.
Now, in the route map, if we just pressed enter,
this route map sequence would be given a sequence number
automatically, and it'd also be a permit.
But if you want to be explicit, we
could go ahead and explicitly put both the permit, as well as
the sequence number right here, which is what I'm going to do.
I'm going to say permit, and then I'll
go ahead and say sequence number 10 and a question mark,
and we'll press enter.
So we're now in sequence number 10,
and now we have to do our if-then.
And let's start--
Oh, you know what? WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Oh, you know what?
Let's go out just for a moment.
Let's create an access control list
that points to the 7777 32-bit route,
so access-- because we're going to need to point to that.
So access list one, and we'll say permit,
and we'll say 7.7.7.7 with a 32-bit mask.
Awesome.
Now that exists, I'm going to go back into that exact sequence
number of this route map.
So route map, the name, and then permit, sequence 10.
We're right back in that sequence number. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We're right back in that sequence number.
So now I'm going to do a match.
And we'll do a match.
There's lots of things that we can match on,
including a lot of attributes based on the protocol
that we're using.
In this case, we're going to match on IP and address,
and we are going to match on axis list number one.
That's the one we just created that's looking
for the exact 32-bit route 7.7.7.7.
We'll put one here, space, and a question mark.
Now this is where, if we had four or five access lists,
we can specify access list one, access list nine, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
we can specify access list one, access list nine,
access list 20.
And if they're all in the same line, It's an or.
So any one of those access list being matched as a yes, this
matches, that line would be considered true.
So in this case, we're going to match
for just one access list, access list one, and let's also--
let's match and a question mark, and let's do route type,
and let's specify internal.
WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And we'll press enter.
So now we do a do show route map.
Let's see we have so far.
We've got a route map called EIGRP to OSPF.
We have one sequence number so far, 10.
In that sequence, we're matching an IP address,
matching access list one,s and also matching on route type
internal.
Now because those match statements
are in two different lines, they both have
to be true in order for this set, which we're about to put
in, to go ahead and take place.
So on multiple lines, all those conditions
in the matches on multiple lines have WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
in the matches on multiple lines have
to have one true element on each of the lines
or the whole result of that sequence to be considered true.
So let's continue.
Let's go ahead and, based on those two conditions
being true, let's do a set and a question mark.
[LAUGHS] And there's lots of options that we can set here.
Let's go ahead and set the metric,
and we'll set the initial seed metric to 30
based on this route map being activated and matching,
and let's also do a set metric type
of type one, which is the external type WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
of type one, which is the external type
one once it gets into OSPF.
That is the metric type that will continue
to grow as that route is propagated and advertised
further and further away, as opposed to a type two
for OSPF, which just stays fixed.
OK.
So let's do show command again, do show route map,
and let's see what we have.
So if the route matches access list one,
which is the 7.7.7.7 network, and if it's an internal route,
we're going to go ahead, and we are
going to set the metric to 30.
We are going to set the metric type to type one,
and, hey, while we're at it, let's also set a tag. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and, hey, while we're at it, let's also set a tag.
Let's set the tag to 90, which is the AD for EIGRP
for internal routes.
But if we want to look for that tag,
it'll show up in OSPF with any routes that have been brought
in, and we'll press enter.
Now, one other thing here is with a route map,
is that this route map has one sequence number that's
a permit.
So what's going to happen if we apply this route map as part
of our redistribution from EIGRP going into OSPF,
it's going to go down to sequence 10.
It's going to say, OK. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
It's going to say, OK.
Match.
It's going to look for the route of 7.7.7.7,
and that it's an internal route, and then it's
going to set those parameters, the metric, the metric type,
and also the tag.
And any route that isn't 7.7.7.7 and isn't
internal, both those things, it will go ahead and deny.
So it's sort of like an access control list
used for filtering on an interface in the sense
that it's going to process the sequence numbers from top
to bottom, like lines top to bottom,
and if it doesn't find the match,
it just says, sorry, it's not happening.
So with this by itself, the only route WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So with this by itself, the only route
that is going to be redistributed into OSPF
is going to bee the 7.7.7.7 network because everything
else is denied.
So let's verify that that happens, and then
we'll go back, and we'll tweak the route
map to have it be a little bit more
lenient with the sequence number 20.
So now we have the route map, let's apply it.
So we'll go into router OSPF 1, and then
we're going to redistribute EIGRP routes into OSPF
and tag on that route map, so the syntax
would be redistribute, and we're pulling in EIGRP WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
would be redistribute, and we're pulling in EIGRP
from autonomous system one, and we'll use a question mark.
And we're going to include subnets, yes,
and here's where we can also specify the route map.
So we'll do a route map, and then
the name of our route map--
I'm going to scroll up a little bit so I don't do a typo.
It's right here.
So let's highlight that and paste it
in, space, and so the metric and the metric type and the tag
are all going to be done in the route map.
It's like pre-baked, ready to go, and we'll press enter. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
It's like pre-baked, ready to go, and we'll press enter.
Now, how do we verify that?
How do we troubleshoot this?
If we're having trouble with the redistribution
not happening the way we think it should,
I would first check the route map.
Show route map, and take a look at what we're looking for based
on the matches and the sets.
Also we'll do a show IP OSPF, and that's
going to show us details, including
redistributing external routes from the EIGRP one.
Fantastic.
So we're doing the redistribution.
So if we go up to R1, whose up in OSPF land, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So if we go up to R1, whose up in OSPF land,
so here's the topology.
Now, we did the redistribution here on R3.
Let's go to R1 and take a look at the routes.
If we did it correctly, all we should have is,
as far as an external OSPF route perspective, is one route.
And that is 7.7.7.7 that was redistributed in
and including the attributes the route map set for it.
So let's go ahead and go to R1 right here.
Let's do a show IP route and press enter. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Let's do a show IP route and press enter.
And there it is, but, whaoa, we have more route.
Hmm.
Did I not call on the ACL?
Let's go take a look at that.
So there's these 7.7.7.7 network.
There's the route itself, and if we did a show IP
route for 7.7.7.7.
We should have details, including
the tag, so it's there, but so are other routes.
So let's go back and check our route map, do show route map.
WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And this says access list one.
Let's go take a look at it and type, internal,
and let's take a look at the access list.
Oh, permit any.
[LAUGHS] A little too lenient.
I don't remember doing that, but I'm sure I did,
so troubleshooting route maps, which is part of our objective
here, is to make sure the individual components are
correct.
So let's fix that.
I'm not sure how I did that. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I'm not sure how I did that.
We'll do a no access list one and then access list one,
and we'll permit, and we'll do 7.7.7.7.
We can also put a host in front of there,
but by default, it's going to think that's a 32-bit match.
Do show access list.
OK.
And let's do this, too.
Let's do a clear IP route, asterisk, nice fresh start
for everything.
And let's go back up to R1, who a moment ago was getting WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And let's go back up to R1, who a moment ago was getting
all these external routes, all these EIGRP
routes because the access control list said,
everything's good.
But now we do a show IP route, and I'll
do a show IP route for everything.
Now it's much better.
We have one route.
That's the 7.7.7.7, and it is an external type one,
and it has all those attributes that we set on that route
in the actual route map.
But one other thing we can do is this.
If we went back to the route map, show-- WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
If we went back to the route map, show--
on the right router.
Let's go back to R3 and do a show route map.
So there it is.
If we wanted to add another sequence number, we could--
anything that didn't match sequence 10, which
is the internal type and the specific IP address specified
by the access control list, we could go ahead,
for all the other routes that didn't match sequence 10,
we could put another entry in and have
a whole other set of matching requirements
and then set requirements.
So let's modify that a little bit.
We'll do config t and route map, and we'll put in the same name WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We'll do config t and route map, and we'll put in the same name
here.
Now, by default, if I don't do anything else,
it'll be a permit.
It'll also auto sequence it for me.
It'll give me a sequence line, probably of 20,
so we'll do a do show route map.
Always verify what we think happened.
So I don't see another sequence number there.
Hmm.
Let me go ahead and do a show route map again,
and look at that.
All right.
Well, that's good know.
I'm glad I checked.
So I'm going to go ahead and write that again, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So I'm going to go ahead and write that again,
route map EIGRP to OSPF.
I'll say permit explicitly, and I'm
going to give it sequence number 20.
And now we'll do a show route map.
There we go.
So there's our sequence 20.
Now, sequence 20 has no match conditions in it whatsoever.
What that means, if there's no match, it simply says, great.
Everything matches, and there's no considerations as far
as qualifying for a match in that sequence.
So if we wanted to bring in all the routes from EIGRP,
the first sequence number would get WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
the first sequence number would get
internal routes that match the ACL and do the metric type
and everything else that's specified.
And then the rest that didn't match
that would hit sequence 20, match there, and then just be
brought in as normal.
What we could do, though-- let's do a set,
and let's do a set tag of--
let's do a set tag of 333, and that way,
what we should see is that the network 7.7.7.7 will have
the tag of 90 and all the rest of the EIGRP routes
that were brought in, because the sequence 20 that doesn't WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
that were brought in, because the sequence 20 that doesn't
have a match condition, would automatically
get the tag of 3.3.3.3.
So let's go back up to R1, and on R1,
let's do a show IP route, and here
we have a whole bunch of additional routes,
but by default, it brought him in as an external type
two because we didn't specify.
And if we did a show IP route for one
of those specific routes, there's our tag of 3.3.3.3.
So in this video, we've taken a look
at an example on the syntax and logic of a route map
that can have a whole bunch of pre-baked if-then statements, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
that can have a whole bunch of pre-baked if-then statements,
there are match and set statements,
and then we can include those route maps
as part of our redistribution to control
what we want to come in, how we want it to be marked,
which gives us the ability to control those attributes when
those routes are being redistributed.
So thanks for joining me in this video and lab,
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.