|
0:00:14
|
Welcome back everybody to Internetwork Expert CCIE Routing and Switching Advanced Technologies class.
|
|
0:00:20
|
In today's sections, we're gonna be talking about IP Version 4 route redistribution.
|
|
0:00:25
|
What are the potential problems that we could run into with redistribution,
|
|
0:00:29
|
and how we can fix these problems with the design
|
|
0:00:32
|
before we actually see the end results in the network.
|
|
0:00:36
|
Now, overall, the lesson objectives that we're gonna have for....
|
|
0:00:41
|
today's session, first and foremost is gonna be to understand how the redistribution process works,
|
|
0:00:46
|
and what routes are candidate for redistribution
|
|
0:00:50
|
when we go between two different protocols.
|
|
0:00:52
|
So, for example, when we're redistributing between EIGRP and OSPF.
|
|
0:00:57
|
We'll also look at some common problems with doing redistribution of connected routes
|
|
0:01:03
|
whether we are explicitly doing a Redistribute Connected,
|
|
0:01:06
|
or whether we are implicitly doing this
|
|
0:01:08
|
when we are redistributing between the different dynamic protocols.
|
|
0:01:12
|
How IOS is gonna choose which routes it's gonna use
|
|
0:01:16
|
once redistribution occurs, and any type of problems that we can have with looping of the route redistribution.
|
|
0:01:24
|
Now, ideally, once we're done with this particular session in class,
|
|
0:01:28
|
everyone should have a good understanding of how to predict the type of looping in the network.
|
|
0:01:34
|
Be able to tell the difference between
|
|
0:01:36
|
topologies that will not cause redistribution problems,
|
|
0:01:39
|
and topologies that could potentially cause redistribution problems.
|
|
0:01:43
|
Then, how to predict these,
|
|
0:01:45
|
identify them, and the prevent the looping from occurring
|
|
0:01:49
|
in order for us to get full IP reachability between all devices in the topology.
|
|
0:01:55
|
Now, the first key point to understand about redistribution
|
|
0:01:59
|
is that the process of redistribution occurs from the routing table,
|
|
0:02:04
|
and not the routing database.
|
|
0:02:06
|
We'll see that this is gonna be significant
|
|
0:02:08
|
when we look at EIGRP, or RIP, or OSPF,
|
|
0:02:12
|
and we see a difference between what's installed in the EIGRP topology,
|
|
0:02:16
|
or the OSPF database versus what goes into the actual routing table.
|
|
0:02:22
|
So, when we're redistributing between two protocols,
|
|
0:02:25
|
if we're taking the source protocol X and redistributing it into the destination protocol Y,
|
|
0:02:30
|
the router is gonna first look at two things.
|
|
0:02:33
|
First, what are the routes that are actually installed in the routing information base,
|
|
0:02:37
|
or the routing table via that protocol,
|
|
0:02:40
|
and what are the connected interface in the routing table that are running that protocol.
|
|
0:02:48
|
Now, the first one is just gonna be controlled based on what particular prefixes we are learning.
|
|
0:02:53
|
In the case of EIGRP, this is gonna be any dynamic routes
|
|
0:02:56
|
that are coming from our connected peers whether these are internal routes or external routes.
|
|
0:03:03
|
The connected links that are running the protocol,
|
|
0:03:05
|
that's gonna be based on the network statement configured under the routing process
|
|
0:03:10
|
for either RIP, or EIGRP, or OSPF,
|
|
0:03:13
|
or for OSPF the IP OSPF command at the interface level.
|
|
0:03:19
|
So, when we look at the output of the Show IP Protocols on the IOS,
|
|
0:03:24
|
this should tell us what are the connected links
|
|
0:03:26
|
that are candidate to be redistributed between the different processes.
|
|
0:03:32
|
Now, we'll also see today that depending on what particular protocol we're looking at,
|
|
0:03:36
|
whether it's RIP, or BGP, or OSPF,
|
|
0:03:39
|
there are different rules that control
|
|
0:03:42
|
what particular routes we can install in the table
|
|
0:03:44
|
and then what particular routes that we can actually be advertised.
|
|
0:03:48
|
So, we need to know what are these normal design issues
|
|
0:03:52
|
with the different IGPs and BGP
|
|
0:03:56
|
before we can actually predict what's gonna happen inside the redistribution process.
|
|
0:04:03
|
Now, as I mentioned when the redistribution process happens here,
|
|
0:04:06
|
the router is gonna be looking for two things:
|
|
0:04:09
|
any dynamic routes installed in the routing table via that protocol,
|
|
0:04:13
|
so, for example if we are redistributing OSPF into EIGRP,
|
|
0:04:17
|
we're first gonna take any routes that show up any output of the Show IP Route OSPF.
|
|
0:04:23
|
Then, secondly, there is an implicit redistribution
|
|
0:04:26
|
that happens for any connected interfaces that are running the OSPF process.
|
|
0:04:32
|
Now, if we do not use the Redistribute Connected command,
|
|
0:04:35
|
then, any interfaces in this source protocol
|
|
0:04:39
|
that are directly connected into the destination protocol.
|
|
0:04:44
|
We'll see that the potential issue we'll run into
|
|
0:04:46
|
is that if we do explicitly list
|
|
0:04:49
|
what particular links will be redistributed from the connected process,
|
|
0:04:54
|
this is going to override what the implicit redistribution is.
|
|
0:05:00
|
So, if we were to take a look at the topology,
|
|
0:05:03
|
and let's say for example that on router 6,
|
|
0:05:08
|
we are running the RIP process to one of the backbone routers,
|
|
0:05:14
|
and we are running the OSPF process internal to our network.
|
|
0:05:20
|
And we wanna perform redistribution between RIP and OSPF on router 6.
|
|
0:05:25
|
So, when OSPF is going into RIP, the first thing router 6 is gonna do
|
|
0:05:29
|
is internally look at the output of the Show IP Route OSPF.
|
|
0:05:34
|
So, any dynamic routes that are learned in the Fast Ethernet 0/0.146,
|
|
0:05:39
|
or the Fast Ethernet 0/0.67,
|
|
0:05:42
|
those are gonna be candidate for redistribution.
|
|
0:05:46
|
Additionally, the connected links of the Fast Ethernet 0/0.146 and the .67 link,
|
|
0:05:53
|
whatever the IP prefix actually assigned to those interfaces are,
|
|
0:05:57
|
those should be candidate to be installed in the RIP database.
|
|
0:06:03
|
Now, the potential issue that we'll run into
|
|
0:06:05
|
is that if on router 6, under the RIP process,
|
|
0:06:09
|
if we were to issue a manual redistribute connected command,
|
|
0:06:13
|
then, this is going to automatically override
|
|
0:06:16
|
those interfaces that are coming from the OSPF process.
|
|
0:06:21
|
So, essentially, we need to treat the dynamic routing process as the connected routing process,
|
|
0:06:26
|
as two different entities from the prospective of redistribution.
|
|
0:06:32
|
As long as we do not manually issue the Redistribute Connected command,
|
|
0:06:35
|
then, we should assume that any interfaces directly connected that are running the protocol
|
|
0:06:40
|
will be sent to the destination protocol.
|
|
0:06:45
|
So, we'll take a look at some examples of the command line here
|
|
0:06:48
|
when the Connected Redistribution does work properly,
|
|
0:06:51
|
and then when we are filtering it with the Redistribute Connected command,
|
|
0:06:55
|
what are the potential problems that we could run into.
|
|
0:07:00
|
Now, once the router actually performs the redistribution,
|
|
0:07:03
|
then, it's gonna figure out which routes are actually gonna go into the routing table
|
|
0:07:09
|
depending on what the individual protocol we are running is.
|
|
0:07:14
|
So, first step is gonna look through the routing database
|
|
0:07:17
|
and figure out what are the candidate paths that can actually go in the routing table.
|
|
0:07:22
|
So, this is gonna depend on what that particular protocols, selection process is,
|
|
0:07:26
|
whether we're talking about the diffusing update algorithm for EIGRP,
|
|
0:07:31
|
or the shortest path first algorithm for OSPF,
|
|
0:07:34
|
we talked about those previously is gonna be specific to that individual protocol.
|
|
0:07:39
|
Now, once OSPF comes up with its candidate routes that can go in the routing table,
|
|
0:07:45
|
there could potentially be multiple paths
|
|
0:07:48
|
if they have equal metric values,
|
|
0:07:51
|
or in the case of EIGRP if we are configured for doing unequal cost load balancing.
|
|
0:07:57
|
But in the end, the routing database is gonna come up with a list
|
|
0:08:00
|
of what are the candidate routes that I can install in the routing table.
|
|
0:08:04
|
Then, the router is gonna look at,
|
|
0:08:07
|
are there multiple matches for these exact prefixes from different protocols.
|
|
0:08:13
|
So, for example, if I were to have the prefix 1.2.3.0/24,
|
|
0:08:18
|
and I'm learning it via both EIGRP and OSPF,
|
|
0:08:22
|
then, I'm gonna have to choose which one actually goes into the routing table.
|
|
0:08:26
|
And this is gonna be based on the administrative distance value.
|
|
0:08:30
|
So, whichever source protocol has the lower AD,
|
|
0:08:34
|
or the lower administrative distance, that's gonna be the one that is candidate to go into the routing information base,
|
|
0:08:40
|
which is the routing table.
|
|
0:08:41
|
And the forwarding information base, which is the CEF table.
|
|
0:08:46
|
Now, we talked about this previously what are the different administrative distance values for the protocols.
|
|
0:08:51
|
But we do need to take this into account anytime we are doing redistribution.
|
|
0:08:56
|
The reason why is we can see here
|
|
0:08:59
|
some of the IGPs and BGP treats the internal prefixes differently
|
|
0:09:05
|
than they do the external prefixes from a prospective of the administrative distance.
|
|
0:09:11
|
So, we can see internal EIGRP uses a distance of 90,
|
|
0:09:14
|
where external EIGRP uses a distance of 170.
|
|
0:09:18
|
So, this means that if I were learning an external OSPF route,
|
|
0:09:23
|
and an external EIGRP route,
|
|
0:09:25
|
and there are equal longest matches for the same destination,
|
|
0:09:29
|
I would prefer to install the OSPF route into the routing table,
|
|
0:09:33
|
and not the external EIGRP route.
|
|
0:09:36
|
And the reason why is that the external EIGRP route has the higher distance of 170 versus the 110 for OSPF.
|
|
0:09:45
|
Now, the reason that this could potentially be an issue
|
|
0:09:48
|
is that the advertisement rules for EIGRP and RIP are different than OSPF and BGP.
|
|
0:09:58
|
Where RIP and EIGRP, since they are distance vector protocols,
|
|
0:10:02
|
they can only advertise routes that are actually get installed in the routing table.
|
|
0:10:07
|
So, when EIGRP is generating its update messages or RIP is generating its update messages,
|
|
0:10:13
|
those are coming from the routes in the routing table,
|
|
0:10:16
|
not the routes that are installed in the routing database, or the routing topology.
|
|
0:10:22
|
We'll see the reason that this becomes significant
|
|
0:10:25
|
is that if we are learning an external EIGRP route with the distance of 170,
|
|
0:10:30
|
and a RIP route with a distance of 120, or an OSPF route of 110,
|
|
0:10:36
|
and the EIGRP route is not get installed in the routing table,
|
|
0:10:41
|
it implies that we cannot advertise that prefix to other EIGRP peers.
|
|
0:10:47
|
So, we can end up in certain redistribution designs,
|
|
0:10:50
|
where there's not necessarily a loop in the network
|
|
0:10:53
|
that's related to the metric or the administrative distance,
|
|
0:10:56
|
but simply, certain peers in the network will not learn about different routes
|
|
0:11:02
|
based on the advertisement rules of either EIGRP or RIP.
|
|
0:11:08
|
Now, we'll see that OSPF and BGP do not have this limitation,
|
|
0:11:12
|
because with OSPF, since it is a link state protocol,
|
|
0:11:16
|
all the routers within the link state flooding domain have to have the same copy of the database.
|
|
0:11:21
|
So, this means that if router 1 and router 2 are both in area zero,
|
|
0:11:26
|
regardless what routes router 1 is installing into its routing table,
|
|
0:11:31
|
it has to advertise the entire OSPF database to router 2.
|
|
0:11:35
|
It's then up to the routers individually
|
|
0:11:38
|
to figure out which routes are actually gonna go from the routing database to the routing table.
|
|
0:11:44
|
But with EIGPR and RIP,
|
|
0:11:46
|
whatever is in the routing table is gonna map one to one with what is actually being advertised.
|
|
0:11:52
|
Now, in the case of BGP,
|
|
0:11:54
|
the routes that are candidate to be installed in the routing table
|
|
0:11:57
|
are the ones that win the BGP best path selection process.
|
|
0:12:02
|
So, this could be based on the highest local preference,
|
|
0:12:06
|
the shorter AS path value, the lower multi-exit discriminator value.
|
|
0:12:11
|
So, whichever prefixes are considered the best routes in BGP,
|
|
0:12:16
|
those are the ones that are candidate to be installed in the routing table,
|
|
0:12:19
|
and also candidate to be advertised to other peers.
|
|
0:12:23
|
We'll see later some cases with BGP
|
|
0:12:27
|
that we can have a situation where the route is chosen as the best path.
|
|
0:12:33
|
It is not installed in the routing table,
|
|
0:12:36
|
but it is still advertised to other BGP peers.
|
|
0:12:39
|
And this is a type of case where BGP can end up in a routing loop or a traffic loop
|
|
0:12:46
|
if what we're installing in the routing table
|
|
0:12:48
|
doesn't actually match up with what's being advertised to our other peers.
|
|
0:12:54
|
So, the next thing we need to know
|
|
0:12:57
|
is what are some of the differences between the IGPs and BGPs specifically,
|
|
0:13:02
|
on how they treat the internal routes versus the external routes,
|
|
0:13:06
|
and how they do the path selection on one versus the other.
|
|
0:13:10
|
Now, the first and most problematic protocol we'll see here
|
|
0:13:15
|
is RIP version 2,
|
|
0:13:17
|
where it does not differentiate between and internal route in an external route.
|
|
0:13:23
|
So, this means that if I redistribute EIGRP into RIP,
|
|
0:13:27
|
when I send my RIP update out to my connected peers,
|
|
0:13:30
|
I'm not telling them that this route came from EIRGP domain.
|
|
0:13:34
|
I'm simply saying, "This is the prefix, this is the hop count."
|
|
0:13:38
|
There is no other information that is encoded inside the actual update message.
|
|
0:13:44
|
So, we'll see that we can have potential issues with RIP,
|
|
0:13:47
|
where it does not choose the correct path,
|
|
0:13:51
|
because the router cannot distinguish between what are the internal routes and what are the external routes.
|
|
0:13:56
|
We'll also see that for both of these type of routes, internal and external,
|
|
0:14:01
|
RIP is gonna treat them the same with the administrative distance of 120.
|
|
0:14:05
|
And there's no way that we can separate on the routing process
|
|
0:14:08
|
and internal RIP distance versus an external RIP distance.
|
|
0:14:15
|
The next important point here is that when we redistribute into RIP,
|
|
0:14:19
|
for example, OSPF into RIP, or EIGRP into RIP,
|
|
0:14:23
|
there is no default seed metric or seed hop count.
|
|
0:14:27
|
So, this means that we either need to specify the metric
|
|
0:14:30
|
globally under the process with the default metric command,
|
|
0:14:33
|
or specifically for that individual protocol.
|
|
0:14:37
|
So, we could say for example, Redistribute OSPF 1 Metric 5.
|
|
0:14:41
|
Redistribute EIGRP 100 Metric 3.
|
|
0:14:45
|
So, regardless whether we're specifying them on in the individual protocol,
|
|
0:14:49
|
where globally is a default for the process,
|
|
0:14:52
|
if we do not specify the metric,
|
|
0:14:54
|
the routes will not be populated into the RIP database.
|
|
0:14:58
|
Now, we'll also see, there's a basic verification we can do on the command line
|
|
0:15:03
|
to look at the Show IP RIP Database.
|
|
0:15:05
|
That's gonna tell us locally on the router that is doing the redistribution
|
|
0:15:09
|
whether the process is actually occurring properly.
|
|
0:15:13
|
So, if I redistribute EIGRP into RIP,
|
|
0:15:16
|
look at the Show IP RIP Database, and I do not see the EIGRP routes as redistributed,
|
|
0:15:21
|
then, I know there could be a potential issue with the metric,
|
|
0:15:24
|
or maybe the routes are being filtered for some reason
|
|
0:15:27
|
based on the manual redistribution policy that I'm defining.
|
|
0:15:33
|
Our next IGP we have is EIGRP,
|
|
0:15:36
|
which does differentiate between the internal and the external routes.
|
|
0:15:42
|
By default, EIGRP uses an administrative distance of 90 for the internal routes,
|
|
0:15:47
|
and 170 for the external routes.
|
|
0:15:50
|
Now, the idea behind this...
|
|
0:15:53
|
is that if we have an external EIGRP route and some other IGP learned prefix,
|
|
0:16:00
|
okay, so, for the exact same match, let's say 1.2.3.0/24.
|
|
0:16:05
|
If I'm learning the route through external EIGRP,
|
|
0:16:08
|
this is going to be the least preferred of the IGP paths.
|
|
0:16:13
|
So, if I have external EIGRP versus RIP,
|
|
0:16:16
|
external EIGRP versus OSPF, versus EBGP,
|
|
0:16:19
|
I would always choose the EIGRP route last.
|
|
0:16:24
|
We'll see that this automatic behavior
|
|
0:16:27
|
is gonna help to prevent some route feedback scenarios
|
|
0:16:31
|
where if the administrative distance was not higher for external EIGRP,
|
|
0:16:36
|
the router could accidentally choose the wrong path to the destination
|
|
0:16:40
|
based on the distance of the EIGRP.
|
|
0:16:45
|
But we'll see, since it does use that higher external distance by default,
|
|
0:16:49
|
a lot of the times, it's gonna prevent any redistribution problems we could potentially have
|
|
0:16:53
|
before we actually see any of the issues.
|
|
0:16:59
|
Now, the other important thing to note here about EIGRP
|
|
0:17:02
|
is that it uses the router ID value for loop prevention of external prefixes.
|
|
0:17:09
|
So, if my EIGRP router ID is 1.2.3.4,
|
|
0:17:13
|
when I redistribute OSPF into EIGRP,
|
|
0:17:18
|
those EIGRP external prefixes, they're gonna be tagged with my local router ID 1.2.3.4.
|
|
0:17:25
|
This then means that if the routing update
|
|
0:17:29
|
somehow leaves me and goes out to my peers,
|
|
0:17:31
|
and then comes back in from another EIGRP neighbor,
|
|
0:17:35
|
we're automatically going to discard those advertisements.
|
|
0:17:39
|
So, anytime you'll learn an external EIGRP route
|
|
0:17:42
|
that has your router ID as the originating router,
|
|
0:17:45
|
the process is automatically going to deny this.
|
|
0:17:50
|
Now, this would be the ideal default loop prevention mechanism,
|
|
0:17:54
|
but we could run into design cases where if two EIGRP neighbors are sharing the same router ID,
|
|
0:18:01
|
they would not be install each other's external routes.
|
|
0:18:06
|
So, basically, in that case, it's a configuration error.
|
|
0:18:10
|
Where you would not want EIGRP neighbors to have the same router ID,
|
|
0:18:14
|
because they're gonna use that for the external loop prevention mechanism.
|
|
0:18:21
|
Now, just like RIP,
|
|
0:18:23
|
EIGRP does not have a default seed metric
|
|
0:18:26
|
unless we're going between two separate EIGRP processes.
|
|
0:18:30
|
So, if I have EIGRP AS 1 and EIGRP AS 2 locally on the same router,
|
|
0:18:35
|
when I redistribute between the two of them,
|
|
0:18:37
|
the individual composite values of the route will be exchanged on a prefix-by-prefix basis.
|
|
0:18:45
|
So, the minimum bandwidth along the path,
|
|
0:18:48
|
the cumulative delay,
|
|
0:18:50
|
the worst load over the path, the worst reliability over the path,
|
|
0:18:56
|
and then the lowest MTU,
|
|
0:18:58
|
that would automatically be exchanged between the two processes.
|
|
0:19:03
|
However, anytime we're coming from another routing process like OSPF in the EIGRP,
|
|
0:19:08
|
or RIP in the EIGRP,
|
|
0:19:10
|
we do not to manually specify what the seed metric value is.
|
|
0:19:15
|
Now, just like RIP, we could do this globally under the process
|
|
0:19:19
|
with the default metric command.
|
|
0:19:21
|
Or we could specify it on a per-protocol basis when we're actually doing the redistribution.
|
|
0:19:27
|
So, we could say Redistribute OSPF 1 Metric
|
|
0:19:30
|
followed by the bandwidth, delay load, reliability, and MTU.
|
|
0:19:35
|
So, you don't necessarily need to memorize what is the order
|
|
0:19:39
|
for the redistribution metrics,
|
|
0:19:41
|
because we'll see when we look at the command line, we can simply use the question mark
|
|
0:19:44
|
to figure out what are the individual values that it wants.
|
|
0:19:50
|
Now, we'll also see in cases
|
|
0:19:52
|
where there are only a single point of redistribution,
|
|
0:19:56
|
the seed metric value whether we're going into RIP, or into EIGRP, or into OSPF,
|
|
0:20:02
|
the metric value is not really gonna matter.
|
|
0:20:05
|
Because if I'll have only one physical path...
|
|
0:20:09
|
from the RIP domain into the EIGRP domain,
|
|
0:20:12
|
it really doesn't matter what metric that EIGRP routers see for the RIP domain.
|
|
0:20:18
|
Regardless what that is, they're gonna have to go through
|
|
0:20:21
|
that single physical point that's actually doing the redistribution.
|
|
0:20:26
|
So, in reality, the seed metric value is only gonna matter
|
|
0:20:29
|
when there are multiple points of redistribution.
|
|
0:20:32
|
And we're trying to do some sort of traffic engineering to prefer one path over another,
|
|
0:20:38
|
or we're trying to prevent some sort of route feedback
|
|
0:20:42
|
to make sure that we prefer the correct path with the lower metric
|
|
0:20:46
|
over the incorrect path with the higher metric.
|
|
0:20:52
|
Next, we have OSPF redistribution here,
|
|
0:20:55
|
where although, it does distinguish between internal versus external routes,
|
|
0:21:00
|
all of them are gonna be assigned in an administrative distance of 110.
|
|
0:21:05
|
So, this means that if I am redistributing from RIP into OSPF, or EIGRP into OSPF,
|
|
0:21:10
|
and then I'm looking at some other path
|
|
0:21:14
|
whether it's IBGP learned or external EIGRP learned,
|
|
0:21:18
|
I would prefer the external OSPF route
|
|
0:21:21
|
with a lower distance of 110 versus RIP at 120, or external EIGRP at 170, or IBGP at 200.
|
|
0:21:32
|
We'll also see that under the...
|
|
0:21:35
|
the routing process on the command line,
|
|
0:21:37
|
we can manually specify a different administrative distance
|
|
0:21:40
|
for the external routes versus the internal routes if we wanted to.
|
|
0:21:46
|
So, we can get the same default behavior that we do in EIGRP,
|
|
0:21:50
|
where we could specify under the OSPF routing process
|
|
0:21:53
|
that I would want to prefer the internal OSPF versus the...
|
|
0:21:57
|
external OSPF when I'm comparing this to different protocols.
|
|
0:22:04
|
Now, as we talked about previously in OSPF,
|
|
0:22:08
|
even though the administrative distance is the same for the internal versus the external routes,
|
|
0:22:13
|
by default, based on the RFC of how the OSPF path selection state machine works,
|
|
0:22:19
|
we have to choose the intra-area routes over the inter-area routes
|
|
0:22:26
|
over external Type-1 over external Type-2 over N1 over N2.
|
|
0:22:32
|
So, this would then mean regardless of what the metric value is, or what the administrative distance is,
|
|
0:22:38
|
if I have an E1 versus an N1 route,
|
|
0:22:43
|
so N1 for not-so-stubby.
|
|
0:22:45
|
I would always have to choose the E1 route.
|
|
0:22:49
|
So, we'll see, in OSPF, really, the only time that the metric is gonna matter
|
|
0:22:53
|
for the redistributed routes is when we have multiple longest matches of the same external route type,
|
|
0:23:01
|
then, we would use the metric value to choose one versus the other.
|
|
0:23:06
|
So, if we have two E1 routes, I'm gonna pick whichever one has the lower metric.
|
|
0:23:11
|
If I have two E2 routes,
|
|
0:23:13
|
I'm gonna pick whichever one has the lower metric,
|
|
0:23:16
|
or if there is a tie in the metric,
|
|
0:23:19
|
I would then choose the one that has the shorter path to the ASBR.
|
|
0:23:24
|
So, we'll see, when we actually do the redistribution in the OSPF,
|
|
0:23:28
|
the external 2 and the NSSA external 2, which is N2 in the routing table,
|
|
0:23:33
|
those are gonna distinguish between the metric of the routes plus the forward metric
|
|
0:23:40
|
which is the cost to reach the ASBR.
|
|
0:23:44
|
Whereas the E1 and the N1 routes,
|
|
0:23:47
|
those are gonna take the cost that we're redistributing in.
|
|
0:23:51
|
So, the seed metric value simply add that to our cost of the ASBR,
|
|
0:23:55
|
and that's what's gonna show up in the routing table.
|
|
0:24:00
|
Now, OSPF does have a default seed metric of 20
|
|
0:24:04
|
regardless of what protocol we're coming from.
|
|
0:24:06
|
And we're also gonna use the default metric type of E2 into a normal area,
|
|
0:24:13
|
and N2 into a not-so-stubby area.
|
|
0:24:18
|
We could manually change both the metric and the metric type,
|
|
0:24:22
|
but just by default, we don't necessarily have to specify this,
|
|
0:24:25
|
because it does have the default value of 20 and then the default metric type of 2.
|
|
0:24:31
|
We'll also see that OSPF like EIGRP
|
|
0:24:35
|
is gonna use the router ID value to prevent any looping of the route advertisement.
|
|
0:24:41
|
Now, in OSPF, this isn't really a big of a deal as it is for EIGRP.
|
|
0:24:46
|
Because OSPF is not a distance vector protocol.
|
|
0:24:50
|
We're assuming that all of the routers in the area are agreeing on the topology.
|
|
0:24:55
|
So, they're gonna end up in the same end result for SPF.
|
|
0:25:00
|
Really, what we care about for looping of OSPF
|
|
0:25:04
|
is we wanna make sure that the LSA flooding process doesn't happen infinitely.
|
|
0:25:10
|
So, when I redistribute EIGRP into OSPF, or RIP into OSPF,
|
|
0:25:14
|
I'm gonna tag inside the external LSA,
|
|
0:25:19
|
so the LSA Type-5 for either the E1 or E2 routes,
|
|
0:25:24
|
or the LSA Type-7 for the N1 or N2 routes,
|
|
0:25:28
|
I'm gonna set my own router ID as the originating router.
|
|
0:25:33
|
So, if for some reason I flooded LSA out,
|
|
0:25:36
|
then, it comes back in from another neighbor,
|
|
0:25:38
|
I know to discard that LSA and not continue to advertise it on.
|
|
0:25:45
|
So, OSPF, it does not use a split horizon like behavior
|
|
0:25:49
|
similar to RIP or EIGRP, its gonna use the router ID in the LSA
|
|
0:25:55
|
to figure out if I was the person who actually originated the prefix.
|
|
0:26:00
|
Then, our last protocol here is BGP
|
|
0:26:03
|
that does distinguish between the external and the internal routes two different ways.
|
|
0:26:11
|
First is gonna be based on the origin code
|
|
0:26:14
|
that is set to incomplete or a question mark when we look at the Show IP BGP Output
|
|
0:26:20
|
as one of the attributes of the prefix.
|
|
0:26:24
|
So, when we look at the BGP best path selection order,
|
|
0:26:27
|
we would prefer the routes that are internal to the network.
|
|
0:26:32
|
So, that actually came from the network statement on to the BGP process
|
|
0:26:35
|
versus the ones that are redistributed.
|
|
0:26:38
|
So, we see the origin code for the internal routes as a lower case "i"
|
|
0:26:43
|
versus the question mark for incomplete.
|
|
0:26:46
|
So, if we have two routes that have every other attribute being equal,
|
|
0:26:51
|
the weight, the local preference, the AS path, the med value,
|
|
0:26:54
|
then, we're gonna look at the origin code,
|
|
0:26:56
|
and prefer the one that has the lower origin code,
|
|
0:27:00
|
where IGP is preferred over incomplete.
|
|
0:27:06
|
Now, for the loop prevention of the external routes,
|
|
0:27:10
|
we're gonna use the same underlying advertisement rules that we do for normal EBGP and normal IBGP,
|
|
0:27:16
|
where EBGP, we use the AS path information
|
|
0:27:20
|
that if my AS is 100,
|
|
0:27:22
|
and I received a route in that has 100 in the path,
|
|
0:27:25
|
then, I'm simply going to discard that update.
|
|
0:27:28
|
Whereas with IBGP routes,
|
|
0:27:31
|
anytime I learn a prefix from an IBGP neighbor,
|
|
0:27:34
|
I'm simply not going to advertise it to other IBGP neighbors unless I am a route reflector.
|
|
0:27:43
|
So, we can assume that if the normal BGP advertisements are loop-free to begin with,
|
|
0:27:47
|
then, we don't really need to distinguish between the internal loop prevention versus the external loop prevention.
|
|
0:27:55
|
Now, we'll also see that there are some differences
|
|
0:27:58
|
when we're redistributing from IGP into BGP
|
|
0:28:02
|
versus redistributing BGP into IGP.
|
|
0:28:07
|
Now, the first one, IGP to BGP, this would be one of the normal ways
|
|
0:28:13
|
that we advertise our internal prefixes out to the global BGP network.
|
|
0:28:19
|
So, if I have a bunch of OSPF learned routes that I wanna advertise into BGP,
|
|
0:28:23
|
I could either use the network statement under the process,
|
|
0:28:26
|
or I could just redistribute OSPF into BGP.
|
|
0:28:31
|
The only exception for this
|
|
0:28:33
|
is that by default, the BGP process is going to deny the external OSPF routes.
|
|
0:28:42
|
So, the logic behind this is that if the route is external OSPF,
|
|
0:28:47
|
it means that it came from some other protocol that was not OSPF to begin with.
|
|
0:28:52
|
So, by filtering those out by default,
|
|
0:28:55
|
we would prevent the case that we redistribute from BGP to OSPF,
|
|
0:28:59
|
from OSPF back into BGP,
|
|
0:29:02
|
and then, we cause a routing loop in the advertisement.
|
|
0:29:06
|
Now, in topologies that we can guarantee that a loop will not occur,
|
|
0:29:11
|
we can manually tell the process to include the external routes
|
|
0:29:15
|
if we say Match Internal External at the end of the redistribute OSPF statement.
|
|
0:29:23
|
So, the key point being here is that this only applies to OSPF.
|
|
0:29:27
|
If we were to redistribute EIGRP into BGP,
|
|
0:29:30
|
it's gonna allow both the internal routes and the external routes to go.
|
|
0:29:36
|
Now, on the other way back, as we're going from BGP to IGP,
|
|
0:29:41
|
in order to prevent loops inside of our own internal BGP network,
|
|
0:29:46
|
we're only going to allow external routes to go from BGP to OSPF, or from BGP to EIGRP.
|
|
0:29:55
|
So, the internal BGP routes, those are going to be denied by default.
|
|
0:29:58
|
We can override this with the BGP redistribute internal command.
|
|
0:30:04
|
But the vast majority of the time, you would not wanna do this.
|
|
0:30:08
|
So, it's very easy to cost a traffic loop inside of the IGP domain,
|
|
0:30:13
|
because of the administrative distance of IBGP versus IGP.
|
|
0:30:21
|
So, if we look back at our administrative distance table,
|
|
0:30:24
|
note that external BGP...
|
|
0:30:26
|
is the most preferred of the dynamic protocols.
|
|
0:30:31
|
Now, technically, we have the EIGRP summary with the distance of 5,
|
|
0:30:35
|
but that would be a locally generated summary.
|
|
0:30:38
|
So, most of the time, we're not gonna have other matches that are equal to the EIGRP summary.
|
|
0:30:44
|
So, for actual dynamically learned information, EBGP is gonna be the lowest.
|
|
0:30:49
|
Then, on the other end of the spectrum,
|
|
0:30:51
|
the least preferred dynamic protocol is internal BGP.
|
|
0:30:57
|
So, this then means, if I have an IBGP route that has a distance of 200,
|
|
0:31:03
|
and I redistribute it into IGP.
|
|
0:31:06
|
So, it doesn't matter what protocol, BGP to OSPF, BGP to RIP, BGP to EIGRP or IS-IS.
|
|
0:31:14
|
Once I do that internal BGP to IGP redistribution,
|
|
0:31:20
|
I would always prefer the IGP route over the internal BGP route.
|
|
0:31:28
|
So, it's basically gonna invalidate where the BGP information came from.
|
|
0:31:33
|
So, the potential case that we could run into where this would be a problem
|
|
0:31:38
|
is let's say that between router 4,
|
|
0:31:42
|
and the backbone router we're running BGP here.
|
|
0:31:46
|
Let's say router 4 is AS 1, and BB3 is AS 2.
|
|
0:31:52
|
Okay, we have...
|
|
0:31:54
|
EBGP learned routes coming in here.
|
|
0:31:57
|
And then, router 4 is advertising them let's say to router 1.
|
|
0:32:03
|
Okay, router 1's also in AS 1.
|
|
0:32:05
|
So this is an IBGP peering.
|
|
0:32:09
|
Now, we would assume that internal to our network, if router 1 and router 4 are both in AS 1,
|
|
0:32:17
|
they're most likely sharing an IGP.
|
|
0:32:19
|
So, maybe they're running OSPF on this link, or they're running EIGRP,
|
|
0:32:25
|
or they're running IS-IS.
|
|
0:32:29
|
If on router 1, we were to redistribute from BGP back into IGP,
|
|
0:32:36
|
and we were to allow the IBGP learned routes to be redistributed,
|
|
0:32:41
|
router 4 would then be learning the IBGP,
|
|
0:32:45
|
actually not the IBGP, it's learning the EBGP route with the distance of 20.
|
|
0:32:51
|
Then the IBGP route where IS-IS would be 115,
|
|
0:32:55
|
EIGRP would be 170, OSPF is gonna be 110.
|
|
0:33:00
|
Okay, so this is not necessarily a problem.
|
|
0:33:02
|
Where the issue comes in
|
|
0:33:05
|
is that when there's someone else in the transit path,
|
|
0:33:09
|
let's say between router 4 and router 1,
|
|
0:33:15
|
where we have...
|
|
0:33:26
|
we have AS 2 on BB3.
|
|
0:33:28
|
And then let's say our whole entire network here AS 1.
|
|
0:33:33
|
So, router 4 is peering with BB3, we're learning EBGP routes here.
|
|
0:33:39
|
Router 1 sends this route to...
|
|
0:33:42
|
Or router 4 send this route to router 1.
|
|
0:33:44
|
Let's say router 1 is a route reflector,
|
|
0:33:46
|
and then it sends it down to other peers. Let's say to router 3.
|
|
0:33:51
|
So, from router 3's perspective, we're learning this through IBGP.
|
|
0:33:57
|
From router 1's perspective, it is learning this from IBGP.
|
|
0:34:01
|
Now, let's say we're doing the redistribution from IBGP to IGP on router 3.
|
|
0:34:09
|
So, 3 takes the BGP learned route,
|
|
0:34:12
|
and it send it in to OSPF.
|
|
0:34:16
|
If somehow router 1 learns this prefix back through IGP,
|
|
0:34:22
|
it's now gonna have a distance through OSPF or 110,
|
|
0:34:28
|
and the IBGP distance of 200,
|
|
0:34:31
|
which means we would prefer the IGP route,
|
|
0:34:35
|
and then eventually route the traffic in the wrong direction.
|
|
0:34:40
|
So, we'll see, this is one of the common design problems that we're gonna look at today when we're doing redistribution.
|
|
0:34:46
|
If the router is choosing the wrong path based on the distance,
|
|
0:34:51
|
then, we could potentially end up in route feedback
|
|
0:34:55
|
where the route is being installed in the routing table,
|
|
0:34:58
|
and then delete it from the routing table over and over and over,
|
|
0:35:01
|
or we could end up in a loop in the data plane
|
|
0:35:05
|
where the route is installed in the table and is stable.
|
|
0:35:09
|
So the route is not flapping in and out or flapping in between protocols,
|
|
0:35:13
|
but it's simply installed via the wrong information.
|
|
0:35:17
|
So, we'll see, the difference between those
|
|
0:35:20
|
is the one that is flapping between the protocols,
|
|
0:35:24
|
a lot of the times, that's real easy to see if we look at stuff like Debug IP Routing,
|
|
0:35:28
|
or we look at the IP Route Profile.
|
|
0:35:31
|
But the prefix that is installed based on the wrong metric value,
|
|
0:35:35
|
or simply the wrong path is installed, but it's stable,
|
|
0:35:41
|
we would see, that would end up in traffic being routed in the wrong direction.
|