How to Use BGP++ for Simulations

Below is an old, partially complete tutorial I had up on my old site. If I ever get around to it, I’ll update this with the rest of the tutorial.

Installing BGP++

The first step in doing some network simulations is to actually build and install the simulator. I chose to use a very common one called ns2. In order to do simulations of BGP, you’ll need a patch called BGP++. BGP++ is basically a port of a program called Zebra, and is placed inside the ns2 code so that it can do BGP simulations. With that out of the way, you’ll want to start downloading the source code. You can get the BGP++ code from here, and the ns2 code from here. You should be careful to make sure that the version of the patch is intended for the version of ns2 that you download.

However, instead of downloading the code from the sites, which is very old by now, you may want to consider downloading my set of the code. I have already gone through and made several changes to fix various compiling errors. Inside of the tarball, you’ll find errorCorrections.txt that explains some of the fixes. You’ll need to make sure that you have gcc-3.3 and gcc-4.1 installed, as both were needed during the compiling. You will only need to execute the “install” script with `./install`, but there is a good chance you’ll come across some errors, which you’ll have to figure out what to fix. With any luck, this will only be with dependency issues because I have already gone through most of the current problems. Note that my set of the code has been run as of April 9, 2008, so the longer it has been since then, the better the chances of issues developing. Feel free to send me an email if you have questions, and I can try to help you out some.

3 Responses to “How to Use BGP++ for Simulations”


  1. Marcos Couto

    Paul,

    I’m developing a work at college that needs to simulate some behaviors of BGP. My choice was ns-2 with BGP++. So, I’m downloaded your set of code in an environment running Ububtu 9.10 with gcc-3.3 and gcc-4.1 installed. Unfortunately, I’m facing the following error when performing “./install”;

    make: ** [tkUnixInit.o] Erro 1
    tk8.3.2 make failed! Exiting …

    Could yopu help me to solve this problem?

    Thanks in advance.
    Couto

  2. Paul Kroon

    Hello Couto,

    Most likely it’s a dependency on Tk that you don’t have, but need. I haven’t tried compiling this in a long time, but some quick searching came up with possible similar issues like this: http://ubuntuforums.org/archive/index.php/t-125692.html. It’s also possible you just need to install Tk in general, so start with something like this: http://joysofprogramming.com/install-tk-dev-ubuntu/. Try to look around for similar packages for Tk (or maybe Tcl) that you can install with apt-get.

  3. Marcos Couto

    Paul,

    Your tips were very useful, we really get go forward, but unfortunately, we still are facing problems during the ns compilation. Now the error is the following:

    /usr/include/c++/3.3/bits/stl_alloc.h:232:undefined reference to `std::__default_alloc_template::allocate(unsigned int)’
    collect2: ld returned 1 exit status
    make: ** [ns] Erro 1

    thanks for your attention.