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

ns2 allinone installation error in ubuntu 13.10

i'm trying to install ns2 in my ubuntu 13.10 with the ns-allinone-2.35.tar.gz package. at first i was getting x11/* directory not found errors. after following some tutorial and installing following tools, helped me overcome those problems. sudo…
RatDon
  • 3,403
  • 8
  • 43
  • 85
5
votes
2 answers

How to find node id in NS2?

i would like to know how to get the node id where the packet is being processed. I tried name(), but it doesn't give the id of the node, like the one which is shown in trace file, where the source and destination of the packet hop are shown. In…
user1221876
  • 61
  • 1
  • 4
4
votes
0 answers

NS2-Modification of protocol

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?
Fidel Thachil
  • 81
  • 1
  • 5
4
votes
3 answers

why we use "const char* const* argv" instead of "char *"?

I'm working on simulating computer networks using "NS2 Simulator". I don't really understand why we should use const char* const* argv instead of char *? Can I use char * instead of that? There are many QA about this subject but I've confused about…
4
votes
1 answer

executing NS package in a bash file through Java

I am trying to execute a bash file through java in Ubuntu14.0. Bash file has the the code to generate a mobility model for NS2 "#!/bin/bash +x cd /home/maria/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen ns cbrgen.tcl -type cbr -nn 10 -seed 1…
Maria Khalid
  • 189
  • 2
  • 15
4
votes
1 answer

How to Add antsense protocol for ns2.35?

I'm working on ns2.35/ubuntu 14.04 LTS. I want to add ant-sense (ant colony optimization ) module in NS2 I have made changes to make file for INCLUDES & OBJ_CC. And when type make in the terminal get this error make: gcc command not found make :…
mariam
  • 41
  • 4
4
votes
1 answer

NS2 NAM not displaying transmissions

I'm new to NS2 and trying to set up a basic dumbell-shaped network simulation; I have one node with n TCP agents (the gateway or "gw") transmitting across a link to a remote node (remote gateway, "rgw"), which is connected to n TCP sinks (each agent…
ILikeFood
  • 400
  • 2
  • 8
  • 22
3
votes
1 answer

parsing ns2 trace file

I'm using NS 2.35 and am trying to determine the end-to-end delay of my routing algorithm. I think anyone with some good scripting experience should be able to answer this question, sadly that person is not me. I have a trace file, that looks…
user974703
  • 1,653
  • 4
  • 20
  • 27
3
votes
1 answer

Is ns2 installable for M1 Mac?

In our Lab, we were asked to install ns2. I tried running a script from a GitHub repo. But, after executing, it failed to run. I saw this ns3 google group. It mentioned that ns-3.33 was able to install in her system. But it didn't mention ns2. I…
3
votes
0 answers

Please Tell me how to implement OSPF routing protocol

Please help me by providing the code for ospf implementation(just basic implementation needed to show what ospf does). It can be any language like python(preferred),Java,c++,ns2,matlab etc.,. If I get code I can work on implementation and some…
3
votes
3 answers

Problem recompiling using make command in ubuntu

I m trying to modify some C++ files in ns2 and then recompile using make command. Although new .o file is created after make, the output is similar to that of previous C++ file (before modifying). can someone suggest what may be the reason behind…
user697451
  • 33
  • 3
3
votes
3 answers

ns found the right version of tclsh in /usr/bin/tclsh8.6 but it doesn't seem to be there anymore for ns2

When I write $ns in Linux terminal it shows this message: "When configured, ns found the right version of tclsh in /usr/bin/tclsh8.6 but it doesn't seem to be there anymore, so ns will fall back on running the first tclsh in your path. The wrong…
3
votes
4 answers

Network Animator not working while running a network simulation sample file

I am new to network simulation and I have recently installed ns2 by using ns-allinone-2.35. After installation I gave environment path settings and run a sample tcl file in terminal. The terminal shows the output and the folder contains the output…
NIMISHAN
  • 1,265
  • 4
  • 20
  • 29
3
votes
1 answer

tcl error extra characters after close-brace while executing for

set ns [new Simulator] #open nam file set nf [open out.nam w] $ns namtrace-all $nf #set variables of topology set lanNodes 5 set link("bandwidth") 5mb set link("delay") 2ms set link("queue") DropTail #define two routers set router0 [$ns node] set…
user3146469
  • 41
  • 1
  • 2
  • 6
3
votes
2 answers

Error in ls.cc file?

While installing I am getting follwing error In file included from linkstate/ls.cc:67:0: linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’: linkstate/ls.cc:396:28: required from…
Vijnana Yogi
  • 112
  • 1
  • 1
  • 8
1
2 3
42 43