21 October 2011

NS2.35 installation in Fedora 15 and Ubuntu 11.10

NS 2.35 can be installed successfully in Fedora 15 and Ubuntu 11.10 using the following steps

In Fedora 15
  1. Download ns-allinone-2.35 from the NS2 website. The recent version was RC8
  2. select the folder /home/username, untar the file using the command "tar zxvf ns-allinone-xxx.tar.gz" (without quotes).
  3. Go to the folder /home/username/ns-allinone-2.35/ using the command cd  /home/username/ns-allinone-2.35 /  and execute the command ./install (dot /install)
  4. You may encounter an error in the file mac_80211Ext.h and correct the error given in the following line
  5. Open the file /home/username/ns-allinone-2.35/ns-2.35/mac/mac_80211Ext.h and include the following line in the header file area
    1. #include <cstddef>
  6. Go to step3 and type ./install 
  7. Once installation completed, set the path information in .bash_profile (dot bash_profile)
    1. you need to set two path variables PATH and LD_LIBRARY_PATH
    2. please see this link for setting the path http://pradeepkumar.org/54/installation-instructions-for-network
For Ubuntu 11.10
  1. Please see step1 and step 2 in Fedora 15
  2. Ubuntu needed some software to be installed before installation of NS2. execute the following command to install
    1. sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.4 g++-4.4 
  3. You need to connect your machine to internet.
  4. Once all the packages are downloaded, go to step 3,4,5 and 6 from Fedora 15 installation.
  5. Once installation completed, set the path information in .bashrc (dot bashrc)
    1. you need to set two path variables PATH and LD_LIBRARY_PATH
    2. please see this link for setting the path http://pradeepkumar.org/54/installation-instructions-for-network
In both the above Operating System, you may come across an error while running ns and nam in the terminal window
The error may be ****Buffer Over flow - ns termination ***
To overcome this error, edit the following file
/home/username/ns-allinone-2.35/tcl8.5.8/unix/Makefile.in
Replace the following line
CC = @CC@
with
CC=gcc-4.4
and reinstall the steps (step3 in fedora 15 and step 4 in Ubuntu) as mentioned above.
Logout and login back

That's it.