Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

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

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

Re: Regular expression (^364 and 364$) phrase from Advanced Rout

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

1 REPLY

Re: Regular expression (^364 and 364$) phrase from Advanced Rout

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

120
Views
0
Helpful
1
Replies
CreatePlease to create content