Chapter 13
AS Path Regular Expressions
This appendix provides information about how to use and configure regular expressions for use with BGP4 routing protocol commands.
Matching AS Paths
An AS path regular expression is a regular expression with the alphabet used as the set of AS numbers defining a set of AS paths.
Note that according to this definition, AS path regular expressions are implicitly anchored at the beginning and end.
The following examples provide more information:
690Matches only the specific AS path “690.”
. *690 .* Matches any AS path containing 690.
690.* Matches any AS path beginning with 690.
. *690 Matches any AS path ending in 690.
AS Path Regular Expressions (regex)
A regex is a character string containing one of the following:
term | Matches the given term. |
regex1 regex2 | Matches a path that is a concatenation of two paths, P1 and P2. P1 matches |
| regex1 and P2 matches regex2. Note that spaces are ignored in general, but |
| should be used between two concatenated ASs to distinguish them. |
regex1 regex2 | Matches a path that matches regex1 or regex2. |
|
|
AS Path Terms
A term is one of the following:
AS | Matches the given number, which is any positive |
| inclusive. Note that valid AS numbers range from one through 65534 |
| inclusive. |
June 2004 | © 2004 Foundry Networks, Inc. | 13 - 1 |