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
• Use to assign an AS-path access list to matching inbound or outbound routes with the
in or out keywords.
• You can specify an optional weight value with the weight keyword to assign a relative
importance to incoming routes matching the AS-path access list.
• The name of the access list is a string of up to 32 characters.
• If you specify a BGP peer group by using the peerGroupName argument, all the members
of the peer group inherit the characteristic configured with this command unless it is
overridden for a specific peer. However, you cannot configure a member of a peer group
to override the inherited peer group characteristic for outbound policy.
• New policy values are applied to all routes that are sent (outbound policy) or received
(inbound policy) after you issue the command.
To apply the new policy to routes that are already present in the BGP routing table,
you must use the clear ip bgp command to perform a soft clear or hard clear of the
current BGP session.
Behavior is different for outbound policies configured for peer groups for which you
have enabled Adj-RIBs-Out. If you change the outbound policy for such a peer group
and want to fill the Adj-RIBs-Out table for that peer group with the results of the new
policy, you must use the clear ip bgp peer-group command to perform a hard clear or
outbound soft clear of the peer group. You cannot merely perform a hard clear or
outbound soft clear for individual peer group members because that causes BGP to
resend only the contents of the Adj-RIBs-Out table.
• Use the no version to disassociate the access list from a neighbor.
• See neighbor filter-list.
Filtering AS Paths with a Route Map
You can use a route map instead of the neighbor filter-list command to apply access
lists for filtering routes. In Figure 25 on page 89, suppose router Chicago is configured as
follows:
Copyright © 2010, Juniper Networks, Inc.88
JunosE 11.2.x BGP and MPLS Configuration Guide