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:
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
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Google's SwiftShader Released
- Interview with Patrick Volkerding
- Tech Tip: Really Simple HTTP Server with Python
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
- Returning Values from Bash Functions
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide