Installing NS-2.35 in Ubuntu 11.10 and Fedora 16

NS-23.5 is released this month and here are the simple instructions to install.

Ubuntu 11.10

1. Install ubuntu

2. Download the Ns-2.35 from this website http://isi.edu/nsnam/ns/

3. Assuming that your ns-2.35 source is in the /home/loginname/ , execute the commands one by one

sudo apt-get update

sudo apt-get install automake autoconf libxmu-dev build-essential

tar zxvf ns-allinone-2.35.tar.gz

cd ns-allinone-2.35

./install

4. Once the process is over, it will give the set of paths to be set.

5. Go to terminal and open .bashrc by giving this command

gedit .bashrc

and copy the following lines ( my login name for linux is pradeep, you can change yours accordingly)

export PATH=$PATH:/home/pradeep/ns-allinone-2.35/bin:/home/pradeep/ns-allinone-2.35/tcl8.5.10/unix:/home/pradeep/ns-allinone-2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=/home/pradeep/ns-allinone-2.35/otcl-1.14:/home/pradeep/ns-allinone-2.35/lib

6. run the command "source .bashrc" (without quotes)

and then type ns (a % symbol indicates the successful installation of ns2) or nam (you can see a network animation windows popped out)

Fedora 16

1. Download the DVD Version (http://www.fedoraproject.org) and Install all the pacakges (if you are not sure about what to be installed)

2. Download the Ns-2.35 from this website http://isi.edu/nsnam/ns/

3. Assuming that your ns-2.35 source is in the /home/loginname/ , execute the commands one by one

tar zxvf ns-allinone-2.35.tar.gz

cd ns-allinone-2.35

./install

4. Once the process is over, it will give the set of paths to be set.

5. Go to terminal and open .bash_profile by giving this command

gedit .bash_profile

and copy the following lines ( my login name for linux is pradeep, you can change yours accordingly)

and already a PATH was already defined and put a : at the end of the existing PATH and copy these lines

/home/pradeep/ns-allinone-2.35/bin:/home/pradeep/ns-allinone-2.35/tcl8.5.10/unix:/home/pradeep/ns-allinone-2.35/tk8.5.10/unix

export LD_LIBRARY_PATH=/home/pradeep/ns-allinone-2.35/otcl-1.14:/home/pradeep/ns-allinone-2.35/lib

6. run the command "source .bash_profile" (without quotes)

and then type ns (a % symbol indicates the successful installation of ns2) or nam (you can see a network animation windows popped out)

Comments

  1. thanks a lot..... i got ns2 installed in ubuntu 11.10...:)

    ReplyDelete
  2. when i close the terminal and open and type ns it says ns not installed....

    ReplyDelete
  3. hello sir, the vedios are not clearly seen please improve the quality from next vedios thanku

    ReplyDelete
  4. ns was installed, but when i call nam, this text appear:


    nam:
    [code omitted because of length]
    : version conflict for package "Tcl": have 8.5.10, need exactly 8.4
    while executing
    "package require -exact Tcl 8.4"

    ReplyDelete
  5. i also have same problem as jeni.....when i close the terminal and open and type ns it says ns not installed....

    ReplyDelete
  6. i also have same problem as jeni....when i close the terminal and open and type ns it says ns not installed....

    ReplyDelete
  7. plz write step by step method

    ReplyDelete
  8. I have same probem as phrairin..

    nam:
    : version conflict for package "Tcl": have 8.5.10, need exactly 8.4
    while executing
    "package require -exact Tcl 8.4"

    Any solution?

    ReplyDelete
  9. I have same probem as phrairin..

    nam:
    : version conflict for package "Tcl": have 8.5.10, need exactly 8.4
    while executing
    "package require -exact Tcl 8.4"

    Any solution?

    ReplyDelete
  10. I got an important post regarding the error mentioned, it may be helpful, pls go through the url: http://www.linuxquestions.org/questions/linux-networking-3/how-to-solve-%5Bversion-conflict-for-package-tcl-%5D-908362/

    ReplyDelete
  11. i want to know that can we use 802.11e in ns-2.35?
    If yes, then from where i get the files for it?
    If no, then on which NS2 we can simulate 802.11e?

    ReplyDelete
  12. I got nam executed only for the first time after the ns2 installation.
    But then I closed the terminal and again when I give "nam" ,the following appears.

    Can't find a usable tk.tcl in the following directories:
    /home/project/ns-allinone-2.35/tcl8.5.10/library/tk8.5 /home/project/ns-allinone-2.35/tcl8.5.10/tk8.5 ./lib/tk8.5 /home/project/ns-allinone-2.35/lib/tk8.5 ./library

    /home/project/ns-allinone-2.35/lib/tk8.5/tk.tcl: wrong # args: should be "::source fileName"
    wrong # args: should be "::source fileName"
    while executing
    "::source -encoding utf-8 /home/project/ns-allinone-2.35/lib/tk8.5/msgs/en.msg"
    ("uplevel" body line 1)
    invoked from within
    "uplevel 1 [list ::source -encoding utf-8 $langfile]"
    (procedure "::msgcat::mcload" line 10)
    invoked from within
    "::msgcat::mcload [file join $::tk_library msgs]"
    (in namespace eval "::tk::msgcat" script line 23)
    invoked from within
    "namespace eval msgcat {
    namespace export mc mcmax
    if {[interp issafe] || [catch {package require msgcat}]} {
    # The msgcat package..."
    (in namespace eval "::tk" script line 3)
    invoked from within
    "namespace eval ::tk {
    # Set up the msgcat commands
    namespace eval msgcat {
    namespace export mc mcmax
    if {[interp issafe] || [catch {p..."
    (file "/home/project/ns-allinone-2.35/lib/tk8.5/tk.tcl" line 21)
    invoked from within
    "source.orig /home/project/ns-allinone-2.35/lib/tk8.5/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
    "uplevel source.orig [list $fileName]"
    invoked from within
    "if [$instance_ is_http_url $fileName] {
    set buffer [$instance_ read_url $fileName]
    uplevel eval $buffer
    } else {
    uplevel source.orig [list $fileName]
    ..."
    (procedure "source" line 8)
    invoked from within
    "source /home/project/ns-allinone-2.35/lib/tk8.5/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
    "uplevel #0 [list source $file]"


    This probably means that tk wasn't installed properly.

    child process exited abnormally

    -------------------------------------------------------------------------------
    Could some please tell me the solution

    ReplyDelete
  13. ~Desktop/ns-allinone-2.35$ nam
    nam:
    [code omitted because of length]
    : version conflict for package "Tcl": have 8.5.10, need exactly 8.4
    while executing
    "package require -exact Tcl 8.4"

    can you please tell me what might be the problem, on Ubuntu 11.04 with ns2.35, ns command does give the "%" symbol but nam does not give the graphical window

    ReplyDelete

Post a Comment

Popular Posts