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

Regular expression (^364 and 364$) phrase from Advanced Routing Book

zillah2004
Level 1
Level 1

Cisco Companion Book Semester 5 (Advanced Routing CCNP1) page 382 says :

((^364 : Any route originating from AS 364 should have the number in the first position of AS_PATH, so this expression (^364) matches routes originating from AS 364.

Similarly, you can match an AS_PATh that ends with 364, which means that the route passed through AS 364 immediately before reaching the recipient?s AS : 364$ ))

Shouldn?t he have said in the first statement: matches routes originating or received from AS 364, I added word ?received?, since the announcement can originate from any AS that is behind AS 364 ?

And Shouldn?t he have said in the second statement in the second statement: ?----- that the route originated (not passed) from AS 364, because this expression (364$) means : matches all routes originated from AS 364, including those prepended with 364?

What I meant to check is there a typo in cisco's book explaination ?

1 Accepted Solution

Accepted Solutions

globalnettech
Level 5
Level 5

Hello,

you are exactly right:

^364_ means that the route has transited through directly connected AS364

_364$ means that the route has originated in AS364 (and can be prepended with, or transit, any other AS

I think the way people explain the regular expressions can vary, that might be where the confusion comes from. Originate should always refer to the AS that is to the very right of the entire path, while transit can be anywhere in the path.

Have a look at this link for numerous regular expression examples as well:

BGP Regular Expressions

http://www.911networks.com/bgp_regular_expressions

HTH,

GNT

View solution in original post

1 Reply 1

globalnettech
Level 5
Level 5

Hello,

you are exactly right:

^364_ means that the route has transited through directly connected AS364

_364$ means that the route has originated in AS364 (and can be prepended with, or transit, any other AS

I think the way people explain the regular expressions can vary, that might be where the confusion comes from. Originate should always refer to the AS that is to the very right of the entire path, while transit can be anywhere in the path.

Have a look at this link for numerous regular expression examples as well:

BGP Regular Expressions

http://www.911networks.com/bgp_regular_expressions

HTH,

GNT

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:

Review Cisco Networking products for a $25 gift card