[ixpmanager] IRRDB filtering with LACNIC's IRR
Luiz Gustavo
luizgb at gmail.com
Wed Oct 28 14:43:54 GMT 2020
Hi,
I got to the same problem here. I have a custom IRR base for another reason
(LACNIC IRR does not have either nic.br or nic.mx entries).
And for some reason ixpmanager does not apply the host field defined on
IRRD Sources.
I solved this creating another bgpq3 exec with the following content, and
pointing out this new exec in .env :
File .env
IXP_IRRDB_BGPQ3_PATH=/usr/bin/bgpq3custom
File /usr/bin/bgpq3custom
#!/bin/bash
if [[ $@ = *"-S UEPG"* ]]
then
/usr/bin/bgpq3 -h irr.uepg.br $@
else
/usr/bin/bgpq3 $@
fi
You could do something like this to Lacnic IRR:
#!/bin/bash
if [[ $@ = *"-S LACNIC"* ]]
then
/usr/bin/bgpq3 -h irr.lacnic.net $@
else
/usr/bin/bgpq3 $@
fi
Att.
Luiz Gustavo
UEPG
Em qua., 28 de out. de 2020 às 11:21, Ryan Woolley <rwoolley at communityix.org>
escreveu:
> Hi folks,
>
> We're currently trying to turn up a new member whose IRR record is with
> LACNIC.
>
> LACNIC's IRR, unlike most others, is not mirrored into RADB. (It is also
> at irr.lacnic.net rather than whois.lacnic.net.)
>
> I have an IRRDB Source called "LACNIC" configured and pointing to
> irr.lacnic.net. The member's IRRDB is set to "LACNIC" and the AS-SET is
> set to "AS52376:AS-RCN".
>
> Attempting "Update Prefixes" yields this error:
> 500 | Server Error :: Error executing BGPQ3 with: /usr/bin/bgpq3 -S
> 'LACNIC' -l pl -j -m 24 'AS52376:AS-RCN'
>
> Running this from the command line confirms that bgpq3 is generating the
> error:rwoolley at ixpm:/srv/ixpmanager/app/Utils$ /usr/bin/bgpq3 -S 'LACNIC'
> -l pl -j -m 24 'AS52376:AS-RCN'
> ERROR:Invalid source(s) 'LACNIC': F source(s) unavailable
>
> After digging into the documentation, it appears that BGPQ3 uses RADB
> unless another host is specified with -h, and -S just causes the query to
> RADB to be limited to records imported from LACNIC (of which there are
> none).
>
> Usage: bgpq3 [-h host] [-S sources] [-P|E|G <num>|f <num>] [-2346AbDJjXd]
> [-R len] <OBJECTS>...
> [...]
> -h host : host running IRRD software (whois.radb.net by default)
> [...]
> -S sources: use only specified sources (default: RADB,RIPE,APNIC)
>
> In looking at the code at app/Utils/Bgpq3.php, it appears that a variable
> called $whois is used to set an alternate host for bgpq3:
> if( $this->whois )
> $cmd = '-h ' . escapeshellarg( $this->whois ) . ' ' . $cmd;
>
> I am not familiar enough with the code to follow this back to the source,
> but I would expect that $whois would be set from the hostname configured
> under IRRDB Sources, thus causing the command line to include -h
> irr.lacnic.net. Unfortunately, that is not happening.
>
> Is there another place that this needs to be set?
>
> For now, I've worked around this by adding to Bgpq3.php:
> if ($sources = "LACNIC") {
> $this->whois = "irr.lacnic.net";
> }
>
> And that causes the import to work as expected.
>
> This is v5.7.0 running on Ubuntu 20.04.1 LTS.
>
> Thanks,
> Ryan Woolley
> Community IX (FL-IX and CIX-ATL)
>
> _______________________________________________
> INEX IXP Manager mailing list
> ixpmanager at inex.ie
> Unsubscribe or change options here:
> https://www.inex.ie/mailman/listinfo/ixpmanager
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20201028/e0dec2a8/attachment.htm>
More information about the ixpmanager
mailing list