1. 程式人生 > >34-高級路由:BGP匯總:實驗五 route-map+suppress-map過濾、as-set

34-高級路由:BGP匯總:實驗五 route-map+suppress-map過濾、as-set

size 9.png fff 9.1 ima 技術 conf per ddr

一、實驗拓撲:

技術分享圖片技術分享圖片
二、實驗要求:
1、R2上部署route-map過濾列表,並在BGP進程中調用匯聚+suppress,使192.168.8.1~192.168.9.1過濾掉;
2、R2部署as-set,使得R1收不到R2匯總產生的次優條目;
3、驗證:R4查看路由條目是否192.168.8.1~192.168.9.1條目被過濾掉,只有192.168.10.1~192.168.11.1路由條目?4、驗證:R1是否有R2匯總產生的次優條目?
三、命令部署:
1、R2上部署route-map過濾列表:
R2(config)#access-list 10 permit 192.168.8.0 0.0.1.0 抓取流量8.0/9.0

R2(config)#route-map pl permit 命名route-map為pl
R2(config-route-map)#match ip address 10 route-map下調用access-list

R2#show run | s route-map
route-map pl permit 10 自動把route-map定位編號10
match ip address 10

2、R2在BGP進程中調用匯聚+suppress:
R2(config)#router bgp 24

R2(config-router)#aggregate-address 192.168.8.0 255.255.252.0 suppress-map pl BGP下調用suppress-map

3、R2部署as-set,使得R1收不到R2匯總產生的次優條目:
R2(config-router)#aggregate-address 192.168.8.0 255.255.252.0 as-set

四、驗證:
1、R4查看路由條目是否192.168.8.1~192.168.9.1條目被過濾掉,只有192.168.10.1~192.168.11.1路由條目:
R1是否有1條次優的匯總路由192.168.8.0/22

R4#show ip route bgp
B 192.168.10.0/24 [200/0] via 2.2.2.2, 00:03:38
B 192.168.11.0/24 [200/0] via 2.2.2.2, 00:03:38
B 192.168.8.0/22 [200/0] via 2.2.2.2, 00:01:26

R1#show ip route bgp
B 192.168.8.0/22 [20/0] via 12.1.1.2, 00:03:05

2、R1是否有R2匯總產生的次優條目:
R1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
> 192.168.8.0/22 12.1.1.2 0 0 24 i
> 192.168.8.0 0.0.0.0 0 32768 i
> 192.168.9.0 0.0.0.0 0 32768 i
> 192.168.10.0 0.0.0.0 0 32768 i
*> 192.168.11.0 0.0.0.0 0 32768 i

R1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
> 192.168.8.0 0.0.0.0 0 32768 i
> 192.168.9.0 0.0.0.0 0 32768 i
> 192.168.10.0 0.0.0.0 0 32768 i
> 192.168.11.0 0.0.0.0 0 32768 i

34-高級路由:BGP匯總:實驗五 route-map+suppress-map過濾、as-set