调用路由映射的路由重分发实例<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

通过调用路由映射,redistribute命令可以设置哪些路由可以重分发。

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />

配置目标:

对于由OSPFEIGRP的重分发,需满足:

1)重分发下一跳地址为15.1.1.5R5)的路由,其路由标识为5

2)重分发源自R6RID 6.6.6.6)的E1路由,其路由标识为6

3)不重分发其他路由。

对于由EIGRPOSPF的重分发,需满足:

1)重分发以14.2开头且掩码为/23/24的路由,其metric设为300

2)不重分发其他以14.2开头的路由。

3)重分发以14.3开头的路由,其路由标识为99

4)不重分发其他路由。

R1的配置:

router eigrp 1

 redistribute ospf 1 route-map ospf-into-eigrp

 network 14.0.0.0

 default-metric 1544 5 1 1 1

 no auto-summary

!

router ospf 1

 router-id 1.1.1.1

 redistribute eigrp 1 subnets route-map eigrp-into-ospf

 network 15.0.0.0 0.255.255.255 area 0

!

ip access-list standard A-14-3-x-x

 permit 14.3.0.0 0.0.255.255

ip access-list standard A-15-1-1-5

 permit 15.1.1.5

ip access-list standard A-6-6-6-6

 permit 6.6.6.6

!

ip prefix-list e-into-o seq 5 permit 14.2.0.0/16 ge 23 le 24

!

route-map ospf-into-eigrp permit 10

 match ip next-hop A-15-1-1-5

 set tag 5

!

route-map ospf-into-eigrp permit 15

 match ip route-source A-6-6-6-6

 match route-type external type-1

 set tag 6

!

route-map eigrp-into-ospf permit 10

 match ip address prefix-list e-into-o

 set metric 300

!

route-map eigrp-into-ospf permit 18

 match ip address A-14-3-x-x

 set tag 99