Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP as-path regular expressions

Dose any one knows good link or reference material I can use to understand BGP as-path regular expressions for route filtering. I have basic understanding but just in case if I can understand this in depth I am looking for as many as regular expression examples with explanation

Thanks

Rits

3 REPLIES
New Member

Re: BGP as-path regular expressions

If you haven't got access to a test network, when you have studied how reg expressions work try...

http://www.netdigix.com/servers.html

It's a list of public route servers.You are allowed access to do sh ip bgp regexp so you can test your knowledge..-)

Rgds

E.

New Member

Re: BGP as-path regular expressions

This info might be helpful for your needs

Range

A range is a sequence of characters contained within left and right square brackets. For example: [abcd]

Atom

An atom is a single character, such as the following:

. (Matches any single character)

^ (Matches the beginning of the input string)

$ (Matches the end of the input string)

\ (Matches the character)

- (Matches a comma (,), left brace ({), right brace (}), the beginning of the input string, the end of the input string, or a space.

Piece

A piece is an atom followed by one of the following symbols:

* (Matches 0 or more sequences of the atom)

+ (Matches 1 or more sequences of the atom)

? (Matches the atom or the null string)

Branch

A branch is a 0 or more concatenated pieces.

Examples of regular expressions follow:

a* (Any occurrence of the letter "a", including none)

a+ ( At least one occurrence of the letter "a" should be present)

ab?a (This matches "aa" or "aba")

_100_ (Via AS100)

_100$ (Origin AS100)

^100 .* (Coming from AS100)

^$ (Originated from this AS)

Refer to Using Regular Expressions in BGP for sample configurations on regular expression filtering

1641
Views
0
Helpful
3
Replies
CreatePlease login to create content