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
-1
votes
1 answer

IF and ! = ns2 error

I have a problem with path in a tcl file. I tried to use source " /tmp/mob.tcl " and this path in bash file : /opt/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest/setdest -v 1 -n $n -p 10 -M 64 -t 100 -x 250 -y 250 >> /tmp/mob.tcl The…
Amiga 500
  • 19
  • 1
  • 9
-1
votes
1 answer

awk code to calculate throughput for some nodes

In ns-2 trace files for wireless nodes, I want to calculate throughput for some nodes at once. How to make if condition for specific nodes? The problem is because of "_" between node number. It is very time consuming if I check node one by one…
bnbfreak
  • 353
  • 3
  • 14
-1
votes
1 answer

i make a file.tcl when i execute an error produced

#Create a simulator object set ns [new Simulator] #Open the nam trace file set nf [open out.nam w] $ns namtrace-all $nf #Define a 'finish' procedure proc finish {} { global ns nf $ns flush-trace #Close the trace…
-1
votes
1 answer

Implementing wireless sensor networks using NS2

I am simulating a wireless sensor network in NS2 . I want to implement hierarchical static wireless sensor networks using clusters? How clustering be achieved in ns2. Also i wish to implement group deployment. can anyone help?
user3282433
  • 1
  • 1
  • 2
-1
votes
1 answer

Adding vector to NS2; Compiler error

I tried to add # include to a NS2 simulator file but i'm facing problems. i'm getting this error (I've used another computer with g++ 4.6 rather than old g++ 4.4). why only including causes error? `g++ -c -Wall…
-1
votes
1 answer

NS-2 (Network Simulator) error getting TCP window: "error when calling class $cls: $args" $..."

I'm trying to follow a Network Simulator tutorial using NS-2 version 2.35 on Ubuntu, but I can't seem to see the TCP window size and the error I get seems useless. The code: set ns [new Simulator] set tcp [new Agent/TCP] $tcp set window_ 1 # This…
EM0
  • 5,369
  • 7
  • 51
  • 85
-1
votes
1 answer

can't save changes to Makefile on Fedora 19

So I'm installing NS2.35 on my Fedora 19 per this link - http://wpage.unina.it/marcello.caleffi/ns2/fedora.html Now everything about this installation is going smoothly but I'm hitting a snag when it comes to cut/copy/paste/save as activities .…
Raaj
  • 1,180
  • 4
  • 18
  • 36
-1
votes
1 answer

ns2 installation Permission denied

The following error , while trying to install ns-2.33 on ubuntu 12.04. How can i solve this problem m -f embedded-tcl.cc ./tcl2c++ et_tcl ../lib/tcl8.4/init.tcl ../lib/tcl8.4/history.tcl ../lib/tcl8.4/word.tcl …
user2677682
  • 101
  • 6
-1
votes
1 answer

NS2: simulating nodes running two different mac protocol

I wanted to simulate nodes, running different mac protocols so that they can co exist/ transfer packet b/n each other with out causing any problem on each other..how can I do that...especially how can I modify simple wireless simulation…
robera
  • 11
  • 1
  • 3
-1
votes
1 answer

dsrc vanet ns2 tcl scipt not working

i ve been working for weeks to run this tcl script (NOT written by me )for dsrc but i never succeeded. please i need ur help. the error is: invalid command name "10" while executing "$val(payload)" invoked from within "set payload…
-1
votes
1 answer

ns2 to attach more than one applications to one agent

Can anyone tell me how should I fix this problem? I have a problem in attaching more than one applications to one agent. (I am running ns2.35 on Ubuntu12.10) There are two nodes(Source and Destination) in my environment and here are some…
DartKouth
  • 65
  • 3
  • 11
-1
votes
1 answer

ns2 projects in wireless networks

how to construct tree in ns2 and how to write routing protocol in ns2? clustered nodes to be arranged in tree structure and code for deflection routing in ns2. I also need to know how to increase the energy of a node and how to make a node inactive.
-1
votes
2 answers

Running aodv in ns2.34

Can someone tell me how to run aodv protocol in ns2.34 .... aodv is already installed in it ... I have tried command g++ aodv.cc to compile it but it is showing error ?? linux@ubuntu :~/ns-allinone-2.34/ns-2.34 $ g++ aodv.cc g++: aodv.cc: No…
-1
votes
1 answer

How to Set the MTU(Maximum Transmission unit) in NS2?

I am using NS2 simulator for doing some network simulation and having some problem while setting the MTU value ie maximum transmission unit. I want know what is the default value of MTU in NS2 and how can i change this value according to my need? I…
Alok Sen
-2
votes
1 answer

Calculate average packet travel speed in NS2 using AWK

I need to calculate average packet travel speed in ns2. I have to write this formula in awk program. But I have no idea how to do it. n is the number of received packet, and s is the distance when the packet is transmitted. Any answer will be very…
1 2 3
42
43