cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7021
Views
1
Helpful
3
Replies

BGP as-path regular expressions

rthakker
Level 1
Level 1

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 3

thisisshanky
Level 11
Level 11

ekiriakos
Level 1
Level 1

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.

sdoremus33
Level 3
Level 3

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: