- [Instructor] In this video, let's take a look
at a basic configuration of mutual route redistribution.
Here's the topology we had earlier.
And in this topology,
router R2 two is learning routes from R1 via OSPF.
It's learning routes from R3 via EIGRP.
And what we're going to do is configure R2
to mutually redistribute routes learned
from one routing source into the other routing source.
And our route redistribution that we do entirely on R2,
it's going to use the redistribute command.
But there's a lot of confusion about this command.
For example, if I'm in the OSPF router configuration mode,
and I give the redistribute command
saying I want to redistribute EIGRP, what am I saying?
Am I saying that I want to redistribute OSPF into EIGRP?
Or do I want to redistribute EIGRP into OSPF?
Well, here's the rule I want you to remember.
When we give the redistribute command
under router configuration mode
for a specific writing protocol,
we're saying we want to redistribute routes
into that routing protocol.
So in the example I gave where we're giving
the redistribute command under OSPF
router configuration mode,
saying we want to redistribute EIGRP.
What we're saying is we want to redistribute EIGRP
learned routes into the OSPF routing process.
Now let's go out to the topology we examined
and setup mutual route redistribution.
Let's issue the show IP route command on router R2
to see what routes R2 knows about.
Let's do a show IP route.
And you'll notice that it is learning routes from EIGRP.
We can see those because they're tagged with this D code.
Those are EIGRP learned routes.
And the O indicates that these networks
were learned via OSPF.
But if I go over to R1 have I learned anything?
If I do a show IP route here,
have I learned anything
via a routing protocol at all?
And the answer is no I haven't.
R2 is not advertising any networks to me.
All I know about are networks within
the OSPF autonomous system.
Same thing If I go to R3.
If I do a show IP route,
I'm only going to know about routes
as part of the EIGRP autonomous system.
So let's take a look and we do this on R2.
Let's take a look at how we can add route redistribution
to tell R2 to take the OSPF routes,
inject them into EIGRP,
and vice versa.
And I want to reinforce a statement
we made earlier about the seed metric.
We said that the default metric or the seed metric
for EIGRP is infinity.
So just to prove that initially,
I'm not going to configure any metrics.
And I'm just going to let the default seed metric
do it's thing.
So in route R2, let's go into global configuration mode.
And I'll say router OSPF.
Our process ID is one.
And I'll say redistribute EIGRP,
autonomous system number one.
And let's do the same thing for EIGRP.
I'll say router EIGRP,
autonomous system one.
Redistribute OSPF, process ID one.
And let's see what now.
And I notice I did not specify any metrics at all.
Something else I didn't do
when I said redistribute EIGRP one,
I did not give the subnets keyword.
We typically want to give the subnets keyword
because that's going to cause both classful
and classless networks to be redistributed.
However, in recent versions of Cisco IOS,
we might get that added force automatically.
Let's take a look.
Let's do a show run,
pipe to section,
router, OSPF one.
And even though I did not say subnets,
the keyword of subnets got added automatically.
But your version of Cisco IOS might not do that.
So I think it's a good practice
to usually that's what you're wanting to do.
Usually issue the subnets keyword.
Now let's take a look at the IP routing table
on routers R1 and R3.
First let's go over to R1,
and let's do a show IP route.
And we see we have learned some routes via OSPF.
We see the O,
and we see that they've been learned
with OSPFs default metric of a 20.
We didn't set that.
That was automatically configured for us.
Now notice this E2.
That's telling us that this is an OSPF external route.
Specifically a type two external route.
We'll be distinguishing between a type two
and a type one external route
a little bit later in this video.
But for now,
we're just trying to get all the routes redistributed.
We've got our EIGRP learned routes injected into OSPF.
Let's see if the same is true for router R3.
Have we learned the OSPF routes?
Have they been injected into EIGRP?
Let's do a show IP route.
And the answer is no.
We haven't learned any routes beyond what we already knew.
And why is that?
It's that default seed metric of EIGRP.
It's a seed metric of infinity.
So when those routes were injected into EIGRP,
they appeared to be unreachable.
And to resolve this issue,
we need to assign a metric to routes
being redistributed into EIGRP.
And if you want to take a note on this,
there are three primary ways
that we can assign a non-default metric to a route
that's being redistributed into a routing protocol.
Number one,
we can set a default metric for all writing protocols
being injected into EIGRP.
Number two,
we can set a metric as part of the redistribute command.
And third, we can set a metric using a route map.
And to illustrate the first option
let's configure the metric to assign all routes
being injected into EIGRP,
to be the same metric.
It doesn't matter if I'm injecting a OSPF
or RIP or whatever,
they're all going to have the same metric
as they're injected into EIGRP.
To do that,
let's go back over to router R2.
And we'll go into global configuration mode
and back into router EIGRP
autonomous system one configuration mode.
And I'm going to say default-metric.
And if we use some context sensitive help,
it's going to walk us through the metric components of EIGRP.
First is bandwidth,
and the unit of measure is in kilobits per second.
And I'll say that we're working with gig links.
And a gig is 1 million K.
So I'll say 1 million.
So a one, and one, two, three, one, two, three.
Six zeros after the one.
Next we specify delay.
Here the unit of measure is in tens of microseconds.
And I'll just say we've got very little delay.
We'll give a one to say we've got a 10 microsecond delay.
Next we'll say how reliable this link is.
And reliability is a number over 255.
And if I say 255, that's completely reliable.
So I'll say 255.
Next we're going to specify the loading
where minimally loaded is a one over 255.
I'll say a one.
And even though it's not part of the EIGRP metric formula,
MTU is there as a tiebreaker.
And I'll say my MTU,
my maximum transmission unit is 1,500 bytes.
Which is the default, by the way.
Let's end this.
And even though we used
the seed metric of 20 for OSPF.
If I wanted to change it, we could.
In fact, let's do that.
Let's go into router, OSPF process ID one.
And I'll say default-metric, 30.
So we'll see that we've made a change
when we look at those routes over on R1.
So that's going to be the default metric for OSPF.
Now let's go over to R3
and see if we've learned any routes.
Let's do a show IP route.
Great news we have router R3 has learned routes
originating in the OSPF autonomous system.
And we know they came from outside EIGRP.
Because next to the D that indicates EIGRP.
We've got this EX,
and that means EIGRP external.
And you remember
when we talked about administrative distance,
we said if our route were redistributed into EIGRP.
Instead of having EIGRP's
normal administrative distance of a 90,
external routes have an AD 170.
And we can see that right here.
This is the new administrative distance
because these were injected into EIGRP.
By the way let's go over to router R1
and see if our cost has changed.
Instead of having a metric of 20,
I set the default metric to a 30.
Let's do a show IP route.
Did that change?
Yeah, sure did.
Here we see the new default metric of a 30.
Well let's go back over to router R2
and take a look at a different way of setting the metric
for these routes being injected into EIGRP.
The second option we talked about
was we could assign the metric
as part of the redistribute command.
So what I want to do is remove
our previous default metric keyword
and the redistribute command.
Then I'll put the redistribute command back
and as part of that,
I'll specify the metric.
So let's go back into router EIGRP
autonomous system one configuration mode.
And I'll say no default-metric.
And it was one, one, two, three,
one, two three.
And we had a one,
255 and a one.
And a 1,500.
Let's also get rid of the redistribute command.
I'll say no redistribute OSPF process ID one.
So we've removed any redistribution configuration
for EIGRP.
Now let's do everything with one command.
I'll say redistribute, OSPF process ID one.
And the metric as part of the redistribute command.
I'll specify the bandwidth.
I'll give a one
and then one two, three, four, five, six zeros.
For the delay I'll say it's 10 microseconds.
And since tens of microseconds is our unit of measure
I'll give a one.
For the reliability
I'll say we're totally reliable.
It's 255.
Our load, we're minimally loaded.
That'll be a one.
And our MTU is going to be 1,500.
Let's bounce out of that configuration,
go back over to router R3
and we should see the same result we saw earlier.
If I do a show IP route,
we should still see those routes.
We do.
Nothing has changed from the perspective of R3.
We just configure things
a little bit differently on R2.
Now let's take a look at the third option
for setting a metric on a redistributed route.
It's to use a route map.
And route maps are super powerful.
They can be used for a variety of configurations.
Essentially they can match traffic.
And then once traffic has been matched,
we can set one or more parameters.
For example I could say if I've matched a particular packet,
I could set its next top IP address.
And essentially override where the routing protocol
was telling me to go.
But in our context we're focused on using a route map
specifically for setting a metric value.
And here we don't even have to match traffic.
We can just say set the metric value to this.
Here's how we do that.
Let's go back over to router R2.
And in router EIGRP
autonomous system one configuration mode,
let's negate that previous command I gave.
I'll put a no in front of that.
And now let's create a route map.
To do that I'll say route-map.
And I'll call this set-
metric-demo.
Now normally when I create a route map,
if I've got several different matching criteria.
I would set a sequence number here.
So the first sequence number might be a 10.
The next one might be a 20 and so on.
Here I'm just doing one thing with the route map.
So there's really no need to enter a sequence number.
So I can just press Enter.
And I can set,
let's use some context sensitive help.
I can set several different things with a route map.
Like I said, it is super powerful.
Here though I want to set the metric.
And I'll say set metric.
And I'll give those same metric values
for EIGRP that we gave earlier.
Which was 1 million.
One, two, three, four, five, six.
We'll set the delay,
the reliability,
the load,
and the MTU.
Now let's apply that route map
to the redistribute command.
Let's go back into router configuration mode
for EIGRP autonomous system one.
And I'll say redistribute OSPF process ID one.
And I'm going to to use the route map
that we called set-metric-
demo.
And let's go see if it did the same thing
over on router R3.
Did it still work?
Let's do a show IP route command.
Yes indeed.
We still had those routes redistributed
successfully into EIGRP.
Now let's go back over to router R1
that lives in our OSP autonomous system for a moment.
If we take a look at R1,
let's do a show IP route.
And notice that we've got these E2 values
next to the routes that we've learned from EIGRP.
But notice there's also an option for E1.
So what's the difference?
Well a code of E2 indicates that the route
carries a metric that was assigned
by the router performing the redistribution.
And this router that's sitting between
the two autonomous systems, R2 in our case.
It's known in OSPF terminology as ASBR.
An autonomous system boundary router.
And an E2 code means that no matter how many routers
we went through since we were advertised by the ASBR,
it doesn't matter if I went through five other routers.
That metric doesn't change
within the OSPF autonomous system.
And when we redistribute routes into OSPF
that's what happens by default.
We're using an external type two.
A code of E1 indicates that the router's metric
is made up of the cost assigned by the ASBR.
Plus the cost required to get back to the ASBR.
Now to me that sounds like the E1 route
is potentially more accurate.
However having a code of E1
doesn't really give us any advantage in this case.
In a simple topology like this,
where R1 only has one way
to get out of the autonomous system.
There's only ASBR.
And there's only one way to get to that ASBR,
it really doesn't matter if we use E1 or E2.
But in a more complex topology,
I might prefer to have a code of E1
because that's going to be more accurate about the true cost.
And I want to to show you how we can configure
route redistribution to specify the code of an E1.
Let's go back over to router R2.
And we'll go into router OSPF
process ID one configuration mode.
And I'll say no redistribute,
EIGRP, one,
subnets.
We just got rid of our redistribute command.
Now let's enter a new redistribute command.
I'll say redistribute,
EIGRP autonomous system one.
Now I'm going to say the metric type
is one.
Let's enter that.
Now let's go back and check out the IP routing table
on router R1.
Before I gave that command,
notice the cost of these redistributed routes.
It was a cost of 30.
Or a metric of 30 because that's the metric
that I configured on a router R2.
Let's take a look now.
Let's do a show IP route.
And now we have an external type one, and E1 code.
And notice the cost now, or the metric.
It's a 31.
It's adding the cost of one,
the cost over a gig link.
It's adding the cost of one
that it's going to cost R1 to get to R2.
And to that, it adds the metric R2 was advertising.
Which was a 30.
So 30 plus one gives us 31.
I think that's a more accurate representation
of what the metric should look like.
And that's a look
at a basic route redistribution configuration.