View - ADTRAN Support Community
View - ADTRAN Support Community
View - ADTRAN Support Community
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Appendix<br />
Appendix<br />
AS Regular Expressions<br />
Regular expressions, also known as regexp, are used in BGP to identify routes that are to be included in<br />
outbound routing advertisements or filtered from received inbound routing updates. Regular expressions<br />
identify an expected pattern to match against the AS path associated with a BGP route. AS paths identified<br />
by the regular expressions are subject to the actions specified in AOS.<br />
Regular expressions are defined in the Global Configuration mode using the command ip as-path-list.<br />
Refer to Filtering Routes According to AS Path on page 26 for more information on this command.<br />
There are four types of regular expressions: atom, range, piece, and branch.<br />
Atom<br />
An atom is a single character.<br />
Table 14. Atom<br />
Character<br />
Definition<br />
. Matches any single character.<br />
^<br />
Matches the beginning of the input string.<br />
$ Matches the end of the input string.<br />
\ Matches the character.<br />
- Matches a comma (,), left brace ({), right brace (}), the<br />
beginning of the input string, the end of the input string,<br />
or a space<br />
Range<br />
A range is a sequence of characters contained within square brackets (for example, [0-9]).<br />
Piece<br />
A piece is an atom followed by one of the following symbols:<br />
Table 15. Piece<br />
Character<br />
Definition<br />
* Matches 0 or more sequences of the atom.<br />
+ Matches 1 or more sequences of the atom.<br />
? Matches the atom or the null string.<br />
Branch<br />
A branch is 0 or more integrated pieces.<br />
61200860L1-29.4E Copyright © 2012 <strong>ADTRAN</strong>, Inc. 83