snar / bgpq3

bgpq3
BSD 2-Clause "Simplified" License
363 stars 53 forks source link

Support for expanding AS-macro to AS-numbers #26

Closed emjemj closed 7 years ago

emjemj commented 8 years ago

I have a use-case where I would need to expand an AS-Macro into AS-numbers but not further into prefixes, preferably with the JSON output mode.

snar commented 8 years ago

On Sun, Sep 04, 2016 at 05:21:12AM -0700, Eric Lindsjö wrote:

I have a use-case where I would need to expand an AS-Macro into AS-numbers but not further into prefixes, preferably with the JSON output mode.

Looks like it can be done as easy as just:

snar@fri:~/compile/bgpq3>./bgpq3 -jf 1 as-eltel {"NN": [ 112,5495,6857,8377,20597,23456,34102,35357, 43951,52007 ]}

(-j: JSON output, -f NN - as-path filter for 'real routers' (junos/ios/ios-xr) or just set of AS numbers in json/bird formats. NN is ignored in later case).

Or am I missing something ?

emjemj commented 8 years ago

Well, that was easy. Not terribly obvious though.