Allied Telesis X908 Network Router User Manual


 
Use Route Maps and Other Filters to Filter and Alter BGP and OSPF Routes | Page 17
BGP: Configuring AS Path Filters
BGP: Configuring AS Path Filters
To configure path filters we need to first understand something about AS path lists and how
to use them.
AS path lists
Path filters use a construct known as an AS path list. An AS path list has a name and consists
of one or more (unnumbered) entries. Each entry specifies:
which AS paths to consider.
whether the AS paths in question should be included or excluded from the list.
SYMBOL CHARACTER USED TO...
^ Caret Match the beginning of the input string. When
used at the beginning of a string of characters, it
negates a pattern match.
$ Dollar sign Match the end of the input string.
. Period
Match a single character (white spaces included).
* Asterix Match zero or more sequences of a pattern.
+ Plus sign
Match one or more sequences of a pattern.
? Question mark Match zero or one occurrences of a pattern.
_ Underscore
Match spaces, commas, braces, parentheses, or the
beginning and end of an input string.
[] Brackets Specify a range of single-characters.
- Hyphen Separate the end points of a range.
The set of paths to consider is specified using regular expressions. The AlliedWare Plus OS
supports the full set of syntax elements for simple regular expressions:
For example, you can specify things like:
any path that contains a certain set of AS numbers: e.g. 23334 45634 8988
any path that starts with a particular AS number: e.g. ^23334
any path that ends with a particular AS number: e.g. 8988$
a specific path: e.g. ^23334 45634 8988$
an empty path: ^$
Syntax T
o create an entry in an AS path list, use the command:
There is an implicit deny all entry at the end of each path list. Any AS path that does not
match any earlier entry is excluded from the list.
awplus(config)#
ip as-path access-list <list-name> {deny|
permit} <regular-expression>