This blog was originally started to better help me understand the technologies in the CCIE R&S blueprint; after completing the R&S track I have decided to transition the blog into a technology blog.

CCIE #29033

This blog will continue to include questions, troubleshooting scenarios, and references to existing and new technologies but will grow to include a variety of different platforms and technologies. Currently I have created over 185 questions/answers in regards to the CCIE R&S track!! Note: answers are in the comment field or within "Read More" section.

You can also follow me on twitter @FE80CC1E


Saturday, October 30, 2010

Question 161

Alot of people seem to struggle with BGP regular expressions so I put them together the following questions

Here are a list of AS paths  (I just threw them together so we can create regular expressions). The AS that you are in is AS1.

100 110 2009 20093 20100 54 321
100 110 2009 20111 129 22 10
10 200 19 24 39 4 32
16 100 888 1339 2

Create a regular expression that filters routes that originate in AS321
Create a regular expression that filters routes that have instances of AS200 in the path
Create a regular expression that filters routes that are learned from AS10
Create a regular expression that filters routes that are locally originated
Create a regular expression that filters all routes from any AS
Create a regular expression that filters routes that pass through AS39
Create a regular expression that filters routes that have a number "20" anywhere within the AS number or path

Regular Expressions and their usage


^ Start of string                            
$ End of string                              
[] Range of characters                        
- Used to specify range ( i.e. [0-9] )        
( ) Logical grouping                            
. Any single character                        
* Zero or more instances                      
+ One or more instance                        
? Zero or one instance                        
_ Comma, open or close brace, open or close parentheses, start or end of string, or space


Have fun!

1 comments:

Packets Analyzed said...

Create a regular expression that filters routes that originate in AS321
_321$

Create a regular expression that filters routes that have instances of AS200 in the path
_200_

Create a regular expression that filters routes that are learned from AS10
^10_

Create a regular expression that filters routes that are locally originated
^$

Create a regular expression that filters all routes from any AS
.*

Create a regular expression that filters routes that pass through AS39
_39_[0-9]*
_39_.*


Create a regular expression that filters routes that have a number "20" anywhere within the AS number or path
20

Thanks Mark and Jason for your offline participation

Post a Comment