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

Malicious node in ns2

I have an error while implementing malicious node in ns2 for the AODV routing protocol $ns at 0.0 "[$node_(0) set ragent_] hacker"
-1
votes
1 answer

how to use a trace file as input for ns2?

I'm trying to use a trace file in a traffic generator, here is what i put so far in my input trace file: 0.000000 50 0.000404 50 0.020404 50 0.040404 50 0.060404 50 0.080404 50 0.100404 50 0.120404 50 0.140404 50 but i'm getting an error saying:…
Vladimir90
  • 15
  • 1
  • 3
-1
votes
1 answer

tcl code for binomial distribution

I am doing a project in networks where i want to run the simulation in ns2 ,i need to implement binomial distribution in tcl language .Can anyone guide me with a tcl script for the binomial distribution IP(Y=k)= NCk τkx(1− τ)N−k
-1
votes
1 answer

installing specific packages on ns2

I want to install ns2 on my computer. After trying in some ways like:installing on Ubuntu 13.10, or installing via cygwin on 64 bits windows 7, I faced with problems such as unable to find ns.exe in ns-2.26 or other versions directory of cygwin. …
john prk
  • 25
  • 4
-1
votes
4 answers

Error : Finished standard no-slot{} default handler [ns-2]

I have a problem with ns-2 simulation... When i run my simulation it gives me this Error : --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o52: no target for slot -1 _o52 type: Classifier/Port content dump: classifier…
Jenova
  • 72
  • 1
  • 11
-1
votes
2 answers

ns: 217: invalid command name "217" while executing "217"

I am simulating Wireless Sensor Network using NS2.35 and I get an error saying ns: 217: invalid command name "217" while executing "217" I have no where used such command throughput my tcl file. Can any one help why I get this error?
shim_mang
  • 323
  • 4
  • 17
-1
votes
1 answer

how to implement the aodv protocol in ns2

this is some part of my file AODV.tcl example of AODV implementation in ns2 the problem that i need to use the aodv.c and aodv.h in this implementation i don't know how to do this ?? i need to use all the functions in aodv.c file and i don't know…
-1
votes
1 answer

Can i find the Battery Status and Geo-location of a node in NS2?

I am working in NS2 and want to do the simulation of my new protocol. My protocol is regarding peer to peer overlay network. In the algorithm of my protocol i need to know the Battery Status and Geo Location of a node. I would like to know whether…
Wasi Xam
  • 51
  • 1
  • 4
-1
votes
1 answer

Implement P2P file transfer using NS2/NS3

I am working on a peer-to-peer file transfer project that should be implemented either using NS2 or NS3. It would be of great help if anyone could give some pointers or source codes using which I can work on. Note: A simple P2P file transfer code…
Nbn306
  • 11
  • 1
-1
votes
1 answer

how to measure the distance between to nodes

Could you please tell how to measure transmission range (distance) in meters between to nodes in wireless sensor network based on transmission power and sensitivity depending on RSSI value in NS2?
user3146469
  • 41
  • 1
  • 2
  • 6
-1
votes
3 answers

Split Lines seperated by spaces to arrays

I have a text file that contains output from a program. It reads like this: 1 2 23 24 54 21 87 12 I need the output to be arr[1]=2 arr[23]=24 arr[54]=21 arr[87]=12 and so on. Each line is seperated by a space. How can I parse the lines to the…
-1
votes
1 answer

You are using the tracefile format older than 1.0a5 nam cannot work

when i execute the my tcl file it will shows the following error "You are using the tracefile format older than 1.0a5 which will not allow you to run namgraph" iam using ns 2.35 nam 1.15 ubuntu 14.04 how to solve this error? anybody help me…
-1
votes
1 answer

How to apply the OSPF patch to ns2 2.35 on ubuntu 14.04

I have been using ns2 and nam for a long time on my ubuntu. Now I have to apply a patch (OSPF) to it. I have been searching for how to apply a patch in linux (as I'm kind of new in it) and all I got was: 1) $ tar xvf ns-allinone-2.35.tar.gz 2) $ cd…
Raein Hashemi
  • 3,346
  • 4
  • 22
  • 33
-1
votes
1 answer

Network simulator - reading packets from file

I would like to ask if it is possible add some packet file like .pcap or .txt (packet statistic) to ns input. For example, if I want insert some packets to device interface. Is it possible with ns2 / ns3? Thank you
-1
votes
1 answer

cbrgen Starting Simulation start

I need help to solve this problem : Starting Simulation... ns: start": invalid command name "start"" while executing "start"" I have a file bash and a file tcl, but I don't know why it give me always this problem. this is second me the…
Amiga 500
  • 19
  • 1
  • 9