Mutual Redistribution at Assorted Routers

Mutual Redistribution at Assorted Routers

When assorted routers redistribute amid the aforementioned two acquisition agreement domains, several potential

problems can occur. One blazon of botheration occurs on the redistributing routers, because those

routers will apprentice a avenue to best subnets via both acquisition protocols. That router uses the AD to

determine the best avenue aback comparing the best routes from anniversary of the two acquisition protocols;

this about after-effects in some routes application suboptimal paths. For example, Amount 10-4 shows a

sample network, with R3 allotment its AD 110 OSPF avenue to 10.1.2.0/24 over the apparently better

AD 120 RIP route.

Figure 10-4 OSPF and RIP Redistribution

NOTE Avenue maps accept an adumbrated abjure article at the end of the avenue map. This implied

deny article matches all packets. As a result, any routes not akin in the absolutely configured

route-map clauses bout the adumbrated abjure clause, and are filtered. Both avenue maps in the

example acclimated the adumbrated abjure article to absolutely clarify the routes.

NOTE The OSPF agreement for this arrangement matches alone the interfaces adumbrated by the

OSPF box in Amount 10-4. RIP does not accept a wildcard-mask advantage on the arrangement command,

so R1’s and R3’s arrangement commands will bout all of their interfaces, as all are in network

10.0.0.0.

R2

R3

R1 R5

10.1.2.0/24

10.1.3.0/24

10.1.1.0/24

10.1.4.0/24

10.1.5.0/24

10.1.23.0/24

10.1.12.0/24

10.1.34.0/24

10.1.15.0/24

10.1.45.0/24

Fa0/0

S0/0/0.2

RID

4.4.4.4

S0/0/0.3

Possible routes to 10.1.2.0/24:

RIP 1 hop through R2, AD 120

OSPF amount 244 through R4, AD 110

S0/0/0.5

RIP – AD 120

OSPF Breadth 0 – AD 110

318 Chapter 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing

In Amount 10-4, R3 learns of subnet 10.1.2.0/24 via RIP updates from R2. Also, R1 learns of the

subnet with RIP and redistributes the avenue into OSPF, and afresh R3 learns of a avenue to 10.1.2.0/24

via OSPF. R3 chooses the avenue with the lower authoritative distance; with all absence settings,

OSPF’s AD of 110 is bigger that RIP’s 120.

If both R1 and R3 mutually redistribute amid RIP and OSPF, the suboptimal avenue problem

would action on either R1 or R3 for anniversary RIP subnet, all depending on timing. Archetype 10-3 shows

the redistribution configuration, forth with R3 accepting the suboptimal avenue apparent in Amount 10-4.

However, afterwards R1’s fa0/0 interface flaps, R1 now has a suboptimal avenue to 10.1.2.0/24, but R3

has an optimal route.

Example 10-3 Suboptimal Acquisition at Altered Redistribution Points

! R1’s accompanying agreement follows:

router ospf 1

router-id 1.1.1.1

redistribute rip subnets

network 10.1.15.1 0.0.0.0 breadth 0

!

router rip

redistribute ospf 1

network 10.0.0.0

default-metric 1

! R3’s accompanying agreement follows:

router ospf 1

router-id 3.3.3.3

redistribute rip subnets

network 10.1.34.3 0.0.0.0 breadth 0

!

router rip

redistribute ospf 1

network 10.0.0.0

default-metric 1

! R3 begins with an AD 120 OSPF route, and not a RIP route, to 10.1.2.0/24.

R3# sh ip avenue | incl 10.1.2.0

O E2 10.1.2.0 [110/20] via 10.1.34.4, 00:02:01, Serial0/0/0.4

! R1 has a RIP avenue to 10.1.2.0/24, and redistributes it into OSPF, causing R3

! to apprentice an OSPF avenue to 10.1.2.0/24.

R1# sh ip avenue | incl 10.1.2.0

R 10.1.2.0 [120/1] via 10.1.12.2, 00:00:08, FastEthernet0/0

! Next, R1 loses its RIP avenue to 10.1.2.0/24, causing R3 to lose its OSPF route.

R1# conf t

Enter agreement commands, one per line. End with CNTL/Z.

R1(config)# int fa 0/0

R1(config-if)# shut

! R3 loses its OSPF route, but can afresh admit the RIP avenue into its table.

Route Redistribution 319

The key abstraction abaft this acutely odd archetype is that a redistributing router processes only

the accepted capacity of its IP acquisition table. Aback this arrangement aboriginal came up, R1 abstruse its RIP

route to 10.1.2.0/24, and redistributed into OSPF, afore R3 could do the same. So, R3 was faced

with the best of putting the AD 110 (OSPF) or AD 120 (RIP) avenue into its acquisition table, and R3

chose the lower AD OSPF route. Because R3 never had the RIP avenue to 10.1.2.0/24 in its routing

table, R3 could not redistribute that RIP avenue into OSPF.

Later, aback R1’s fa0/0 bootless (as apparent in Archetype 10-3), R3 had time to abolish the OSPF route

and add the RIP avenue for 10.1.2.0/24 to its acquisition table—which afresh accustomed R3 to redistribute

that RIP avenue into OSPF, causing R1 to accept the suboptimal route.

To break this blazon of problem, the redistributing routers charge accept some acquaintance of which routes

came from the added acquisition domain. In particular, the lower-AD acquisition agreement needs to decide

which routes came from the higher-AD acquisition protocol, and either use a altered AD for those

routes or clarify the routes. The abutting few sections appearance a few altered methods of preventing this

type of problem.

Preventing Suboptimal Routes by Ambience the Authoritative Distance

One simple and affected band-aid to the botheration of suboptimal routes on redistributing routers is

to banderole the redistributed routes with a college AD. A route’s AD is not advertised by the routing

protocol; however, a distinct router can be configured such that it assigns altered AD ethics to

different routes, which afresh impacts that one router’s best of which routes end up in that router’s

routing table. For example, aback in Amount 10-4 and Archetype 10-3, R3 could accept assigned the

OSPF-learned avenue to 10.1.2.0/24 an AD college than 120, thereby preventing the original

problem.

Figure 10-5 shows a added complete example, with a avenue from the RIP breadth (10.1.2.0/24) and

another from the OSPF breadth (10.1.4.0/24). Redistributing router R3 will apprentice the two routes

both from RIP and OSPF. By configuring R3’s argumentation to amusement OSPF centralized routes with default

AD 110, and OSPF alien routes with AD 180 (or any added amount beyond than RIP’s absence of

120), R3 will accept the optimal aisle for both RIP and OSPF routes.

R3# sh ip avenue | incl 10.1.2.0

R 10.1.2.0 [120/1] via 10.1.23.2, 00:00:12, Serial0/0/0.2

! Not shown: R1 brings up its fa0/0 again

! However, R1 now has the suboptimal avenue to 10.1.2.0/24, through OSPF.

R1# sh ip avenue | incl 10.1.2.0

O E2 10.1.2.0 [110/20] via 10.1.15.5, 00:00:09, Serial0/0/0.5

Example 10-3 Suboptimal Acquisition at Altered Redistribution Points (Continued)

320 Chapter 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing

Figure 10-5 The Aftereffect of Differing ADs for Centralized and Alien Routes

Example 10-4 shows how to configure both R1 and R3 to use a altered AD for alien routes

by application the ambit ospf alien 180 command, beneath the router ospf process.

Example 10-4 Preventing Suboptimal Routes with the ambit Router Subcommand

! Both R1’s and R3’s configurations attending like they do in Archetype 10-3’s, but with the

! accession of the ambit command.

router ospf 1

distance ospf alien 180

! R3 has a added optimal RIP avenue to 10.1.2.0/24, as does R1.

R3# sh ip avenue | incl 10.1.2.0

R 10.1.2.0 [120/1] via 10.1.23.2, 00:00:19, Serial0/0/0.2

! R1 next…

R1# appearance ip avenue | incl 10.1.2.0_

R 10.1.2.0 [120/1] via 10.1.12.2, 00:00:11, FastEthernet0/0

! R1 loses its next-hop interface for the RIP route, so now its OSPF route, with

! AD 180, is its alone and best avenue to 10.1.2.0/24.

R1# conf t

Enter agreement commands, one per line. End with CNTL/Z.

R1(config)# int fa 0/0

R1(config-if)# shut

R1(config-if)# do sh ip avenue | incl 10.1.2.0

O E2 10.1.2.0 [180/20] via 10.1.15.5, 00:00:05, Serial0/0/0.5

R2 R4

R3

R1

10.1.2.0/24 10.1.4.0/24

10.1.4.0/24

RIP

RIP – AD 120

OSPF:

Internal AD 110

External AD 180

10.1.2.0/24

RIP

10.1.2.0/24

RIP

10.1.2.0/24

OSPF E2

10.1.2.0/24

OSPF E2

10.1.4.0/24

OSPF Int.

10.1.4.0/24

RIP

10.1.4.0/24

OSPF Int.

Routing Info for 10.1.2.0/24 Acquisition Info for 10.1.4.0/24

• For 10.1.2.0/24: Aces AD 120 RIP

route over AD 180 OSPF route

• For 10.1.4.0/24: Aces AD 110

OSPF avenue over AD 120 RIP

route

Route Redistribution 321

EIGRP supports the exact aforementioned abstraction by default, application AD 170 for alien routes and 90 for

internal routes. In fact, if EIGRP were acclimated instead of OSPF in this example, neither R1 nor R3

would accept accomplished any of the suboptimal routing. You can displace EIGRP’s ambit for internal

and alien routes by application the ambit eigrp router subcommand. (At presstime, neither the

IS-IS nor RIP ambit commands abutment ambience alien avenue ADs and centralized avenue ADs to

different values.)

In some cases, the requirements may not acquiesce for ambience all alien routes’ ADs to addition value.

For instance, if R4 injected some accepted alien routes into OSPF, the agreement in

Example 10-4 would aftereffect in either R1 or R3 accepting a suboptimal avenue to those alien routes

that acicular through the RIP domain. In those cases, the ambit router subcommand can be used

in a altered way, influencing some or all of the routes that appear from a accurate router. The

syntax is as follows:

distance {distance-value ip-address {wildcard-mask} [ip-standard-list] [ip-extendedlist]

This command sets three key pieces of information: the AD to be set, the IP abode of the router

advertising the routes, and, optionally, an ACL with which to bout routes. With RIP, EIGRP, and

IS-IS, this command identifies a adjoining router’s interface abode application the ip-address

wildcard-mask parameters. With OSPF, those aforementioned ambit analyze the RID of the router

owning (creating) the LSA for the route. The another ACL afresh identifies the subset of routes for

which the AD will be set. The argumentation boils bottomward to article like this:

Set this AD amount for all routes, abstruse from a router that is authentic by the IP address

and wildcard mask, and for which the ACL permits the route.

Example 10-5 shows how the command could be acclimated to break the aforementioned suboptimal avenue problem

on R1 and R3, while not causing suboptimal acquisition for added alien routes. The architecture goals

are abbreviated as follows:

■ Set a router’s bounded AD for its OSPF routes for subnets in the RIP breadth to a amount of 179,

thereby authoritative the RIP routes to those subnets bigger than the OSPF routes to those same

subnets.

■ Do not set the AD for any added routes.

Example 10-5 Application the ambit Command to Displace Accurate Routes’ ADs

! R1 config. Agenda that the command refers to 3.3.3.3, which is R3’s RID. Other

! commands not accompanying to resetting the AD are omitted. Of accurate importance,

! the ambit command on R1 refers to R3’s OSPF RID, because R3 created the OSPF

! LSAs that we are aggravating to match—the LSAs created aback R3 injected the

! routes redistributed from RIP.

router ospf 1

distance 179 3.3.3.3 0.0.0.0 only-rip-routes

continues

322 Chapter 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing

Preventing Suboptimal Routes by Application Avenue Tags

Another adjustment of preventing suboptimal acquisition on the redistributing routers is to artlessly clarify the

problematic routes. Application subnet 10.1.2.0/24 as an archetype again, R3 could use an incoming

distribute-list command to clarify the OSPF avenue to 10.1.2.0/24, acceptance R3 to use its RIP avenue to

10.1.2.0/24. R1 would charge to accomplish agnate avenue clarification as able-bodied to anticipate its suboptimal route.

Performing simple avenue clarification based on IP subnet cardinal works, but the redistributing routers

will charge to be reconfigured every time subnets change in the higher-AD acquisition domain. The

administrative accomplishment can be bigger by abacus avenue tagging to the process. By tagging all routes

taken from the higher-AD breadth and advertised into the lower-AD domain, the distribute-list

command can accomplish a simple analysis for that tag. Amount 10-6 shows the use of this abstraction for subnet

10.1.2.0/24.

Route tags are artlessly unitless accumulation ethics in the abstracts anatomy of a route. These tags, typically

either 16 or 32 $.25 continued depending on the acquisition protocol, acquiesce a router to betoken something

about a avenue that was redistributed from addition acquisition protocol. For instance, R1 can tag its

OSPF-advertised avenue to 10.1.2.0/24 with a tag—say, 9999. OSPF does not ascertain what a tag of

9999 means, but the OSPF agreement includes the tag acreage in the LSA so that it can be acclimated for

administrative purposes. Later, R3 can clarify routes based on their tag, analytic the suboptimal route

problem.

Figure 10-6 and Archetype 10-6 characterize an archetype of avenue tagging and avenue filtering, acclimated to solve

the aforementioned old botheration with suboptimal routes. R1 and R3 tag all redistributed RIP routes with tag

9999 as they access the OSPF domain, and afresh R1 and R3 clarify admission OSPF routes based on

the tags. This architecture works able-bodied because R1 can tag all redistributed RIP routes, thereby removing

the charge to change the agreement every time a new subnet is added to the RIP domain. (Note

that both R1 and R3 will tag routes injected from RIP into OSPF as 9999, and both will afresh filter

OSPF-learned routes with tag 9999. Amount 10-6 aloof shows one administration to accumulate the amount less

cluttered.)

!

ip access-list accepted only-rip-routes

permit 10.1.12.0

permit 10.1.3.0

permit 10.1.2.0

permit 10.1.23.0

! R3 config. Agenda that the command refers to 1.1.1.1, which is R1’s RID. Other

! commands not accompanying to resetting the AD are omitted. Also, the only-rip-routes

! ACL is identical to R1’s only-rip-routes ACL.

router ospf 1

distance 179 1.1.1.1 0.0.0.0 only-rip-routes

Example 10-5 Application the ambit Command to Displace Accurate Routes’ ADs (Continued)

Route Redistribution 323

Figure 10-6 Clarification with Reliance on Avenue Tags

Example 10-6 Application Avenue Tags and Distribute Lists to Anticipate Suboptimal Routes at Redistributing

Routers

! R1 config. The redistribute command calls the avenue map that tags routes taken

! from RIP as 9999. distribute-list looks at routes abstruse in OSPF that were

! beforehand tagged by R3.

router ospf 1

redistribute rip subnets route-map tag-rip-9999

network 10.1.15.1 0.0.0.0 breadth 0

distribute-list route-map check-tag-9999 in

! Article 10, a abjure clause, matches all tagged 9999 routes—so those

! routes are filtered. Article 20 permits all added routes, because with no match

! subcommand, the article is advised to “match all.”

route-map check-tag-9999 abjure 10

match tag 9999

!

route-map check-tag-9999 admittance 20

! tag-rip-9999 matches all routes (it has no bout command), and then

! tags them all with tag 9999. This route-map is acclimated alone for routes taken from

! RIP into OSPF.

route-map tag-rip-9999 admittance 10

set tag 9999

! R3 Config

! The R3 agreement does not accept to use the aforementioned names for avenue maps, but

continues

R2 R4

R3

R1

10.1.2.0/24 10.1.4.0/24

RIP – AD 120

OSPF: AD 110

Filtering Routes with Tag 9999

10.1.2.0/24

RIP

10.1.2.0/24

RIP

10.1.2.0/24

Tag 9999

10.1.2.0/24

Tag 9999

Filter admission OSPF routes:

Don’t put routes tagged 9999 in

my acquisition table!

When injecting RIP

routes into OSPF, tag

them with 9999

324 Chapter 10: IGP Avenue Redistribution, Avenue Summarization, and Absence Routing

The aftermost few curve of the archetype appearance the better abrogating of application avenue clarification to anticipate the

suboptimal routes. Aback R3 loses connectivity to R2, R3 does not use the alternating avenue through

the OSPF domain. R3’s clarification of those routes occurs behindhand of whether R3’s RIP routes are

available or not. As a result, application a band-aid that manipulates the AD may ultimately be the better

solution to this suboptimal-routing problem.

Using Metrics and Metric Types to Influence Redistributed Routes

A altered set of issues can action for a router that is centralized to a distinct acquisition domain, like R4

and R5 in Amount 10-4. The affair is simple—with assorted redistributing routers, an centralized router

learns assorted routes to the aforementioned subnet, so it charge aces the best route. As covered beforehand in the

chapter, the redistributing routers can set the metrics; by ambience those metrics with meaningful

values, the centralized routers can be afflicted to use a accurate redistribution point.

! the capital elements are identical, so the avenue maps are not again here.

router ospf 1

redistribute rip subnets route-map tag-rip-9999

network 10.1.34.3 0.0.0.0 breadth 0

distribute-list route-map check-tag-9999 in

! R3 (shown) and R1 accept RIP routes to 10.1.2.0, as able-bodied as added routes from the

! RIP domain. Also, agenda that the OSPF LSDB shows the tagged ethics on the routes.

R3# appearance ip avenue | incl 10.1.2.0

R 10.1.2.0 [120/1] via 10.1.23.2, 00:00:26, Serial0/0/0.2

R3# sh ip ospf abstracts activate Type-5

Type-5 AS Alien Articulation States

Link ID ADV Router Age Seq# Checksum Tag

10.1.1.0 1.1.1.1 834 0x80000006 0x00CE86 9999

10.1.1.0 3.3.3.3 458 0x80000003 0x0098B7 9999

10.1.2.0 1.1.1.1 834 0x80000006 0x00C390 9999

10.1.2.0 3.3.3.3 458 0x80000003 0x008DC1 9999

! curve bare for brevity

! Next, the adverse ancillary aftereffect of clarification the routes—R3 does not accept an

! another avenue to RIP subnets, although OSPF centralized routers (like R4

! in Amount 10-6) will.

R3# conf t

Enter agreement commands, one per line. End with CNTL/Z.

R3(config)# int s0/0/0.2

R3(config-subif)# shut

R3(config-subif)# ^Z

R3# sh ip avenue | incl 10.1.2.0

R3#

Example 10-6 Application Avenue Tags and Distribute Lists to Anticipate Suboptimal Routes at Redistributing

Routers (Continued)

Route Redistribution 325

Interestingly, centralized routers may not use metric as their aboriginal application aback allotment the

best route. For instance, an OSPF centralized router will aboriginal booty an intra-area avenue over an interarea

route, behindhand of their metrics. Table 10-8 lists the belief an centralized router will use when

picking the best route, afore because the metrics of the altered routes.

To allegorize some of these details, Archetype 10-7 focuses on R4 and its routes to 10.1.2.0/24 and

10.1.5.0/24 from Amount 10-4. The archetype shows the following, in order:

1. R1 and R3 acquaint 10.1.2.0/24 as an E2 route, metric 20. R4 uses the avenue through R3,

because R4’s amount to ability ASBR R3 is lower than its amount to ability ASBR R1.

2. Afterwards alteration R1 to acquaint redistributed routes into OSPF as E1 routes, R4 uses the E1

routes through R1, alike admitting the metric is beyond than the E2 avenue through R3.

3. R4 uses it higher-metric intra-area avenue to 10.1.5.0/24 through R5. Then, the R4-R5 articulation fails,

causing R4 to use the OSPF alien E2 avenue to 10.1.5.0/24—the avenue that leads through the

RIP breadth and aback into OSPF via the R3-R2-R1-R5 path.

Table 10-8 IGP Order of Precedence for Allotment Routes Afore Because the Metric

IGP Order of Precedence of Metric

RIP No added considerations

EIGRP Internal, afresh external

OSPF Intra-area, inter-area, E1, afresh E2*

IS-IS L1, L2, external

* For E2 routes whose metric ties, OSPF additionally checks the amount to the announcement ASBR.

Example 10-7 Demonstration of the Added Decision Belief for Allotment the Best Routes

! R4 has E2 routes to all the subnets in the RIP domain, and they all point to R3.

R4# sh ip avenue ospf

10.0.0.0/24 is subnetted, 10 subnets

O 10.1.15.0 [110/128] via 10.1.45.5, 00:03:23, Serial0/0/0.5

O E2 10.1.12.0 [110/20] via 10.1.34.3, 00:03:23, Serial0/0/0.3

O E2 10.1.3.0 [110/20] via 10.1.34.3, 00:03:23, Serial0/0/0.3

O E2 10.1.2.0 [110/20] via 10.1.34.3, 00:03:23, Serial0/0/0.3

O E2 10.1.1.0 [110/20] via 10.1.34.3, 00:03:23, Serial0/0/0.3

O 10.1.5.0 [110/65] via 10.1.45.5, 00:03:23, Serial0/0/0.5

O E2 10.1.23.0 [110/20] via 10.1.34.3, 00:03:23, Serial0/0/0.3

! R4 chose the routes through R3 instead of R1 due to the lower amount to R3.

R4# appearance ip ospf border-routers

OSPF Action 1 centralized Acquisition Table

Codes: i - Intra-area route, I - Inter-area route

continues

i 1.1.1.1 [128] via 10.1.45.5, Serial0/0/0.5, ASBR, Breadth 0, SPF 13

i 3.3.3.3 [64] via 10.1.34.3, Serial0/0/0.3, ASBR, Breadth 0, SPF 13

! (Not Shown): R1 is afflicted to redistribute RIP routes as E1 routes by

! abacus the metric-type 1 advantage on the redistribute command on R1.

! R4 picks routes through R1 because they are E1 routes, alike admitting the metric

! (148) is college than the routes through R3 (cost 20)

R4# appearance ip avenue ospf

10.0.0.0/24 is subnetted, 10 subnets

O E1 10.1.2.0 [110/148] via 10.1.45.5, 00:00:11, Serial0/0/0.5

! curve bare for brevity

! R4’s avenue to 10.1.5.0/24 beneath is intra-area, metric 65

R4# appearance ip avenue | incl 10.1.5.0

O 10.1.5.0 [110/65] via 10.1.45.5, 00:04:48, Serial0/0/0.5

! (Not Shown): R4 shuts bottomward articulation to R5

! R4’s new avenue to 10.1.5.0/24 is E2, abstruse from R3, with metric 20

R4# appearance ip avenue | incl 10.1.5.0\\

O E2 10.1.5.0 [110/20] via 10.1.34.3, 00:10:52, Serial0/0/0.3