Import BGP full table into your lab

Oct 21, 2023 min read

About

Ripe Ncc has a project called RIS that has Snapshots of global internet routes from different location of the world.

This project collects routes and store them in archives that you can download and inject to a linux machine and from that you can inject to any BGP Speking router.

The way it works:

Diagram

Diagram

Now lets see how to configure it.

Step 1:

Download the archive files. Go to this link click on the raw data link according to your choosen location. You can download latest view or for a specific date. For this tutorial we will use MIX

wget https://data.ris.ripe.net/rrc10/latest-bview.gz

Step 2:

Extract the .gz file.

gunzip latest-bview.gz

Step 3:

Install gobgp. By default ubuntu and debian has gobgp (as of today) in their repo.

sudo apt-get update && sudo apt-get install gobgpd

Step 4:

Create gobgpd.conf file in any location you want. Change the as, router-id, neighbors.conf according to you need. For more complex config visit gobgp manual

 [global.config]
   as = 65001
   router-id = "10.0.0.1"
 [[neighbors]]
   [neighbors.config]
  neighbor-address = "10.0.0.2"
  peer-as = 65002

Step 5:

Run Gobgp.

sudo -E gobgpd -f gobgpd.conf &

Step 6:

Inject the downloaded routes into GoBgp.

gobgp mrt inject global latest-bview

You can also inject specific number of routes adding a param.

gobgp mrt inject global latest-bview {num routes to inject}

Be carefull with the injection and the router that is peered with GoBgp. Without sufficient resourses your system or router might crash.

Enjoy.

Special thanks goes to Andrew Ohanian @andrewohanian5132