Command Reference Guide
168 ● ip as-path-acl 3Com Router 5000 Family and Router 6000 Family
Command Reference
ip as-path-acl
Purpose Use the ip as-path-acl command to configure an AS path regular expression.
Use the undo ip as-path-acl command to disable the defined regular
expression.
Syntax ip as-path-acl aspath-acl-number { permit | deny }
as-regular-expression
undo ip as-path-acl aspath-acl-number
Parameters aspath-acl-number
Number of AS path list ranging from 1 to 199.
as-regular-expression
AS path regular expression.
The routing information packet of the BGP protocol includes an AS path field. During
BGP routing information exchange, all the ASs along the route are recorded in this
field. Identifying an AS path list is to compare it with a regular expression. A regular
expression is a combination of characters. For example, ^200. *100$ means all the
AS path fields that begin with AS200 and end with AS100.
The following table shows the special characters used in AS regular expressions and
their meanings.
You can specify a regular expression to match AS path information when defining
aspath-acl. The system can filter out unmatched routing information by matching
aspath-acl. You can define multiple aspath-acl commands for one list number, that
is, one list number can represent a group of AS access lists. Each AS path list is
identified by a number.
Example Configure an AS path list.
[3Com ] ip as-path-acl 10 permit 200,300purpose_body
Table 33 Special characters in regular expressions
Character Meaning
. Matches any single character, including blank space.
* Matches 0 or more patterns.
+ Matches 1 or more patterns.
^ Matches the beginning of an input string.
$ Matches the end of an input string.
_ Matches a comma, left brace, right brace, left parenthesis, right
parenthesis, the beginning of an input string, the end of an input
string, or a space.
[ range ] Means the range of single-character patterns.
- Separates the ending points of a range.