Skip to content
Barry O'Donovan edited this page Sep 14, 2013 · 4 revisions

IXP Manager can maintain a list of member route:/route6: prefixes as registered in IRRDBs in its database and then use these to, for example, generate strict inbound filters on route servers.

IRRDB Prefixes with BGPQ3

BGPQ3 is a very easy and fast way of querying IRRDBs. You first need to install this on your system. Let's say I have it installed at /usr/bin/bgpq3, then I need to set the following application.ini parameter:

irrdb.bgpq.path = '/usr/bin/bgpq3'

Then, to update your prefix filter table (irrdb_prefix), just execute:

APPLICATION_PATH/bin/ixptool.php -a irrdb-cli.update-prefix-db [-v]

The above command will:

  • iterate over all route server client customers for IPv4 and IPv6
  • use the appropriate AS macro or ASN
  • query the RADB against the appropriate source set for that customer
  • compare prefixes in the database already (if any) against RADB and insert / delete as appropriate
  • validate the prefix for proper CIDR notation before database inserts
  • update the last_seen time for all prefixes for that customer
  • we use transactions to update the database so, even in the middle of a refresh, a full set of prefixes for all customers will still be available.

Note that our current implementation only queries RADB as BGPQ3 does not support the RIPE whois protocol. Our version will however set the RADB source database according to the member's stated IRRDB database as set on the customer add / edit page - so, for customer's registered with the RIPE IRRDB, the RIPE database of RADB is queried.

Verbosity is available via the -v flag.

The command will rigorously validate the return code and output of BGPQ3 and it will through an alert rather than removing prefixes when/if BGPQ3 returns an empty prefix list where prefixes already exist in the database.