| 分类: ~~~ BGP ~~~ |

路由能够基于网络号过滤到或来自于某个特定邻居的路由更新。由访问列表组成的过滤器被应用到所有发送到或来自于某个特定邻居的BGP更新上。
本案例中,我们在R1上配置一个distribute-list,防止1.0.0.0/8被通告入AS200中。
//// r1 ////
int f2/0
int f3/0
int lo0
int lo1
router bgp 100
access-list 1 deny 1.0.0.0
0.255.255.255
access-list 1 permit any
//// r2 ////
int f2/0
int f4/0
router os 1
router bgp 200
//// r3 ////
int f3/0
int f5/0
router os 1
router bgp 200
//// r4 ////
int f4/0
int f5/0
int lo0
router os 1
router bgp 200
验证:
r2#sh ip bgp
Network
Next
Hop
Metric LocPrf Weight Path
*> 1.0.0.0
192.1.1.1
0
0 100 i
* i2.0.0.0
193.1.1.1
0
100
0 100 i
*>
192.1.1.1
0
0 100
i
*>i4.0.0.0
194.1.1.4
0
100
0 i
*> 1.0.0.0
* i2.0.0.0
*>
由193.1.1.1学来的1.0.0.0/8路由条目已被过滤!

加载中…