#

Tuesday, February 5, 2019

BGP Route Filtering using AS-PATH Filter Lists

There can be cases where you are asked to filter BGP updates from a certain autonomous system. You will need to know the configuration of special type of ACLs called AS-Path ACLs.










As you can see, R1 has learned 2 routes which are coming trough AS number 3. Let's say you are asked to filter them.









In the deny statement '3' means that if the AS-PATH list matches any AS number 3 it will filter the route. Note that if there is an ASN 30 is there, it will also be blocked by the ACL used here. But you can use regular expressions to match what you want to filter.

In the last statement in ACL .* is a regular expression used to match everything.

R1(config)#ip as-path access-list 200 deny 3
R1(config)#ip as-path access-list 200 permit .*

Binding the filter list with the neighbor.

R1(config)#router bgp 1
R1(config-router)#neighbor 11.1.12.2 filter-list 200 in









No comments:

Post a Comment