cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
601
Views
0
Helpful
1
Replies

Regex as-path match question

shamax_1983
Level 3
Level 3

I have been testing some as-path match scenarios using BGP filtering and I found that on IOS XE, following two Regex matches giving the same results.

What I want is to match is, any prefix if it originated from 12031 ( I don't care what path it took to get to me)

 

ip as-path access-list 100 permit .*12031$

ip as-path access-list 200 permit 12031$

 

So what I gather from the results is that if you didn't have ".*" at the beginning, it looks like the router assumes that I had "match anything" regardless.

 

Am I getting this right?

 

Thanks

1 Reply 1

balaji.bandi
Hall of Fame
Hall of Fame

.

Matches any single character.

*

Matches 0 or more sequences of the pattern

^

Matches the beginning of an input string

$

Matches the end of an input string

 

In your example  -   ,* Anything  

 

here is some examples :

 

http://resources.intenseschool.com/bgp-regular-expressions/

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help