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
3
votes
3 answers

ns2 installation error on Ubuntu 12.10

I try to install ns-2.35 all-in-one package on my Ubuntu 12.10 I type "./configure" and then "make" in folder "tcl-8.5.10" and folder "tk8.5.10" There is no make error. But when I enter folder otcl-1.14 and type "./configure" it shows an…
DartKouth
  • 65
  • 3
  • 11
3
votes
1 answer

"can't read:variable is array" error in ns2

In ns2, I declared a simple array using array set ktree {} then I tried to use it as a GOD variable as create-god $ktree but this gives the error can't read "ktree": variable is array while executing "create-god $ktree {}" Any help is greatly…
Monty Swanson
  • 695
  • 16
  • 41
2
votes
1 answer

Promiscuous mode in AODV NS2

As I do my project of "detection and prevention of black hole attack, I need to monitor the packet flow to the nighbouring node. That for, I need to use the promiscuous mode in AODV. I have found some tutorial in the following link but there too its…
Fidel Thachil
  • 81
  • 1
  • 5
2
votes
1 answer

NS2-Modification of protocol - AODV

I want to count the number of packets being sent from a node in NS2 at run time. That for I would like to make changes in AODV protocol using C++. Could someone help me how to proceed? I Tried editing the recv() function to count the number of…
Fidel Thachil
  • 81
  • 1
  • 5
2
votes
1 answer

How to get nam working with ns2 simulator

Currently I have installed ns2 in my linux pc and when I run the following on terminal $ ns sampleprog.tcl all I get is nam: There should have been a nam pop up window opening instead. I don't know how to solve this problem as I have installed…
2
votes
2 answers

NS3 bash: ./waf: No such file or directory error

charlie@charlie:~/Desktop/ns-allinone-3.36.1/ns-3.36.1$ ls AUTHORS build-support CMakeLists.txt doc ns3 scratch testpy.supp VERSION bindings CHANGES.md contrib examples README.md src utils build…
2
votes
0 answers

sybil attack simulation by ns2 in Ubuntu

this is an anomaly detection simulation ns-2.35 I ran in Ubuntu ver16.04 *set val(chan) Channel/WirelessChannel ;# channel type # here we detect the channel Wireless channel or Satelite channel set val(prop) …
2
votes
0 answers

Problem while trying to setup a connection between two base stations in NS-2

I am new to NS-2 and am trying to create an environment whereby a mobile node(UE) would act as a dummy base station for its nearby mobile nodes. Hence any data requested from them would be routed from the UE and then to the requesting node. But i am…
2
votes
2 answers

NS2: Random delay for links

I want to simulate the above network in NS2 and as you can see nodes 2 and 6 have links with variable delays. These variable delays should be random values between 5ms and 25ms. This is how I make the links: #Create six nodes set n1 [$ns node] set…
Amin Bashiri
  • 198
  • 1
  • 2
  • 16
2
votes
0 answers

NS2: How to simulate nodes running two different mac protocols in a single network?

I want to modify the existing routing protocol and simulate how well does it work on a network with two different types of nodes, cars with 802.11p and AP on the roadside with 802.3. Does anyone know how to run a routing protocol simulation on a…
周伯威
  • 29
  • 2
2
votes
1 answer

NS2 program error: Showing no class variable

My program is showing this error: warning: no class variable LanRouter::debug_ see tcl-object.tcl in tclcl for info about this warning. --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o12: no target for slot -1 …
Saurav Kumar
  • 61
  • 1
  • 12
2
votes
0 answers

how can i solve this problem amorphous/amorphous.cc:89:15: error: ‘rqueue’ was not declared in this scope

how can i solve this problem. ( i refereed to site http://nile.wpi.edu/NS/ i want to extend that example.) amorphous : i have done all off step and then i have to ran make and finally while running make i face with error…
2
votes
0 answers

TCP NewJersey displayed RTT incorrect

I am doing a comparison between TCP Protocols over Satellites in NS2. To get the RTT (Round Trip Time) with TCP Jersey, I call something like that proc finish {} { global tcp set rtt [$tcp set rtt_] } where $tcp is the Agent attached to my…
F. PEREZ
  • 21
  • 3
2
votes
1 answer

What is the reason of error "Floating point exception (core dumped)"

I'm trying to save output $result of proc Inverse2 which get scheduled after every one second (it is called inside another procedure,that procedure is rescheduled for 1s that is why Inverse2 procedure) I want to get output which is {x y now} and…
2
votes
1 answer

How to implement two dimensional arrays in tcl

Need assistance in creating two dimensional arrays. I need to create the below scenario nblist_0 = {1,2,3,4} nblist_1 = {3,7,5,9,1} nblist_2 = {7,4,9,2,5} nblist_3 = {1,2,4,6} nblist_4 = {1,5,4} ... Since my logic hereafter follows the above two…
1
2
3
42 43