Example 2 Consider the following commands used to configure router Chicago in Figure 24 on
page 89:
host1(config)#router bgp 293
host1(config-router)#neighbor 10.5.5.2 remote-as 32
host1(config-router)#neighbor 10.5.5.2 filter-list 1 in
host1(config-router)#neighbor 10.2.2.4 remote-as 17
host1(config-router)#exit
host1(config)#ip as-path access-list 1 deny ^32$
Figure 24: Assigning a Filter List
Access list 1 denies routes that originate in AS 32—and therefore routes originated
by router NY—because the AS-path attribute for these routes begins with (and indeed
consists only of) the value 32.
Routes originating anywhere else—such as in AS 837, AS 17, or AS 451—are
permitted, because their AS-path attributes do not begin with 32.
ip as-path access-list
â– Use to define an AS-path access list to permit or deny routes based on the AS
path.
â– Each access list is a set of permit or deny conditions for routes based on matching
a route’s AS path with a regular expression. If the regular expression matches
the representation of the AS path of the route as an ASCII string, then the permit
or deny condition applies. The AS path does not contain the local AS number.
â– Use the neighbor filter-list command to apply the AS-path access list. You can
apply access list filters to inbound and outbound BGP routes. You can assign
weights to routes matching the AS-path access list.
â– Use the no version to remove a single access list entry if permit or deny and a
path-expression are specified. Otherwise, the entire access list is removed.
â– See ip as-path access-list.
neighbor filter-list
Configuring BGP Routing Policy â– 89
Chapter 1: Configuring BGP Routing