White Papers
For more information about this command and route ltering, refer to Filtering BGP Routes.
The following example applies access list Eagle to routes inbound from BGP peer 10.5.5.2. Access list Eagle uses a regular expression to
deny routes originating in AS 32. The rst lines shown in bold create the access list and lter. The second lines shown in bold are the regular
expression shown as part of the access list lter.
Example of Using Regular Expression to Filter AS Paths
Dell(config)#router bgp 99
Dell(conf-router_bgp)#neigh AAA peer-group
Dell(conf-router_bgp)#neigh AAA no shut
Dell(conf-router_bgp)#show conf
!
router bgp 99
neighbor AAA peer-group
neighbor AAA no shutdown
neighbor 10.155.15.2 remote-as 32
neighbor 10.155.15.2 shutdown
Dell(conf-router_bgp)#neigh 10.155.15.2 filter-list 1 in
Dell(conf-router_bgp)#ex
Dell(conf)#ip as-path access-list Eagle
Dell(config-as-path)#deny 32$
Dell(config-as-path)#ex
Dell(conf)#router bgp 99
Dell(conf-router_bgp)#neighbor AAA filter-list Eagle in
Dell(conf-router_bgp)#show conf
!
router bgp 99
neighbor AAA peer-group
neighbor AAA filter-list Eaglein
neighbor AAA no shutdown
neighbor 10.155.15.2 remote-as 32
neighbor 10.155.15.2 filter-list 1 in
neighbor 10.155.15.2 shutdown
Dell(conf-router_bgp)#ex
Dell(conf)#ex
Dell#show ip as-path-access-lists
ip as-path access-list Eagle
deny 32$
Dell#
Filtering BGP Routes Using AS-PATH Information
To lter routes based on AS-PATH information, use these commands.
1 Create an AS-PATH ACL and assign it a name.
CONFIGURATION mode
ip as-path access-list as-path-name
2 Create an AS-PATH ACL lter with a deny or permit action.
AS-PATH ACL mode
{deny | permit} as-regular-expression
3 Return to CONFIGURATION mode.
AS-PATH ACL
exit
4 Enter ROUTER BGP mode.
CONFIGURATION mode
router bgp as-number
196
Border Gateway Protocol IPv4 (BGPv4)










