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.
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.