25/09/2017
BGP Filtering
- BGP filtering can be done on any routers
- Filtering can be done inbound and outbound
- After filtering is applied BGP neighbor must be reset or cleared for the filter to take effect
- clear ip bgp 20.20.20.20 in/out preferred
- clear ip bgp * (hard reset)
- clear ip bgp 20.20.20.20 soft in/out
How to filter:
Distribute lists
access-list 1 deny 30.30.30.0 0.0.0.255 access-list 1 permit any any R2#(config)router bgp 20 R2#(config-router)neighbour 20.20.20.20 distribute-list 1 in
Prefix-lists
ip prefix-list CCNP deny 30.30.30.0/24 le 32 ip prefix-list CCNP permit 0.0.0.0/0 le 32 R2#(config)router bgp 20 R2#(config-router)neighbour 20.20.20.20 prefix-list CCNP in
Filter-lists
ip as-path access-list 1 permit ^10_ ip as-path access-list 1 permit _10$ R2#(config)router bgp 20 R2#(config-router)neighbour 20.20.20.20 filter-list 1 in
Route-map