Jain’s fairness index: rates the fairness of a set of values where there are n users and xi is the throughput for the i th connection. The result ranges from 1/n (worst case) to 1 (best case), and it is maximum when all users receive the same allocation. This index is k/n when k users … Continue reading
The new trace format as seen above can be can be divided into the following fields : Event type In the traces above, the first field (as in the older trace format) describes the type of event taking place at the node and can be one of the four types: s send r receive d … Continue reading
CSS-OLSR is a Cooperative Security Scheme for the OLSR protocol. A basic version of this security scheme was published in the IST Mobile and Wireless Communications Summit 2006 (check here). In this page we provide the code (based on UM-OLSR) which was used to perform simulations of the proposed security scheme. We also present a … Continue reading
GnutellaSim is a scalable packet-level Gnutella simulator that enables the complete evaluation of the Gnutella system with a detailed network model. GnutellaSim is based on a framework we designed for packet-level peer-to-peer system simulation , which features functional isolation and a protocol- centric structure, among other characteristics. The framework is designed to be extensible to … Continue reading
IRTF P2PRG A. Brown Internet Draft Stirling Expires: July 26, 2006 M. Kolberg Stirling January 27, 2006 Tools for Peer-to-Peer Network Simulation draft-irtf-p2prg-core-simulators-00.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, … Continue reading
Description: The source is available for use in the Public Domain under the General GPL (C) UMBC. Please refer to the license terms in the source code. The tarball contains the full source code and documentation for an intrusion detection system we have developed for Mobile ad hoc networks. The zipped tarball also contains libpcap … Continue reading
0. MAC in ns-2 LAN is within Berkeley Architecture, WLAN cannot create with “newLan” command Ethernet could be created as a LAN with common bandwidth and delay. 1. The general structure of MAC related sourcecode: mac.cc, mac.h MAC class is derived from Bi-Connector class. Local Variables: pktTx_ pktRx_ Macstate_ : index_ : mac address Basic … Continue reading
NOAH is a wireless routing agent that (in contrast to DSDV, DSR, …) only supports direct communication between wireless nodes or between base stations and mobile nodes in case Mobile IP is used. This allows to simulate scenarios where multi-hop wireless routing is undesired. NOAH does not send any routing related packets. It has been … Continue reading
In 802.11 wireless LAN with ad hoc mode, there is no message routing. Any two nodes communicate directly –> You use DumbAgent (instead of AODV, DSR, DSDV,…) as the network layer protocol when no routing is required in your test scenario – this is when you need to calculate MAC layer performance:
Undesrstanding Carrier Sense & Back Off: Consider the following two questions about IEEE 802.11 Standard: Carrier Sense is provided by the physical layer, thus, when MAC layer get a packet to transmit. It will initiate a carrier sense mechanism, and it took >= DIFS time to determine that the channel is free, thus, at least … Continue reading
General Architecture of a mobile node in ns-2: the relationship of MAC could be found in ns-mobilenode.tcl. The source code: Actually, from top to down path, the structure is ll —> ifq —-> mac —> netif . for packets going up, it is netif —> mac —>ll. Thus, ifq is only used for down … Continue reading
Notice that by default, all packet headers are included. A diagram: Common-header: Access method: What’s in common header (refer to ./common/packet.h) ch->ptype() : protocl type. e.g. PT_DSR shows this is a signaling message for DSR protocol, not a normal DATA packet ch->size(); ch->direction() : Up or Down ch->uid() ch->iface(): Interface ch->next_hop(): next hop for … Continue reading
1. Node Movement and Topology Generation Instead of specifying and control each nodes’ position and movement pattern, we use a CMU tool “setdest” to generate large number of nodes and there movements. The tool use a random waypoint model. setdest Setdest tool is used to generate the positions of nodes and their moving speed and … Continue reading
In this section, you are going to learn to use the mobile wireless simulation model available in ns. The section consists of two parts. In the first subsection, we discuss how to create and run a simple 2-node wireless network simulation. In second subsection, we will extend our example (in subsection 1) to create a … Continue reading
Experiment Specific Instructions To analyze the given problem you have to write a Tcl script and simulate with ns2 Begin by specifying the trace files and the nam files to be created Define a finish procedure Determine and create the nodes that will be used to create the topology. Here in our experiment we are … Continue reading
Traffic generation is described in Chapter 32 of the ns Manual. Some extracts: Applications objects An application object may be of two types, a traffic generator or a simulated application. Traffic generator objects generate traffic and can be of four types, namely, exponential, pareto, CBR and traffic trace. Application/Traffic/Exponential objects Exponential traffic objects generate On/Off … Continue reading
The format of a trace file generated by the simulation follow the sequence below: The first field is the event type. It can have the values “r”, “+”, “-”, ”d” for “received”, “queue”, “dequeue”, and “dropped” and “r”, “s”, “f”, “D” for “received”, “sent”, “forward”, and “dropped” respectively; The second field gives the time at … Continue reading
Let’s run the test tcl script and show how to analyze. The trace file “out.tr” is obtained by running ns2 with the script ns2/tcl/ex/wireless.tcl, and you can analyze it with this Perl script “analysis.pl“. out.tr:
(1) In an xgraph data file list some number of data sets (one per curve). A data set contains an ordered pair of X Y coordinates, each point on a separate line. The name of the data set can be specified by a line beginning with a double quote. Here is some sample data for … Continue reading
[Source: http://www.isi.edu/nsnam/ns/tutorial/nsscript4.html%5D One part of the ns-allinone package is ‘xgraph’, a plotting program which can be used to create graphic representations of simulation results. In this section, I will show you a simple way how you can create output files in your Tcl scripts which can be used as data sets for xgraph. On the … Continue reading
Here is a collection of trace analysis utilities that have been useful: Much parsing is easy if you can extract columns. Here is a helper-perl utility called “column” that breaks a text output into columns, separated by whitespace. It is used by many of the scripts below. Here is a simple perl called stats.pl script … Continue reading
This section shows a trace analysis example. Example 4 is the same OTcl script as the one in the “Simple Simulation Example” section with a few lines added to open a trace file and write traces to it. For the network topology it generates and the simulation scenario, refer to Figure 4 in the “Simple … Continue reading
A NS packet is composed of a stack of headers, and an optional data space (see Figure 12). As briefly mentioned in the “Simple Simulation Example” section, a packet header format is initialized when a Simulator object is created, where a stack of all registered (or possibly useable) headers, such as the common header that … Continue reading
This section talks about the NS components, mostly compound network components. Figure 6 shows a partial OTcl class hierarchy of NS, which will help understanding the basic network components. For a complete NS class hierarchy, visit http://www-sop.inria.fr/rodeo/personnel/Antoine.Clerget/ns. Figure 6. Class Hierarchy (Partial) The root of the hierarchy is the TclObject class that is the superclass … Continue reading
This section talks about the discrete event schedulers of NS. As described in the Overview section, the main users of an event scheduler are network components that simulate packet-handling delay or that need timers. Figure 5 shows each network object using an event scheduler. Note that a network object that issues an event is the … Continue reading
This section shows a simple NS simulation script and explains what each line does. Example 3 is an OTcl script that creates the simple network configuration and runs the simulation scenario in Figure 4. To run this simulation, download “ns-simple.tcl” and type “ns ns-simple.tcl” at your shell prompt. Figure 4. A Simple Network Topology and … Continue reading
As mentioned in the overview section, NS is basically an OTcl interpreter with network simulation object libraries. It is very useful to know how to program in OTcl to use NS. This section shows an example Tcl and OTcl script, from which one can get the basic idea of programming in OTcl. These examples are … Continue reading
NS is an event driven network simulator developed at UC Berkeley that simulates variety of IP networks. It implements network protocols such as TCP and UPD, traffic source behavior such as FTP, Telnet, Web, CBR and VBR, router queue management mechanism such as Drop Tail, RED and CBQ, routing algorithms such as Dijkstra, and more. … Continue reading
Attention: before you install ns-2 , be sure that you have installed following packages: tcl8.4 tk8.4 tcl8.4-dev tk8.4-dev I found that NS-2 all-in-one package is lack of the check to Xmu library when install NAM. The “configure” script of NAM doesn’t check Xmu library but can generate the “makefile”. Thus, you assume that everything is … Continue reading
Source: http://wiki.splitbrain.org/ns2 Note For the wget commands below get the correct download URLs from the sites linked at http://www.isi.edu/nsnam/ns/ns-build.html#pieces In the following I will download and unpack all needed sources to a directory named ns2install $> mkdir ns2install $> cd ns2install Debian Libraries Beside the usual stuff for compiling programs like gcc, g++ and make … Continue reading
Objective: install ns-allinone-2.26 in Ubuntu 5.10 Breezy Software needed: gcc-3.3, g++-3.3 (ns2.26 cannot be compiled with gcc >= 4.0), build-essential, autoconf, automaken, libxt-dev (tk need it), libxmu-dev (nam need it) To do: 1. apt-get install build-essential 2. apt-get install gcc-3.3 g++-3.3 autoconf automake-1.9 libxt-dev 3. go to /usr/bin, del softlink to gcc, g++ 4. ln … Continue reading
Get the allinone source. $ cd ~myname $ wget http://www.isi.edu/nsnam/dist/ns-allinone-2.28.tar.gz Modify build for GDB debugger. $ tar xzf ns-allinone-2.28.tar.gz $ cd ns-allinone-2.28 $ vim install Add the –enable-symbols option on line 408 so, ./configure –enable-gcc –disable-shared –prefix=$CUR_PATH || die “tcl8.3.2 configuration failed! Exiting …” becomes, ./configure –-enable-symbols –enable-gcc –disable-shared –prefix=$CUR_PATH || die “tcl8.3.2 configuration failed! … Continue reading
Download ns-2.27 from: http://www.isi.edu/nsnam/dist/ns-allinone-2.27.tar.gz To install ns 2.27 in Red hat, there are following steps: 1. tar -xzf * 2. ./install change .bash_profile and add some environment variables. put /home/ns-allinone-2.27/bin:/home/ns-allinone-2.27/tcl8.4.5/unix:/home/ns-allinone-2.27/tk8.4.5/unix into your PATH environment; so that you’ll be able to run itm/tclsh/wish/xgraph. IMPORTANT NOTICES: You MUST put /home/ns-allinone-2.27/otcl-1.8, /home/ns-allinone-2.27/lib, into your LD_LIBRARY_PATH environment variable. If … Continue reading