Spatiotis blog


Install ns-2.34 on Fedora 14


Download:

First you need to download ns-2 Simulator
link: NS-2 Simulator Download
Pre-Installation:

Before your ns-2 installation few packages must be already installed. Required packages (for fedora only) are:
1. yum install gcc.
2. yum install tcl-devel.
3. yum install libX11-devel.
4. yum install libXt-devel.

Install
1. Unarchive the downloaded file “ns-allinone-2.34.tar.gz” into /opt
$ tar -xvf ns-allinone-2.34.tar.gz
2. open terminal type
$ cd /opt/ns-allinone-2.34/ns-2.34/tools
$sudo gedit ranvar.cc, and change the line:

return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_,
beta_).value() * pow (u, 1.0 / alpha_);

with: GammaRandomVariable(1.0 + alpha_,
beta_).value() * pow (u, 1.0 / alpha_);

3.cd /opt/ns-allinone-2.34/ns-2.34/mobile
$sudo gedit nagakami.cc and change the lines:
line 183 -> resultPower = ErlangRandomVariable::ErlangRandomVariable
change with: resultPower = ErlangRandomVariable
line 186 -> resultPower = GammaRandomVariable::GammaRandomVariable
change: with resultPower = GammaRandomVariable
4. Start the installation process
$ ./install
5. At the end of installation you can see few lines like:

Libraries have been installed in:
/opt/ns-allinone-2.34/lib

2. You MUST put /opt/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental variable. Otherwise ns/nam will complain during startup.

Setting the environment variables:

Add all these lines into your ~/.bashrc file:
export PATH=$PATH:”/opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-2.34/tk8.4.18/unix”
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:”/opt/ns-allinone-2.34/otcl-1.13:/opt/ns-allinone-2.34/lib”
export TCL_LIBRARY=$TCL_LIBRARY:”/opt/ns-allinone-2.34/tcl8.4.18/library”
Validate successful installation:

After these steps, you can run the ns validation suite with
$cd ns-2.34; ./validate

1. Now its time to check if your installation is really successful. You can do so by:
$ cd /opt/ns-allinone-2.34/ns-2.34
$ ./validate (this will take some time)

Advertisements

Trackbacks & Pingbacks

  1. Pls help me to run a file in ns-2...i dono anything about that....pls help me pingbacked στο 5 years, 4 months ago

Σχόλια

  1. * chiranjib says:

    nice work!!!
    I installed ns2.34 on fedora 16

    | Απάντηση Δημοσιεύθηκε 5 years, 11 months ago
  2. * Ramya H says:

    when i try to install ns2.34 on fedora i get this error. please help me in this regard.
    In file included from mac/mac-802_11Ext.cc:66:0:
    mac/mac-802_11Ext.h: In member function ‘u_int32_t PHY_MIBExt::getHdrLen11()’:
    mac/mac-802_11Ext.h:175:19: error: expected primary-expression before ‘struct’
    mac/mac-802_11Ext.h:175:41: error: ‘dh_body’ was not declared in this scope
    mac/mac-802_11Ext.h:175:51: error: ‘offsetof’ was not declared in this scope
    mac/mac-802_11Ext.h:177:3: warning: control reaches end of non-void function [-Wreturn-type]
    make: *** [mac/mac-802_11Ext.o] Error 1
    Ns make failed!
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
    Please provide help

    | Απάντηση Δημοσιεύθηκε 5 years, 8 months ago
  3. * Ramya H says:

    When i try to install ns2.34 on fedora 16 i get this error:

    In file included from mac/mac-802_11Ext.cc:66:0:
    mac/mac-802_11Ext.h: In member function ‘u_int32_t PHY_MIBExt::getHdrLen11()’:
    mac/mac-802_11Ext.h:175:19: error: expected primary-expression before ‘struct’
    mac/mac-802_11Ext.h:175:41: error: ‘dh_body’ was not declared in this scope
    mac/mac-802_11Ext.h:175:51: error: ‘offsetof’ was not declared in this scope
    mac/mac-802_11Ext.h:177:3: warning: control reaches end of non-void function [-Wreturn-type]
    make: *** [mac/mac-802_11Ext.o] Error 1
    Ns make failed!

    Please provide help

    | Απάντηση Δημοσιεύθηκε 5 years, 8 months ago
    • * spatiotis says:

      In the file mac-802_11Ext.h you must add this line:
      #include cstddef
      in the section:
      #ifndef ns_mac_80211Ext_h
      #define ns_mac_80211Ext_h
      #include cstddef
      #include "marshall.h"
      #include "timer-handler.h"

      add cstddef

      | Απάντηση Δημοσιεύθηκε 5 years, 3 months ago
  4. * Pinakini says:

    I want to install obs0.9a module on ns2.34.
    Will you guide me?

    | Απάντηση Δημοσιεύθηκε 2 years, 10 months ago
  5. * Pinakini says:

    I want to patch obs0.9a module with ns2.34…give me idea plz

    | Απάντηση Δημοσιεύθηκε 2 years, 10 months ago
    • * spatiotis says:

      I am away from my office. I will give you an answer soon.

      | Απάντηση Δημοσιεύθηκε 2 years, 10 months ago


Σχολιάστε

Εισάγετε τα παρακάτω στοιχεία ή επιλέξτε ένα εικονίδιο για να συνδεθείτε:

Λογότυπο WordPress.com

Σχολιάζετε χρησιμοποιώντας τον λογαριασμό WordPress.com. Αποσύνδεση / Αλλαγή )

Φωτογραφία Twitter

Σχολιάζετε χρησιμοποιώντας τον λογαριασμό Twitter. Αποσύνδεση / Αλλαγή )

Φωτογραφία Facebook

Σχολιάζετε χρησιμοποιώντας τον λογαριασμό Facebook. Αποσύνδεση / Αλλαγή )

Φωτογραφία Google+

Σχολιάζετε χρησιμοποιώντας τον λογαριασμό Google+. Αποσύνδεση / Αλλαγή )

Σύνδεση με %s


Αρέσει σε %d bloggers: