Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update irrdb.md #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions docs/features/irrdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ cd $IXPROOT
./artisan db:seed --class=IRRDBs
```

[BGPQ3](https://github.com/snar/bgpq3) is a very easy and fast way of querying IRRDBs. You first need to install this on your system. On Ubuntu 16.04/18.04 this is as easy as:
[BGPQ4](https://github.com/bgp/bgpq4) is a very easy and fast way of querying IRRDBs. You first need to install this on your system. On Ubuntu 16.04/18.04 this is as easy as:

```sh
apt install bgpq3
apt install autoconf automake build-essential git
git clone https://github.com/bgp/bgpq4
cd bgpq4 && ./bootstrap && ./configure && make
sudo make install
```

Then configure the path to it in your `.env` file.

```php
# Absolute path to run the bgpq3 utility
# e.g. IXP_IRRDB_BGPQ3_PATH=/usr/local/bin/bgpq3
IXP_IRRDB_BGPQ3_PATH=/usr/bin/bgpq3
# e.g. IXP_IRRDB_BGPQ4_PATH=/usr/local/bin/bgpq4
IXP_IRRDB_BGPQ4_PATH=/usr/bin/local/bgpq4
```

## Usage
Expand Down Expand Up @@ -54,19 +57,19 @@ php artisan irrdb:update-prefix-db 64511

### Internal Workings

Essentially, based on a customers AS number / IPv4/6 Peering Macro, IXP Manager [uses bgpq3](https://github.com/snar/bgpq3) to query IRRDBs as follows:
Essentially, based on a customers AS number / IPv4/6 Peering Macro, IXP Manager [uses bgpq4](https://github.com/bgp/bgpq4) to query IRRDBs as follows:

```bash
bgpq3 -S $sources -l pl -j [-6] $asn/macro
bgpq4 -S $sources -l pl -j [-6] $asn/macro
```

where `$sources` come from the IRRDB sources entries.

Or, a real example:

```bash
bgpq3 -S RIPE -l pl -j AS-BTIRE
bgpq3 -S RIPE -l pl -j -6 AS-BTIRE
bgpq4 -S RIPE -l pl -j AS-BTIRE
bgpq4 -S RIPE -l pl -j -6 AS-BTIRE
```


Expand Down