Skip to content

Instantly share code, notes, and snippets.

@jvoss
Last active April 1, 2022 15:27
Show Gist options
  • Save jvoss/991a3db6eebf544d81f7b37bfd12eff7 to your computer and use it in GitHub Desktop.
Save jvoss/991a3db6eebf544d81f7b37bfd12eff7 to your computer and use it in GitHub Desktop.
ExaBGP Setup and RIPE MRT download
#/bin/bash
echo ""
echo "Installing python packages"
echo "--------------------------"
echo ""
pip install exabgp mrtparse
echo ""
echo "Download mrt2exabgp utility"
echo "---------------------------"
echo ""
curl https://raw.githubusercontent.com/t2mune/mrtparse/master/examples/mrt2exabgp.py -o mrt2exabgp.py
chmod +x mrt2exabgp.py
echo ""
echo "Download the latest RIPE BGP view"
echo "----------------------------------"
echo ""
curl https://data.ris.ripe.net/rrc16/latest-bview.gz -o ripe-latest-bview.gz
echo ""
echo "Convert RIPE MRT to ExaBGP format"
echo "---------------------------------"
echo ""
./mrt2exabgp.py -P -4 '<router IP>' ripe-latest-bview.gz > exafulltable.py
echo ""
echo "Update first ASN to whatever you're using"
echo "-----------------------------------------"
echo ""
sed -i -e "s/as-path \\[/as-path [174 /" exafulltable.py
echo ""
echo "Add the following to your EgaBGP configuration"
echo "----------------------------------------------"
echo ""
echo "process fullbgp {"
echo " run python /full/path/to/exafulltable.py;"
echo " encoder text;"
echo "}"
echo ""
echo "Then run ExaBGP as:"
echo "env exabgp.api.ack=false exabgp exabgp.conf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment