could anyone tell me what
ip as-path access-list 100 deny .+_.+_.+_.+_.+_.+_.+_.+_.+_.+_.+_.+ stands for?!
I searched over the internet for the meaning of this regular expression, but I was unable to find any info.
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.Sign up to join this community
Every time you see
.+_, that regular expression represents a single BGP autonomous system. This as-path list denies BGP as paths equal to or longer than 12 paths long.
The regular expression works because
. represents any character,
+ is a wild card which optionally repeats the previous character an unlimited number of times, and
_ represents the space between the autonomous system paths. For more information, refer to the Cisco IOS Regular Expression guide, or this INE BGP Regular Expressions blog.
It'll be matching 12 AS-path list. But, I think a more appropriate way of matching it would be ^[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+$, because the expression you mentioned might just match any character ie. special characters and alphabets included.