Hi everyone not sure if this is the right place to put this but I have a BGP statement that I'm trying to understand..it is as follows:
neighbor VNET filter-list 17 out
ip as-path access-list 17 permit ^[0-9]+$
ip as-path access-list 17 permit ^$
what is this trying to tell me?
The ngihbor filter list command is used to filter BGP routes based on AS-Path access list. As-path access list uses regular expression to match BGP as-path.
In regular expression, ^ mathces the beginning of a string, $ matches end, + matches the preceding element 1 or more times. See
ip as-path access-list 17 permit ^[0-9]+$ would therefore match a string of digits. This means an as path with a length of 1.
ip as-path access-list 17 permit ^$ would match a null string. This would mean no as-path or locally originated routes.
As the filter-list is applied outbound, only locally originated routes and routes with an as-path length of 1 would be advertised out.