使用route-map为路由设置标记

课题内容:使用route-map为路由设置标记

拓扑:

clip_image001

将R2的环回口重分布直连进入OSPF

在R1和R4上将OSPF重分布进入EIGRP

使用route-map,将R2的环回口路由(即OSPF的外部路由)设置路由标记为 6.6.6.6

将其它的OSPF内部路由设置路由标记为 8.8.8.8

要求在R3上看到的路由标记格式为 点分十进制


R2

router ospf 110

redistribute connected metric-type 1 subnets


验证:

R2#show ip ospf database | begin Type-5

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag

22.1.1.1 24.1.1.2 166 0x80000001 0x0030BB 0


在R1和R4上定义route-map

route-map O2E permit 10

match route-type internal //匹配OSPF的内部路由

set tag 8.8.8.8 //设置路由标记为 8.8.8.8

route-map O2E permit 20 定义第二条route-map

match route-type external type-1 //匹配OSPF外部路由类型 1

set tag 6.6.6.6 //设置路由标记为 6.6.6.6

route-map O2E permit 30 //不要忘记添加一条放行所有,以允许其它路由通过;当然,按需配置;


在重分布的时候调用  R1和R4

router eigrp 90

network 134.1.1.0 0.0.0.255

redistribute ospf 110 metric 1544 2000 255 1 1500 route-map O2E


验证:

R3#show ip route 22.1.1.1

Routing entry for 22.1.1.1/32

Known via "eigrp 90", distance 170, metric 2195456

Tag 101058054, type external

Redistributing via eigrp 90

Last update from 134.1.1.4 on Ethernet0/2, 00:00:39 ago

Routing Descriptor Blocks:

134.1.1.4, from 134.1.1.4, 00:00:39 ago, via Ethernet0/2

Route metric is 2195456, traffic share count is 1

Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit

Reliability 255/255, minimum MTU 1500 bytes

Loading 1/255, Hops 1

Route tag 101058054

* 134.1.1.1, from 134.1.1.1, 00:00:39 ago, via Ethernet0/2

Route metric is 2195456, traffic share count is 1

Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit

Reliability 255/255, minimum MTU 1500 bytes

Loading 1/255, Hops 1

Route tag 101058054


将R3的路由标记显示为 点分十进制:

R3(config)#route-tag notation dotted-decimal


R3#show ip route 22.1.1.1

Routing entry for 22.1.1.1/32

Known via "eigrp 90", distance 170, metric 2195456

Tag 6.6.6.6, type external

Redistributing via eigrp 90

Last update from 134.1.1.4 on Ethernet0/2, 00:01:52 ago

Routing Descriptor Blocks:

134.1.1.4, from 134.1.1.4, 00:01:52 ago, via Ethernet0/2

Route metric is 2195456, traffic share count is 1

Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit

Reliability 255/255, minimum MTU 1500 bytes

Loading 1/255, Hops 1

Route tag 6.6.6.6

* 134.1.1.1, from 134.1.1.1, 00:01:52 ago, via Ethernet0/2

Route metric is 2195456, traffic share count is 1

Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit

Reliability 255/255, minimum MTU 1500 bytes

Loading 1/255, Hops 1

Route tag 6.6.6.6


重分布的时候使用route-map可以更好的针对路由进行操控,同时也可以针对不同的路由内容做出区分;

比如:在R2上就可以针对不同的外部路由前缀使用前缀列表对其进行区分标记,以实现路由操控的灵活部署;



猜你喜欢

转载自blog.51cto.com/dashu666/2173846