一、实验拓扑:
二、实验要求:
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