Route Redistribution
Although application a distinct acquisition agreement throughout an action ability be preferred, many
enterprises use assorted acquisition protocols due to business mergers and acquisitions, organizational
history, or in some cases for abstruse reasons. Avenue redistribution allows one or added routers to
take routes abstruse via one acquisition agreement and acquaint those routes via addition acquisition protocol
so that all genitalia of the internetwork can be reached.
To accomplish redistribution, one or added routers run both acquisition protocols, with anniversary routing
protocol agreement routes into that router’s acquisition table. Then, anniversary acquisition agreement can booty all or
some of the added acquisition protocol’s routes from the acquisition table and acquaint those routes. This
section begins by attractive at the mechanics of how to accomplish simple redistribution on a single
router, and ends with altercation of accoutrement and issues that amount best back redistributing on
multiple routers.
Mechanics of the redistribute Command
The redistribute router subcommand tells one acquisition agreement to booty routes from another
routing protocol. This command can artlessly redistribute all routes or, by application analogous logic,
redistribute alone a subset of the routes. The redistribute command additionally supports accomplishments for
setting some ambit about the redistributed routes—for example, the metric.
The abounding syntax of the redistribute command is as follows:
redistribute agreement [process-id] [level-1 | level-1-2 | level-2] [as-number] [metric
metric-value] [metric-type type-value] [match {internal | alien 1 | alien 2}] [tag
tag-value] [route-map map-tag] [subnets]
The redistribute command identifies the acquisition antecedent from which routes are taken, and the
router command identifies the acquisition action into which the routes are advertised. For example,
the command redistribute eigrp 1 tells the router to booty routes from EIGRP action 1; if that
command were beneath router rip, the routes would be redistributed into RIP, enabling added RIP
routers in the arrangement to see some or all routes advancing from EIGRP AS 1.
Route Redistribution 309
The redistribute command has a lot of added ambit as well, best of which will be described
in accessible examples. The aboriginal few examples use the arrangement apparent in Figure 10-2. In this
network, anniversary IGP uses a altered chic A arrangement aloof to accomplish the after-effects of redistribution more
obvious. Additionally agenda that the adding assemblage is such that anniversary of R1’s affiliated WAN
subnets has 1 as the third octet, and anniversary LAN subnet off R3, R4, and R5 has 2 as the third octet.
Figure 10-2 Sample Arrangement for Absence Avenue Examples
Redistribution Application Absence Settings
The aboriginal archetype agreement meets the afterward architecture goals:
■ R1 redistributes amid anniversary brace of IGPs—RIP, EIGRP, and OSPF.
■ Absence metrics are acclimated whenever possible; back required, the metrics are configured on the
redistribute command.
■ Redistribution into OSPF uses the non-default subnets parameter, which causes subnets to be
advertised into OSPF.
■ All added settings use absence values.
Example 10-1 shows R1’s agreement for anniversary acquisition protocol, forth with appearance commands
from all four routers to highlight the after-effects of the redistribution.
Example 10-1 Avenue Redistribution with Minimal Options
! EIGRP redistributes from OSPF (process ID 1) and RIP. EIGRP must
! set the metric, as it has no absence values. It additionally uses the
! no auto-summary command so that subnets will be redistributed into
! EIGRP.
continues
R1
R3 R5
13.1.2.3/24
Fa0/0 13.1.1.0/24 15.1.1.0/24
15.1.2.5/24
Fa0/0
RID
1.1.1.1
RID 5.5.5.5
.3
0/0/0.1
.5
.1 .1 0/0.1
.1
R4
14.1.2.4/24 14.1.1.0/24
Fa0/0 .4
0/0/0.1
RIP
Network 13.0.0.0
OSPF 1 (Two Areas, with R5 as ABR)
Network 15.0.0.0
EIGRP 1
Network 14.0.0.0
310 Chapter 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing
router eigrp 1
redistribute ospf 1 metric 1544 5 255 1 1500
redistribute rip metric 1544 5 255 1 1500
network 14.0.0.0
no auto-summary
! OSPF redistributes from EIGRP (ASN 1) and RIP. OSPF defaults the
! metric to 20 for redistributed IGP routes. It charge additionally use the
! subnets advantage in adjustment to redistribute subnets.
router ospf 1
router-id 1.1.1.1
redistribute eigrp 1 subnets
redistribute rip subnets
network 15.0.0.0 0.255.255.255 breadth 0
! RIP redistributes from OSPF (process ID 1) and EIGRP (ASN 1). RIP
! charge set the metric, as it has no absence values. It additionally uses the
! no auto-summary command so that subnets will be redistributed into
! EIGRP.
router rip
version 2
redistribute eigrp 1 metric 2
redistribute ospf 1 metric 3
network 13.0.0.0
no auto-summary
! R1 has a affiliated avenue (x.x.1.0) in networks 13, 14, and 15, as able-bodied as
! an IGP-learned avenue (x.x.2.0).
R1# appearance ip route
! curve bare for brevity
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is anon connected, FastEthernet0/0
13.0.0.0/24 is subnetted, 2 subnets
C 13.1.1.0 is anon connected, Serial0/0/0.3
R 13.1.2.0 [120/1] via 13.1.1.3, 00:00:07, Serial0/0/0.3
14.0.0.0/24 is subnetted, 2 subnets
D 14.1.2.0 [90/2172416] via 14.1.1.4, 00:58:20, Serial0/0/0.4
C 14.1.1.0 is anon connected, Serial0/0/0.4
15.0.0.0/24 is subnetted, 2 subnets
O IA 15.1.2.0 [110/65] via 15.1.1.5, 00:04:25, Serial0/0/0.5
C 15.1.1.0 is anon connected, Serial0/0/0.5
! R3 abstruse two routes anniversary from nets 14 and 15.
! Compare the metrics set on R1’s RIP redistribute command to the metrics below.
R3# appearance ip avenue rip
14.0.0.0/24 is subnetted, 2 subnets
R 14.1.2.0 [120/2] via 13.1.1.1, 00:00:19, Serial0/0/0.1
R 14.1.1.0 [120/2] via 13.1.1.1, 00:00:19, Serial0/0/0.1
15.0.0.0/24 is subnetted, 2 subnets
R 15.1.2.0 [120/3] via 13.1.1.1, 00:00:19, Serial0/0/0.1
R 15.1.1.0 [120/3] via 13.1.1.1, 00:00:19, Serial0/0/0.1
Example 10-1 Avenue Redistribution with Minimal Options (Continued)
Route Redistribution 311
Metrics charge be set via agreement back redistributing into RIP and EIGRP, admitting OSPF
uses absence values. In the example, the two redistribute commands beneath router rip acclimated hop
counts of 2 and 3 aloof so the metrics could be calmly apparent in the appearance ip avenue command output
on R3. The EIGRP metric in the redistribute command charge accommodate all bristles metric components,
even if the aftermost three are abandoned by EIGRP’s metric adding (as they are by default). The
command redistribute rip metric 1544 5 255 1 1500 lists EIGRP metric apparatus of bandwidth,
delay, reliability, load, and MTU, in order. OSPF defaults to amount 20 back redistributing from an
IGP, and 1 back redistributing from BGP.
The redistribute command redistributes alone routes in that router’s accepted IP acquisition table. When
redistributing from a accustomed acquisition protocol, the redistribute command takes routes listed in the
IP acquisition table as actuality abstruse from that acquisition protocol. Interestingly, the redistribute
command can additionally aces up affiliated routes. For example, R1 has an OSPF avenue to 15.1.2.0/24,
and a affiliated avenue to 15.1.1.0/24. However, R3 (RIP) and R4 (EIGRP) redistribute both of
these routes—the OSPF-learned avenue and one affiliated route—as a aftereffect of their respective
! R4 abstruse two routes anniversary from nets 13 and 15.
! EIGRP injected the routes as alien (EX), which are advised AD 170.
R4# appearance ip avenue eigrp
13.0.0.0/24 is subnetted, 2 subnets
D EX 13.1.1.0 [170/2171136] via 14.1.1.1, 00:09:57, Serial0/0/0.1
D EX 13.1.2.0 [170/2171136] via 14.1.1.1, 00:09:57, Serial0/0/0.1
15.0.0.0/24 is subnetted, 2 subnets
D EX 15.1.2.0 [170/2171136] via 14.1.1.1, 01:00:27, Serial0/0/0.1
D EX 15.1.1.0 [170/2171136] via 14.1.1.1, 01:00:27, Serial0/0/0.1
! R5 abstruse two routes anniversary from nets 13 and 14.
! OSPF by absence injected the routes as alien blazon 2, amount 20.
R5# appearance ip avenue ospf
13.0.0.0/24 is subnetted, 2 subnets
O E2 13.1.1.0 [110/20] via 15.1.1.1, 00:36:12, Serial0/0.1
O E2 13.1.2.0 [110/20] via 15.1.1.1, 00:36:12, Serial0/0.1
14.0.0.0/24 is subnetted, 2 subnets
O E2 14.1.2.0 [110/20] via 15.1.1.1, 00:29:56, Serial0/0.1
O E2 14.1.1.0 [110/20] via 15.1.1.1, 00:36:12, Serial0/0.1
! As a courage router, OSPF on R1 created blazon 5 LSAs for the four E2 subnets.
! If R1 had been central an NSSA butt area, it would accept created blazon 7 LSAs.
R5# appearance ip ospf abstracts | activate Type-5
Type-5 AS Alien Link States
Link ID ADV Router Age Seq# Checksum Tag
13.1.1.0 1.1.1.1 1444 0x80000002 0x000785 0
13.1.2.0 1.1.1.1 1444 0x80000002 0x00FB8F 0
14.1.1.0 1.1.1.1 1444 0x80000002 0x00F991 0
14.1.2.0 1.1.1.1 1444 0x80000002 0x00EE9B 0
Example 10-1 Avenue Redistribution with Minimal Options (Continued)
312 Chapter 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing
redistribute ospf commands. As it turns out, the redistribute command causes the router to use
the afterward argumentation to accept which routes to redistribute from a accurate IGP protocol:
1. Booty all routes in my acquisition table that were abstruse by the acquisition agreement from which routes
are actuality redistributed.
2. Booty all affiliated subnets akin by that acquisition protocol’s arrangement commands.
Example 10-1 shows several instances of absolutely how this two-part argumentation works. For instance, R3
(RIP) learns about affiliated subnet 14.1.1.0/24, because RIP redistributes from EIGRP, and R1’s
EIGRP arrangement 14.0.0.0 command matches that subnet.
The redistribute command includes a subnets option, but alone OSPF needs to use it. By default,
when redistributing into OSPF, OSPF redistributes alone routes for classful networks, ignoring
subnets. By including the subnets option, OSPF redistributes subnets as well. The added IGPs
redistribute subnets automatically; however, if at a arrangement boundary, the RIP or EIGRP autosummary
setting would still account summarization to use the classful network. In Archetype 10-1,
if either RIP or EIGRP had acclimated auto-summary, anniversary redistributed arrangement would appearance aloof the
classful networks. For example, if RIP had configured auto-summary in Archetype 10-1, R3 would
have a avenue to networks 14.0.0.0/8 and 15.0.0.0/8, but no routes to subnets central those chic A
networks.
Setting Metrics, Metric Types, and Tags
Cisco IOS provides three mechanisms for ambience the metrics of redistributed routes, as follows:
1. Call a avenue map from the redistribute command, with the avenue map application the set metric
command. This adjustment allows altered metrics for altered routes.
2. Use the metric advantage on the redistribute command. This sets the aforementioned metric for all routes
redistributed by that redistribute command.
3. Use the default-metric command beneath the router command. This command sets the metric
for all redistributed routes whose metric was not set by either of the added two methods.
The account implies the adjustment of antecedence if added than one adjustment defines a metric. For instance, if
a route’s metric is set by all three methods, the avenue map’s metric is used. If the metric is set on
the redistribute command and there is a default-metric command as well, the ambience on the
redistribute command takes precedence.
The redistribute command additionally allows a ambience for the metric-type option, which absolutely refers to
the avenue type. For example, routes redistributed into OSPF charge be OSPF alien routes, but they
can be either alien blazon 1 (E1) or blazon 2 (E2) routes. Table 10-7 summarizes the defaults for
metrics and metric types.
Default Metrics and Avenue Metric Types in IGP Avenue Redistribution
IGP into Which Routes Are
Redistributed
Default
Metric Absence (and Possible) Metric Types
RIP None RIP has no abstraction of alien routes
EIGRP None External
OSPF 20/1* E2 (E1 or E2)
IS-IS 0 L1 (L1, L2, L1/L2, or external)
* OSPF uses amount 20 back redistributing from an IGP, and amount 1 back redistributing from BGP.