一、实验拓扑:
二、实验要求:
1、增加R5:AS 5,和R2通过直连路由建立BGP邻居关系;
2、R2部署在BGP下send-conmmunity到R5;
3、R4上部署ACL抓取4.4.4.4流量、route-map命名shuchu、调用ACL、set community no-export;并在BGP进程中调用route-map shuchu out;
4、查看R1、R2、R3是否含有携带no-export的4.4.4.4路由,并且R5学习不到4.4.4.4的路由条目?
三、命令部署:
R4#show ip access-lists
Standard IP access list 10
10 permit 4.4.4.0, wildcard bits 0.0.0.255 (1 match)
R4#show run | s route-map
neighbor 14.1.1.1 route-map shuchu out
route-map shuchu permit 20
match ip address 10
set community no-export
route-map shuchu permit 1000
四、验证:
R5#show ip bgp //空的
R2#show ip bgp 4.4.4.4
BGP routing table entry for 4.4.4.0/24, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to EBGP peer)
Flag: 0x820
Not advertised to any peer
(65001) 4
3.3.3.3 (metric 156160) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, confed-external, best
Community: no-export
同理:R1、R3
原文地址:http://blog.51cto.com/13856092/2138062