Network Simulator 2: a Simulation Tool for Linux
The ARIES (Advanced Research on Internet E-Servers) Project started in 2000 as part of the Open Systems Lab research activities at the Ericsson Corporate Unit of Research. Initially, the project aimed to find and prototype the necessary technology to prove the feasibility of an internet server that had the guaranteed availability, response time and scalability using Linux and open-source software. The project was successful, and it continued in 2001 to focus on enhancing the clustering capabilities of Linux to be the operating system of choice for the Mobile Internet servers. Many enhancements were added in the areas of load balancing, traffic distribution and security, in addition to IPv6 support.
One interesting question that came up was what is the impact of supporting IPv6 on other protocols used by different applications on our Linux clusters? To answer this question, we started a study investigating the effects of IPv6 support on other protocols, such as SCTP. Part of the study is to test applications in SCTP over IPv6. However, we did not have the time and resources to set up a lab with multiple nodes and applications that use SCTP over IPv6. Instead, we chose the next best solution, network simulation.
There is a growing recognition within different internet communities of the importance of simulation tools that help design and test new internet protocols. New services and protocols present challenges for testing. For instance, quality of service and multicast delivery require large and complex environments. Protocol designers recognize the advantages of simulation when computing resources are not available or are too expensive to duplicate a real lab setup. With simulation, you can do large-scale tests that are controlled and reproducible. This was exactly what we needed to build our case scenarios; the search started primarily for an open-source tool because most of our work targets the deployment of open-source software based on Linux.
Our target application is a real-time network simulation tool that we can use to define the different scenarios. A very interesting open-source tool we came across was Network Simulator 2 (NS2), which was developed by the Information Sciences Institute at the University of Southern California.
In this article, we summarize how to install and configure NS2 and look at two different simulation scenarios. The first scenario involves monitoring SCTP traffic between two nodes, and the second scenario looks at the behavior of web traffic and web applications over TCP over a six-node network.
NS2 is an open-source simulation tool that runs on Linux. It is a discreet event simulator targeted at networking research and provides substantial support for simulation of routing, multicast protocols and IP protocols, such as UDP, TCP, RTP and SRM over wired and wireless (local and satellite) networks. It has many advantages that make it a useful tool, such as support for multiple protocols and the capability of graphically detailing network traffic. Additionally, NS2 supports several algorithms in routing and queuing. LAN routing and broadcasts are part of routing algorithms. Queuing algorithms include fair queuing, deficit round-robin and FIFO.
NS2 started as a variant of the REAL network simulator in 1989 (see Resources). REAL is a network simulator originally intended for studying the dynamic behavior of flow and congestion control schemes in packet-switched data networks.
Currently NS2 development by VINT group is supported through Defense Advanced Research Projects Agency (DARPA) with SAMAN and through NSF with CONSER, both in collaboration with other researchers including ACIRI (see Resources). NS2 is available on several platforms such as FreeBSD, Linux, SunOS and Solaris. NS2 also builds and runs under Windows.
Simple scenarios should run on any reasonable machine; however, very large scenarios benefit from large amounts of memory. Additionally, NS2 requires the following packages to run: Tcl release 8.3.2, Tk release 8.3.2, OTcl release 1.0a7 and TclCL release 1.0b11.
The process of installing NS2 is straightforward yet lengthy. At the time of writing, the most recent version was 2.1b8. We are interested in the "all-in-one" package because it includes the source code that we want to patch in SCTP support.
You can download the all-in-one package from the NS2 home page (see Resources) into /usr/src and extract it as follows:
cd /usr/src tar xzvf ns-allinone-2.1b8.tar.gz cd ns-allinone-2.1b8
Because we want to examine a case scenario involving SCTP, we need to apply the SCTP patch to NS2 from the University of Delaware. The patch is available for the NS2 all-in-one 2.1b8 version and can be downloaded from the Protocol Engineering Lab home page (see Resources). With the Linux patch utility, you can update the NS2 source code to include support for SCTP by applying the patch:
patch -p0 < ns-allinone-2.1b8.sctp-rel2.2_patch_orig
In the same directory, there is a script named install that will configure, compile and install the required and optional NS2 components. There is no interaction with the user while installing; the script is completely automated. You must execute the script as superuser so that installation of binaries will be completed:
./install
When the installation process is complete, the following message will appear on your shell
Please put $CUR_PATH/bin:$CUR_PATH/tcl$TCLVER/unix:$CUR_PATH/ tk$TKVER/unix into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph. IMPORTANT NOTICES: [...]
Carefully follow all instructions given in the notices. The above-mentioned variables can be updated either by editing /etc/profile or changing environment variables directly. In case you updated /etc/profile, you need to source your new environment for the changes to take effect (i.e., source /etc/profile).
The NS2 validation suite will verify that all protocols are functional. This will fail if the install process was not completed; however, running validation is optional, and it consumes twice as much time as the compilation and installation process.
To run the validation suite:
cd ./ns-2.1b8 ./validate
Trending Topics
| You Need A Budget | Feb 10, 2012 |
| The Linux powered LAN Gaming House | Feb 08, 2012 |
| Creating a vDSO: the Colonel's Other Chicken | Feb 06, 2012 |
| Your CMS Is Not Your Web Site | Feb 01, 2012 |
| Casper, the Friendly (and Persistent) Ghost | Jan 31, 2012 |
| Razor-qt 0.4 - Qt based Desktop Environment | Jan 30, 2012 |
- Link to modlys
46 min 46 sec ago - I use YNAB because of the
58 min 10 sec ago - Search
6 hours 1 min ago - Question
6 hours 24 min ago - for the record
6 hours 26 min ago - That's disappointing. Thanks
8 hours 50 min ago - Well spotted. I've corrected
10 hours 19 min ago - This is a great program. We
13 hours 19 min ago - No Air for Linux
15 hours 8 min ago - HEWLETT PACKARD created
15 hours 18 min ago





Comments
Simulation for a High speed mass data transfer protocol
Hello everybody,
I'll be doing a project simulation for a high speed mass data transfer protocol.
Will be needing your help..
If anybody interested or want to contribute they are humbly invited.. :)
Just drop me a mail at:
kanishk@speedpost.net
is there any specific kernel support required for installing ns2
is there any specific kernel support required for installing ns-2.1b8-mcast
Change queue parameters dynamically during the simulation r
Dear friend,
I want to change parameters of a RED queue during the simulation but it seems that some parameters can be modified only before starting the simulation, not dynamically, while the simulation is in progress. For example the following subroutines works before $ns run command but it do not affect the behavior of the queue during the simulation( I want to change maxthresh_ and thresh_ after $ns run command):
#---------------------------------------------------------------
proc setREDParameters { redQueue MINth MAXth PER_MaxP Wq } {
$redQueue set thresh_ $MINth
$redQueue set maxthresh_ $MAXth
$redQueue set q_weight_ $Wq
$redQueue set linterm_ $PER_MaxP
return $redQueue
}
Who knows what I should do ?
Email:raeisy@shirazu.ac.ir
ns2-wsn
pls send me the ns2 code for any topology scheme preferably span in wireless sensor networking
voice security in ns-2
please, can i implement voice security in ns-2
all contributions would be appreciated.
cellular envirnoment in NS-2
i m doing the project in channel allocation in mobile communication, i wants to implement it in NS-2. i wants to create the wireless envirnoment. can anybody helps me in doing that?
Hi, Iam also doing project
Hi,
Iam also doing project in cellular networks. if you know how to simulate it in ns2 please tell me. My email: kiran.mvk123@gmail.com
Thankyou
About SCTP and NS-2.32
Now, I want to simulate SCTP on NS-2. And I use NS-2 2.32. I want to know does NS-2 2.32 support SCTP???
Thank for your help.