Questions tagged [ns2]

Network Simulator version 2, more popularly known as ns-2, is an open source event driven network simulator. With ns-2 one can simulate a wide range of network environments in wired, wireless or even in mixed mode. Major networking standards, including Ethernet, WLAN, satellite networks, Bluetooth, and so on, are supported by ns-2.

Overview:

ns-2 is written in C++ and OTcl. An overview of its architecture can be found in NS by Example. To simulate a problem one has to write a TCL script, which is executed by the ns interpreter. After successful execution, a trace file is obtained, which can be processed to evaluate different network parameters.

Installation:

ns-2 can be installed both on Linux or Windows. However, for Windows you would be required to install Cygwin first. Details about installation can be found in The Network Simulator: Building Ns.

Useful links:

641 questions
2
votes
2 answers

Bug in um-olsr for NS 2.34?

I think there is a bug in OLSR::degree() method: This method calculates the number of symmetric neighbors of node y, EXCLUDING all the members of N. I think OLSR_nb_tuple* nb_tuple = state_.find_nb_tuple(nb2hop_tuple->nb_main_addr()); should…
Shushan
  • 21
  • 2
2
votes
1 answer

Best software product to simulate connectivity issues for mobile testing

I need a product to simulate network latency for testing mobile applications (in particular iphone and android). I plan to set up a wifi router connected to a linux box, and write a number of scripts to approximate different types of connectivity…
DougW
  • 28,776
  • 18
  • 79
  • 107
2
votes
3 answers

External program call through java

I want to run NS2(which is an external program in linux) commands through java, using ProcessBuilder when I get the ns command not found error /home/maria/Documents/test.sh: line 4: ns: command not found Execution…
Maria Khalid
  • 189
  • 2
  • 15
2
votes
2 answers

How can i solve error while creating a simple underwater sensor network in AquaSim (ns2)?

I am new to ns2 and am using AquaSim which is an ns2 based simulator. I am trying to make a simple underwater wireless network. The following code works fine when "Propagation" and "Phy" are set to "TwoRayGround" and "WirelessPhy" respectively but…
Tariq Islam
  • 97
  • 10
2
votes
1 answer

how to draw a diagram in xgraph for my dropped file

I want to draw a diagram for my dropped file in ns2 (I'm a quite beginner). I've searched about it but the results made me so confused and couldn't try any of them because I don't know which code and which file do I need exactly.I have "tcl" file,…
john prk
  • 25
  • 4
2
votes
0 answers

ns2 DSR modifications

I am working on enhancing the DSR implementation of NS2. I have added some extra fields to the DSR header (in class hdr_sr in hdr_sr.h). I need to fill these additional fields at the time of dsr header construction. I am unable to figure out exactly…
2
votes
1 answer

I am getting the following error using ns2 help to debug. can't read "udp1": no such variable while executing "$cbr1 attach-agent $udp1"

set ns [ new Simulator ] set trf [ open 1.tr w ] $ns trace-all $trf set namf [ open 1.nam w ] $ns namtrace-all $namf # The below code is used to create the nodes. set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] This is used to give color to…
2
votes
0 answers

NS2 Network Simulator using TCL - CBR over UDP

I am working on a project and I am having problems getting my simulations to work. I have a total of 22 nodes, and when I set up my connections, I am not getting packets on certain links. TO be more specific, I have connectivity and successful…
gambler2841
  • 21
  • 1
  • 2
2
votes
1 answer

Error in TORA while implementing in ns2

When I run the code http://wpage.unina.it/marcello.caleffi/ns2/tora.cc and http://wpage.unina.it/marcello.caleffi/ns2/tora.h The error I get is invalid command name "int" while executing "int hdr_tora::offset_" (file "tora.cc" line 18) Can any one…
Meril
  • 21
  • 1
2
votes
1 answer

RPL implementation for NS2

I am trying to find the 6lowpan module in NS2. I didn't find any RPL or 6lowpan module in ns2. How can I implement the same in ns2? How can I get the program code?
2
votes
1 answer

Get the value for a variable from file using tcl

set lambda 1 set lambdaR [open LamdaValue.tr r] set Reader [read $lambdaR] close $lambdaR foreach {x} $Reader { set lambda $x } set $lambda [expr {$lambda + 1.0}] set LambdaW [open LamdaValue.tr w] puts $LambdaW "$lambda" I'm trying to…
Shaikha TheGreen
  • 115
  • 2
  • 12
2
votes
3 answers

How can I monitor a flow over wireless connection?

I am trying to monitor a tcp flow using flow monitor. attach-fmon wants link object which is not available in wireless connections. How can I solve this problem ? Are there any other solutions ? My code is here http://pastebin.com/f59241692 I got…
None
2
votes
1 answer

No drop packets using the error models for wireless scenario?

I am trying to use the error model in ns2 with wireless links, I am using ns2.33. I tried the uniform error model and the markov chain model. No errors from ns but when I am trying to find the dropped packets due to corruption I can not find any of…
None
2
votes
1 answer

JAXB HOW TO REMOVE ns2 in JDK7

in my code,when XmlSchema just have namespace attr, i use JAXB tranlate object to xmlstring,i can get what i want. the xml string like this:
s332401890
  • 121
  • 2
  • 8
2
votes
1 answer

NS2, packets larger than 100 byte are dropped on 802.15.4

I have a simple 802.15.4 simulation program (2 nodes, CBR traffic). If the size of CBR packets are less than 100, the packets are delivered without problem but as soon as you increase the packet size all packets are dropped. I guess it is because…
wmac
  • 1,023
  • 1
  • 16
  • 34
1 2
3
42 43