Configuring BGP Filtering by Access Lists and Neighbors Another method of filtering is to specify an access list filter on both incoming and outbound updates, based on the BGP autonomous system paths. Each filter is an access list based on regular expressions. To use this method, define an autonomous system path access list, and apply it to updates to and from particular neighbors. Procedure Configuring BGP Configuring BGP Filtering by Access Lists and Neighbors Command or Action Purpose Device# copy running-config startup-config Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example:
Device# configure terminal Enters global configuration mode. Step 3 ip as-path access-list access-list-number {permit | deny} as-regular-expressions Example: Device(config)# ip as-path access-list 1 deny 65535 _ _ Defines a BGP-related access list. Step 4 router bgp autonomous-system Example: Device(config)# router bgp 110 Enters BGP router configuration mode. Step 5 neighbor {ip-address | peer-group name} filter-list {access-list-number | name} {in | out | weight weight} Example: Device(config-router)# neighbor 172.16.1.1 filter-list 1 out Establishes a BGP filter based on an access list. Step 6 end Example: Returns to privileged EXEC mode. Configuring BGP 24