Skip to content

FRR AFI Full BGP feed

Renato Westphal edited this page Aug 10, 2017 · 6 revisions

Pre-requisites

1. Download full BGP MRT dumps

In the RIPE website choose a BGP route collector and download a full MRT dump (files starting with bview.*): https://www.ripe.net/analyse/internet-measurements/routing-information-service-ris/ris-raw-data

Example:

$ wget http://data.ris.ripe.net/rrc15/2017.08/bview.20170809.0000.gz

2. Download and install bgpdump

$ sudo apt-get install build-essential zlib1g-dev libbz2-dev
$ wget http://www.ris.ripe.net/source/bgpdump/libbgpdump-1.5.0.tgz
$ tar zxf libbgpdump-1.5.0.tgz
$ cd libbgpdump-1.5.0/
$ ./configure --disable-ipv6
$ make
$ sudo cp bgpdump /usr/local/bin

3. Convert the MRT dump to the TABLE_DUMP_V2 format

Use the bgpdump tool installed in the previous step to convert the MRT dump to the TABLE_DUMP_V2 format required by the bgpsimple script:

$ zcat bview.20170809.0000.gz | bgpdump -m - > bgp_fulltable_sao_paulo

It's also recommended to remove duplicate routes using awk:

$ awk -F'|' '{ if (a[$6]++ == 0) print $0 }' bgp_fulltable_sao_paulo > bgp_fulltable_sao_paulo_uniq

NOTE: a full BGP dump in the TABLE_DUMP_V2 format can be download from this link: https://www.dropbox.com/s/jws8jbiflvty4hc/bgp_fulltable_sao_paulo_ipv4_2017_08_09?dl=0

4. Download and install the bgpsimple script

Install the Net::BGP perl module:

# perl -MCPAN -we 'install "Net::BGP"'

Download the bgpsimple script:

$ git clone https://github.com/xdel/bgpsimple.git

Finally, apply this patch to allow pacing the advertisements: https://hastebin.com/ipisohuten.diff

Testing

FRR configuration

vMX's bgpd (/etc/frr/bgpd.conf):

log file /tmp/frr-global-bgpd.log
!
router bgp 100
 neighbor 103.30.30.3 remote 13
 neighbor 103.30.30.3 timers 100 10000
 !
!

Starting FRR and the bgpsimple script

1 - Start zebra and bgpd in the global network namespace:

# zebra -d
# bgpd -d

2 - Start the bgpsimple script in vrouter3:

# ip netns exec vrouter3 bash
# bgp_simple.pl -myas 13 -myip 103.30.30.3 -peerip 103.30.30.1 -peeras 100\
                -p bgp_fulltable_sao_paulo -n -m 10000 -keepalive 100 -holdtime 10000 -nolisten

Verification

Clone this wiki locally