Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Defining AS-Path Access Lists

    You can use the ip as-path access-list command to define an AS-path access list to permit or deny routes on the basis of the AS path. Each access list is a set of permit or deny conditions (based on how they match a route's AS path to a regular expression) for a route. If the regular expression matches the representation of the AS path of the route as an ASCII string, the permit or deny condition applies. The AS path does not contain the local AS number.

    The AS path allows substring matching. For example, the regular expression 20 matches AS path = 20 and AS path = 100 200 300, because 20 is a substring of each path. To disable substring matching and constrain matching to only the specified attribute string, place the underscore (_) metacharacter on both sides of the string; for example, _20_.

    You can 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.

    To define an AS-path access list to permit or deny routes on the basis of the AS path:

    • Issue the ip as-path access-list command in Global Configuration mode.
    host1(config)#ip as-path access-list 1 permit ^\(

    Use the no version to remove the AS-path access list; all entries that belong to this list are removed.

    Published: 2014-08-12