Skip to main content

Timeline for Junos AS-PATH regex

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Mar 24, 2015 at 17:34 comment added Jordan Head Actually, what you COULD do if you went with the event script. You could accept whatever prefixes in BGP from AS 20 (regardless of 20, 10, 10, or 20, 10, 10, 50 - etc.) The script could look at the AS_Paths from each prefix and add them to a policy to not accept, or have some other policy operate on them to do what you needed. But again, they would be in your routing table at some point, not sure how many prefixes we're talking about - but it could result in a lot of CPU churn, or blackholed traffic unless you're EXTREMELY careful with the logic.
Mar 24, 2015 at 17:28 comment added Jordan Head Unfortunately, there really isn't a way to say "Only accept my neighbor, and their directly connected neighbor", without specifying some other AS number that might be connected (you can put a list in the regex). You MIGHT be able to write this functionality into an event script, but I'm not sure if there is a way to essentially break how BGP receives routes in favor of your script - to be honest, I kind of doubt there is.
Mar 24, 2015 at 9:48 comment added Stefano Sasso Thanks for your reply, what I want to achieve is match AS20 whether AS20 does prepending or not, and ANY neighbor of AS, whether they do prepending or not. So, 20+ .* would also match 20 20 10 10 30 40 50, but I want to match only 20 20 10 10 (to be clear, only two AS number in the path) thanks.
Mar 23, 2015 at 21:54 history answered Jordan Head CC BY-SA 3.0