Vous êtes sur la page 1sur 5

Procedure https://cll1.cisco.

com/content/xtrac/2

Click here to print this page

Discovery 17: Manipulate Redistribution Using Route Maps

Procedure

Step 1 - Configure redistribution between the OSPF and EIGRP domains on routers
R1 and R4.
Enter the following commands on R1 and R4 router to enable mutual redistribution:

R1(config)# router eigrp 100


R1(config-router)# redistribute ospf 10 metric 10000 10 200 5 1500
R1(config)# router ospf 10
R1(config-router)# redistribute eigrp 100 subnets
R4(config)# router eigrp 100
R4(config-router)# redistribute ospf 10 metric 10000 10 200 5 1500
R4(config)# router ospf 10
R4(config-router)# redistribute eigrp 100 subnets

Step 2 - Verify the routing table on router R3.


With the show ip route ospf command, you can see the redistributed EIGRP network as OSPF
routes in the routing table. An example of two redistributed loopback routes are highlighted.
Notice also how link networks like 172.16.20.0/24 and 172.16.21.0/24 were redistributed.

R3# show ip route ospf


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks


O 10.1.4.0/24 [110/65] via 172.16.1.2, 00:20:02, Serial1/0
O 10.1.5.0/24 [110/65] via 172.16.1.2, 00:20:02, Serial1/0
O 10.1.6.0/24 [110/65] via 172.16.1.2, 00:20:02, Serial1/0
O 10.1.7.0/24 [110/65] via 172.16.1.2, 00:20:02, Serial1/0
O E2 10.2.0.0/24 [110/20] via 172.16.0.2, 00:58:31, Ethernet0/0
O E2 10.2.1.0/24 [110/20] via 172.16.0.2, 00:58:31, Ethernet0/0
O E2 10.2.2.0/24 [110/20] via 172.16.0.2, 00:58:31, Ethernet0/0
O E2 10.2.3.0/24 [110/20] via 172.16.0.2, 00:58:31, Ethernet0/0
172.16.0.0/16 is variably subnetted, 6 subnets, 3 masks

1 of 5 9/28/2017 10:37 AM
Procedure https://cll1.cisco.com/content/xtrac/2

O E2 172.16.20.0/24 [110/20] via 172.16.0.2, 00:58:31, Ethernet0/0


O E2 172.16.21.0/24 [110/20] via 172.16.0.2, 00:58:31, Ethernet0/0

Step 3 - On routers R1 and R4, configure ACLs to manipulate redistribution. One


ACL must allow only internal loopback EIGRP routes, the other only internal
loopback OSPF routes.

To manipulate the redistribution process, you will need to create ACLs for matching OSPF and
EIGRP routes respectively:

R1(config)# access-list 10 permit 10.2.0.0 0.0.3.255


R1(config)# access-list 20 permit 10.1.0.0 0.0.7.255
R4(config)# access-list 10 permit 10.2.0.0 0.0.3.255
R4(config)# access-list 20 permit 10.1.0.0 0.0.7.255

Step 4 - On the R1 and R4 routers, configure route maps and set match criteria
to previously defined ACLs.
You need to configure the following route maps:

R1(config)# route-map intoOSPF permit 10


R1(config-route-map)# match ip address 10
R1(config-route-map)# route-map intoEIGRP permit 10
R1(config-route-map)# match ip address 20
R1(config-route-map)# set metric 10000 10 200 5 1500
R4(config)# route-map intoOSPF permit 10
R4(config-route-map)# match ip address 10
R4(config-route-map)# route-map intoEIGRP permit 10
R4(config-route-map)# match ip address 20
R4(config-route-map)# set metric 10000 10 200 5 1500

The metric for routes redistributed into EIGRP can be specified either in the route-map or the
redistribute command.

Step 5 - Apply the configured route maps to the redistribute commands under the
OSPF and EIGRP processes on both R1 and R4.
You need to configure the following commands to apply route maps in redistribution commands:

R1(config)# router eigrp 100


R1(config-router)# redistribute ospf 10 route-map intoEIGRP
R1(config)# router ospf 10
R1(config-router)# redistribute eigrp 100 subnets route-map intoOSPF
R4(config)# router eigrp 100
R4(config-router)# redistribute ospf 10 route-map intoEIGRP
R4(config)# router ospf 10
R4(config-router)# redistribute eigrp 100 subnets route-map intoOSPF

Step 6 - Verify OSPF routes in the routing table on R3.


You can see that link networks like 172.16.20.0/24 are no longer present as OSPF routes in the
routing table:

2 of 5 9/28/2017 10:37 AM
Procedure https://cll1.cisco.com/content/xtrac/2

R3# show ip route ospf


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks


O 10.1.4.0/24 [110/65] via 172.16.1.2, 00:30:02, Serial1/0
O 10.1.5.0/24 [110/65] via 172.16.1.2, 00:33:48, Serial1/0
O 10.1.6.0/24 [110/65] via 172.16.1.2, 00:33:48, Serial1/0
O 10.1.7.0/24 [110/65] via 172.16.1.2, 00:33:38, Serial1/0
O E2 10.2.0.0/24 [110/20] via 172.16.0.2, 01:40:23, Ethernet0/0
O E2 10.2.1.0/24 [110/20] via 172.16.0.2, 01:40:23, Ethernet0/0
O E2 10.2.2.0/24 [110/20] via 172.16.0.2, 01:40:23, Ethernet0/0
O E2 10.2.3.0/24 [110/20] via 172.16.0.2, 01:40:23, Ethernet0/0

Step 7 - On R1, examine the routing table for route 10.1.4.0/24.


Route 10.1.4.0/24 describes the loopback interface on R4. R1 prefers the path learned via OSPF to
reach this network, even though it crosses a slow serial link. The alternative EIGRP path has a
higher administrative distance, as it is an external EIGRP route.

R1# show ip route


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 12 subnets


O 10.1.0.0 [110/11] via 172.16.0.1, 03:47:09, Ethernet0/0
O 10.1.1.0 [110/11] via 172.16.0.1, 03:47:09, Ethernet0/0
O 10.1.2.0 [110/11] via 172.16.0.1, 03:47:09, Ethernet0/0
O 10.1.3.0 [110/11] via 172.16.0.1, 03:47:09, Ethernet0/0
O 10.1.4.0 [110/75] via 172.16.0.1, 00:32:22, Ethernet0/0
O 10.1.5.0 [110/75] via 172.16.0.1, 00:36:08, Ethernet0/0
O 10.1.6.0 [110/75] via 172.16.0.1, 00:36:08, Ethernet0/0
O 10.1.7.0 [110/75] via 172.16.0.1, 00:35:58, Ethernet0/0
D 10.2.0.0 [90/409600] via 172.16.20.2, 03:41:39, Ethernet0/1
D 10.2.1.0 [90/409600] via 172.16.20.2, 03:41:39, Ethernet0/1
D 10.2.2.0 [90/409600] via 172.16.20.2, 03:41:39, Ethernet0/1
D 10.2.3.0 [90/409600] via 172.16.20.2, 03:41:39, Ethernet0/1
172.16.0.0/16 is variably subnetted, 6 subnets, 3 masks
C 172.16.0.0/24 is directly connected, Ethernet0/0
L 172.16.0.2/32 is directly connected, Ethernet0/0

3 of 5 9/28/2017 10:37 AM
Procedure https://cll1.cisco.com/content/xtrac/2

O 172.16.1.0/30 [110/74] via 172.16.0.1, 01:04:30, Ethernet0/0


C 172.16.20.0/24 is directly connected, Ethernet0/1
L 172.16.20.1/32 is directly connected, Ethernet0/1
D 172.16.21.0/24 [90/281856] via 172.16.20.2, 03:41:39, Ethernet0/1

Step 8 - Change the administrative distance for external EIGRP routes to 100 on
R1.
The following commands need to be entered to change the AD of external routes to 100 in the
EIGRP process on R1:

R1(config)# router eigrp 100


R1(config-router)# distance eigrp 90 100

The distance eigrp command changes local default values for internal and external routes that
are redistributed into the EIGRP domain. In this example, 90 is the internal distance, and 100 is
the external.

Step 9 - Verify the routing table on R1 for the route 10.1.4.0/24.


You can observe in the routing table how the path for network 10.1.4.0/24 is now learned via
EIGRP. This way, R1 can reach network 10.1.4.0/24 without crossing the slow serial link.

R1# show ip route


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 12 subnets


D EX 10.1.0.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.1.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.2.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.3.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.4.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.5.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.6.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D EX 10.1.7.0 [100/284416] via 172.16.20.2, 00:00:26, Ethernet0/1
D 10.2.0.0 [90/409600] via 172.16.20.2, 00:00:26, Ethernet0/1
D 10.2.1.0 [90/409600] via 172.16.20.2, 00:00:26, Ethernet0/1
D 10.2.2.0 [90/409600] via 172.16.20.2, 00:00:26, Ethernet0/1
D 10.2.3.0 [90/409600] via 172.16.20.2, 00:00:26, Ethernet0/1
172.16.0.0/16 is variably subnetted, 6 subnets, 3 masks
C 172.16.0.0/24 is directly connected, Ethernet0/0
L 172.16.0.2/32 is directly connected, Ethernet0/0
O 172.16.1.0/30 [110/74] via 172.16.0.1, 01:10:33, Ethernet0/0
C 172.16.20.0/24 is directly connected, Ethernet0/1
L 172.16.20.1/32 is directly connected, Ethernet0/1
D 172.16.21.0/24 [90/281856] via 172.16.20.2, 00:00:26, Ethernet0/1

4 of 5 9/28/2017 10:37 AM
Procedure https://cll1.cisco.com/content/xtrac/2

© 2014 Cisco Systems, Inc.

5 of 5 9/28/2017 10:37 AM

Vous aimerez peut-être aussi