Exporting routes as text
Victor Sudakov
vas at mpeks.tomsk.su
Wed Feb 17 06:01:16 CET 2016
Will Dowling wrote:
> > Thanks for the link. So do you advise against sending commands
> > directly to the BIRD control socket?
>
> Not at all, that???s all those scripts are doing :)
>
> The only thing you???ll need to watch out for is the output separators in BIRDC output (numbers).
> I can confirm that we???re using this for monitoring in production without any issues.
Thanks again. I think this quick and dirty script will do:
echo "show route filter tomsk" |\
nc -w1 -U /var/run/bird.ctl |\
sed '2s/^1007-//g' |\
awk '/via 212\.73\.124\.1/{print $1}' >\
/usr/local/www/apache22/data/prefixdb/tomsk.txt
--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
sip:sudakov at sibptus.tomsk.ru
More information about the Bird-users
mailing list