Running two NS2 versions on single OS

The different versions of NS-2 can be installed on a computer by below given steps:

1. Install one version of NS-2 and create a .bash_profile1 for updating the environment variable
2. Install another version of NS-2 and create a .bash_profile2 for updating the environment variable
3. Then to switch from one version to another version use following commands
    a) source ~/.bash_profile1
    b) ./configure
    c) make install
    d) make clean
    e) make

So, to switch the library of command you need to appropriate bash_profile file as source for environment variables.



Solution given By: Prof. P. V. Bhat, Dept. of CSE, VCET, Puttur

14 comments:

  1. sir i am meenakshi i want to simulate grid topology for wireless networks. My problem is that nodes are not scattering. my code is like thisset gridspace [expr $val(x) / $val(rlen)]


    for {set i 0} {$i < $val(grdix) } {incr i} {
    for {set j 0} {$j < $val(gridy) } {incr j} {
    set a [expr $j + [expr $i * $val(rlen)]]
    $node_($a) set X_ [expr 0.0 + [ expr $i * $gridspace]]
    $node_($a) set Y_ [expr 0.0 + [ expr $j * $gridspace]]
    $node_($i) set Z_ 0.0
    }
    }

    ReplyDelete
  2. sir i have some error, please help me....thanks

    when i am
    a) source ~/.bash_profile1
    b) ./configure
    c) make install
    d) make clean
    e) make


    B:/usr/X11R6/lib:/usr/local/lib': not a valid identifier
    bash: 2.31/tcl8.4.14/unix:/home/mahri/ns-allinone-2.31/tk8.4.14/unix: No such file or directory

    ReplyDelete
  3. Good evening sir!
    I tried installing ns2.34 & ns2.35 on ubuntu 12.10 without internet.
    Is it possible to install without internet?
    If yes then how?
    If not then why it cant be installed without internet connection.
    Thanks in advance

    ReplyDelete
    Replies
    1. Hi,

      Yes, you need to use internet, because NS-2 requires few supporting libraries. So for downloading the library only internet is required.

      Delete
    2. Thank you very much sir!
      I dont have internet facility on my college computer!
      Can you give me link of files(supporting libraries) to be downloaded!
      So that I can download them at home!
      And how to install them manually !
      Right now i have downloaded ns2.35 all-in-one only!

      Delete
  4. Hello sir,
    I want to install ns-2.28 in windows 7 using cygwin. In that tcl,tk,otcl,tclcl make successfully. But, I got following error while building ns2:

    ./sctp/sctp.h:630:8: error: extra qualification ‘SctpAgent::’ on member ‘DumpSendBuffer’
    trace/trace.cc:185:1: warning: deprecated conversion from string constant to ‘char*’
    trace/trace.cc:185:1: warning: deprecated conversion from string constant to ‘char*’
    trace/trace.cc:185:1: warning: deprecated conversion from string constant to ‘char*’
    trace/trace.cc:185:1: warning: deprecated conversion from string constant to ‘char*’
    trace/trace.cc:185:1: warning: deprecated conversion from string constant to ‘char*’
    Makefile:90: recipe for target `trace/trace.o' failed
    make: *** [trace/trace.o] Error 1
    Ns make failed!
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
    Please guide me how to solve this?
    Waiting for your reply.

    ReplyDelete
  5. Hello,

    I have successfully installed ns-allinone-2.35 in my laptop. But , when I am executing make command, I am getting the following error:

    common/misc.cc: In member function ‘virtual int RandomCommand::command(int, const char* const*)’:
    common/misc.cc:151:31: error: ‘Random’ has not been declared
    common/misc.cc:156:11: error: ‘Random’ has not been declared
    common/misc.cc:158:4: error: ‘Random’ has not been declared
    Makefile:96: recipe for target `common/misc.o' failed
    make: *** [common/misc.o] Error 1

    I request you to suggest me about how to solve the above error?

    ReplyDelete
  6. Hello
    please help me I want install ns2.34 in ubuntu 13.04
    please help me

    ReplyDelete
  7. Hi, I m simulating leach protocol on Ns-2.29 mannasim, I have used script generator tool for leach tcl script, with periodic sensing and data dissemination after every 10 sec, I have noticed that most of the time data sent to the cluster heads is not received, I m confused why I m getting these results when nodes are using tdma slot to send their data to the cluster head. Please help!!! Do I néed to check recvData() function which sometimes work but not most of the time it doesn't? Because data from node to cluster head is sent in tdma slot so their is no collision visible in the log.

    ReplyDelete
  8. Sir,
    i m installing ns2.35 in ubuntu 12.04 and i am not able to compile i.e when i type ./install i m getting msg "bash: ./install no such file or directory

    ReplyDelete
    Replies
    1. Hi,

      Please check the location where u r trying to execute ./install.

      Delete
    2. location is where i have saved my ns-2.35 i.e home/ns/ns-2.35 $ ./install

      Delete
  9. ns command is not running on cygwin. "
    command not found error".

    ReplyDelete
  10. Please help with appropriate link for ns file. Command not found error.

    ReplyDelete