Getting ready

To install bgperf, clone the source code from its source repository:

$ git clone https://github.com/pradeeban/bgperf.git

For this recipe, we forked bgperf and did some minor fixes to make it work with Python 3. The parent project is at https://github.com/osrg/bgperf, which is aimed to work with Python 2, and at the time of writing does not support Python 3. A copy of the pradeeban/bgperf repository as of now has also been included in the source code bundle of this book in the folder 14_2_benchmark_with_bgperf for your ease of reference.

Once you have cloned our bgperf fork, go to the parent directory of bgperf:

$ cd bgperf

The following command installs the listed requirements. This includes Docker and pyyaml:

$ sudo pip install -r pip-requirements.txt

Now your bgperf is ready to benchmark the BGP implementations! Confirm it by running the following command:

$ sudo python3 bgperf.py -help

Now prepare bgperf for benchmarks:

$ sudo python3 bgperf.py prepare

During this command, bgperf downloads the BGP implementations locally. You will be able to observe this from the logs displayed:

Removing intermediate container 782c2b5dcecf
Step 5/6 : RUN git clone https://github.com/Exa-Networks/exabgp && (cd exabgp && git checkout HEAD && pip install six && pip install -r requirements.txt && python setup.py install)
---> Running in 833e710df9df
Cloning into 'exabgp'...

As this command actually downloads and installs many of the BGP implementations, it will take more than an hour to complete. On my laptop, it took me 90 minutes! Nevertheless, the logs will keep you informed and entertained. So you may keep an eye on the logs once in a while, as this progresses.

Eventually, it will succeed with these logs:

...
    
if test -n "birdc" ; then                                               
     /usr/bin/install -c ../birdc //usr/local/sbin/birdc ; 
fi
if ! test -f //usr/local/etc/bird.conf ; then                                 
     /usr/bin/install -c -m 644 ../doc/bird.conf.example //usr/local/etc/bird.conf ;      
else                             
      echo "Not overwriting old bird.conf" ;                            
fi
make[1]: Leaving directory '/root/bird/obj'
---> ad49f9e6f4f0
Removing intermediate container 488a2f8827eb
Successfully built ad49f9e6f4f0
Successfully tagged bgperf/bird:latest

Now it is time to finalize the installation of bgperf with the following command:

$ sudo python3 bgperf.py doctor
[sudo] password for pradeeban: 
docker version ... ok (17.06.0-ce)
bgperf image
... ok
gobgp image
... ok
bird image
... ok
quagga image
... ok
/proc/sys/net/ipv4/neigh/default/gc_thresh3 ... 1024
  

You have bgperf ready in your system now, to benchmark the BGP implementations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.4.179