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
0 answers

.Error message wrong # args: should be "for start test next command" coming

I got the error message wrong # args: should be "for start test next command when trying to run the following code: proc finish {} { global ns nf $ns flush-trace #Close the trace file close $nf #Execute nam on the…
user3428116
  • 21
  • 1
  • 2
2
votes
1 answer

Running virtual box is causing a restart of the host system?

I am trying to use ns2 tool through virtual box. Every time I run the virtual box the host system is getting restarted. How to resolve this issue?
mounika
  • 39
  • 8
2
votes
1 answer

MAODV : has no member named

void AODV::rt_resolve(Packet *p) { struct hdr_cmn *ch = HDR_CMN(p); struct hdr_ip *ih = HDR_IP(p); aodv_rt_entry *rt; ch->xmit_failure_ = aodv_rt_failed_callback; ch->xmit_failure_data_ = (void*) this; rt =…
2
votes
0 answers

NS2 Simulation for Wireless Sensor Networks

I have a simulation project for wireless sensor networks. In the project I'm suppose to simulate two WSN protocols for performance and security. Protocols like ZigBEE, SPINS. Tinysec, LEDS, LiSIP. Any two from the list. The simulation is to be done…
Pravin Agre
  • 373
  • 2
  • 5
  • 17
2
votes
1 answer

how to implement multiple queues in Ns-2

In my project I want to differentiate the incoming traffic into multiple classes like critical, normal, delay sensitive packets, want to queue each type of packet in separate queues having different priority, I define highest priority in the order…
hs.chandra
  • 707
  • 1
  • 7
  • 19
2
votes
0 answers

How do I implement a BFS in ns2 for a wired scenario?

How do I implement a BFS in ns2 for a wired scenario? Is there a way to find the neighbor of a node? I want to calculate the aggregate demand of a node based on its child nodes, where demand of leaf nodes is defined.
2
votes
1 answer

Simulation of TCP sync attack in ns2

How to simulate TCP sync attack in ns2? Please provide some guidelines that how to simulate this DOS Attack in ns2 ?
user1640277
2
votes
1 answer

Calculate throughput in NS2 using AWK

My senario in NS 2.29 has 5 nodes which each node has 2 interfaces to expect node 0 and node 4 and node 0 wants to send packet to node 4. The protocol I've used is AODV and type of nodes is wireless I want to calculate receive packet / send…
starrr
  • 1,013
  • 1
  • 17
  • 48
2
votes
1 answer

Starting to work with 802.11p WAVE for VANET

I was planning on building an application based on inter vehicle communication. Initially I thought of using the standard wifi available on laptops and mobie phones, but then I came across WAVE protocol (IEEE 802.11p) (as it is specifically…
Idea Inside
  • 197
  • 1
  • 4
  • 15
1
vote
0 answers

create a new packet similar to that of RREQ in AODV routing protocol

I want to add a new packet in aodv routingprotocol similar to that of RREQ packet.How can I do that? I tried by adding a new packet type(npack) by changing the name of RREQ in aodv_packet.h. I also added sendnpack and recvnpack in aodv.cc, similar…
justified
  • 95
  • 1
  • 3
  • 12
1
vote
1 answer

How to change the delay of a link in NS2 simulation?

I need to run a NS2 simulation that the delay of a link will change during the runtime, and I use following procedure in tcl script: $ns delay $node3 $node4 $delay_time to change the delay in a link between $node3 and $node4. But it only works…
YeJiabin
  • 1,038
  • 1
  • 9
  • 17
1
vote
0 answers

nam: child process exited abnormally

Could not open GUI of network simulator using nam
Shaunak
  • 23
  • 5
1
vote
1 answer

What to do get rid of this error in Ubuntu?

set tracefile [open out.tr w] $ns trace-all $namfile When I am running the above TCL code this is showing in terminal. I have just started learning TCL so don't know what to do anything this error. can't read "namfile": no such variable while…
1
vote
1 answer

Network Animator not working in ubuntu 20.04

i successfully installed NAM on NS2, but when i run NAM with command nam, it gives following output. nam: Can anyone help , what the isssue is
1
vote
3 answers

TCL script generator for NS2

Is there an open source TCL script generator for NS2? There is NAM that comes with NS2. Is there anything else. A web based one would be great!
SparrowG
  • 221
  • 1
  • 4
  • 13