Reference Guide

Supported Releases 10.2.0E or later
ip as-path access-list
Create an AS-path ACL lter for BGP routes using a regular expression.
Syntax
ip as-path access-list name {deny | permit} regexp-string
Parameters
name — Enter an access list name.
deny | permit — Reject or accept a matching route.
regexp-string — Enter a regular expression string to match an AS-path route attribute.
Defaults Not congured
Command Mode CONFIGURATION
Usage Information
You can specify an access-list lter on inbound and outbound BGP routes. The ACL lter consists of regular
expressions. If a regular expression matches an AS path attribute in a BGP route, the route is rejected or accepted.
The AS path does not contain the local AS number. The no version of this command removes a single access list
entry if you specify deny and a regexp. Otherwise, the entire access list is removed.
These operator characters are not supported in the regular expressions you specify in the ip as-path
access-list command. All other special characters are supported. Note the workaround available to use the
space character as a match criteria for BGP AS paths.
Table 8. Special characters that are not supported
Operator Meaning Workaround
? (question mark) Make previous character optional. None; not supported in OS10.
\ (backslash) Treat the following character
literally or give it a special meaning.
None; not supported in OS10.
(space) Match space character. Use [[:punct:]] or "," (comma). The
space between AS numbers in an
AS path is expressed present using
a "," (comma) internally. A
punctuation posix expression or ","
matches it.
_ (underscore) Match space, comma, brackets,
start and end of a string.
None; not supported in OS10.
Example
OS10(config)# ip as-path access-list abc deny 123
Supported Release 10.3.0E or later
Access Control Lists 509