[ixpmanager] IRRDB filtering with LACNIC's IRR

Nick Hilliard (INEX) nick at inex.ie
Wed Oct 28 17:42:35 GMT 2020


Luiz Gustavo wrote on 28/10/2020 14:43:
> 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 <http://nic.br> or nic.mx 
> <http://nic.mx> entries).
> And for some reason ixpmanager does not apply the host field defined on 
> IRRD Sources.

Probably no need for this.

Go to IRRDB Configuration, then add two new entries, one for MX and the 
other for BR:

BR:
	Host: irr.uepg.br
	Protocol: ripe
	Source: UEPG

Same for nic.mx.

There is one limitation here, namely that the code assumes that all of 
the IRR information for a particular IXP participant can be found on a 
single IRR whois host.

If this isn't the case and you need a single point of authority for all 
the IRRDBs, then create a new entry to point to the NTT IRRDB, which 
mirrors both the nic.mx and UEPG IRRDBs:

NTT:
	Host: rr.ntt.net
	Protocol: irrd
	Source: LACNIC,UEPG,NICMX

Then attach this configuration to the participant.

This will allow you to delete all the bgpq3 hacks which shouldn't be 
necessary.

Nick


> 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 <http://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 <http://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 <mailto: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 <http://irr.lacnic.net> rather than
>     whois.lacnic.net <http://whois.lacnic.net>.)
> 
>     I have an IRRDB Source called "LACNIC" configured and pointing to
>     irr.lacnic.net <http://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
>     <http://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 <http://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
>     <http://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 <mailto:ixpmanager at inex.ie>
>     Unsubscribe or change options here:
>     https://www.inex.ie/mailman/listinfo/ixpmanager
> 
> 
> 
> _______________________________________________
> INEX IXP Manager mailing list
> ixpmanager at inex.ie
> Unsubscribe or change options here: https://www.inex.ie/mailman/listinfo/ixpmanager
> 


More information about the ixpmanager mailing list