使用route-map爲路由設置標記

課題內容:使用route-map爲路由設置標記redis

拓撲:ide

clip_image001

將R2的環回口重分佈直連進入OSPFspa

在R1和R4上將OSPF重分佈進入EIGRProuter

使用route-map,將R2的環回口路由(即OSPF的外部路由)設置路由標記爲 6.6.6.6blog

將其它的OSPF內部路由設置路由標記爲 8.8.8.8ip

要求在R3上看到的路由標記格式爲 點分十進制ci


R2路由

router ospf 110部署

redistribute connected metric-type 1 subnetsget


驗證:

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上就能夠針對不一樣的外部路由前綴使用前綴列表對其進行區分標記,以實現路由操控的靈活部署;

相關文章
相關標籤/搜索