一、实验拓扑:
二、实验要求:
1、R4、R1、R3、R2分别在BGP进程下部署邻居发送团体属性命令;
2、R4上部署ACL抓取4.4.4.4流量、route-map命名pl、调用ACL、set community no-advertise;并在BGP进程中调用route-map pl out;
3、验证:查看R1中4.4.4.4条目详细信息是否携带:no-advertise,并且不会将此路由条目传递给R3、R2?
三、命令部署:
1、R4、R1、R3、R2分别在BGP进程下部署邻居发送团体属性命令
R1(config)#router bgp 65001
R1(config-router)#neighbor 3.3.3.3 send-community
R3(config)#router bgp 65001
R3(config-router)#neighbor 2.2.2.2 send-community
R4(config)#router bgp 4
R4(config-router)#neighbor 14.1.1.1 send-community
R4(config)#access-list 10 permit 4.4.4.0 0.0.0.255
R4(config)#route-map pl permit 10
R4(config-route-map)#match ip address 10
R4(config-route-map)#set community no-advertise
R4(config)#route-map pl permit 1000
R4(config)#router bgp 4
R4(config-router)#neighbor 14.1.1.1 route-map pl out
四、验证:
R1#show ip bgp 4.4.4.4
14.1.1.4 from 14.1.1.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-advertise
R3#show ip bgp
R2#show ip bgp
结论:R1携带no-advertise属性,不会将4.4.4.4的路由条目传给R2、R3
原文地址:http://blog.51cto.com/13856092/2138014