19-05-2014, 04:57 PM
NS2 The Network Simulator
NS2 The Network .pdf (Size: 39.15 KB / Downloads: 15)
What is NS-2
NS is an object-oriented,discrete event simulator targeted at networking
research. Ns provides substantial support for simulation of TCP
, routing, and
multicast protocols over wired and wireless (local and satellite) networks. Later
NS-2 (version 2) was developed at UC Berkeley in C++ and OTcl (Object-
oriented extension of Tcl)
Installation
Download NS2 version 2.31 from here
Unzip the tar archive
Open Terminal and Go to the ns2 root directory. Here ~/ns-allinone-2.31
Run ./install script
CBR Traffic Generation
This is done with the help of cbrgen.tcl file executing with ns command
Open terminal in ~ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen
ns cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed] [-mc connections] [-rate
rate]
-type traffic type (tcp, udp/cbr)
-nn the highest node number(node number will be 0 to nn)
-seed seed for random variable generation which is used to create random
number of source-destination pair
-mc maximum number of connections; i.e.; source-destination pair
-rate it is the inverse of the interval between packet transmission & should
be <0