ns (simulator)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
"ns-2" redirects here. For the fictional robot from the works of Isaac Asimov, see NS-2 (literary character). For the hepatitis C virus protein, see NS2 (HCV).
"ns-3" redirects here. For the hepatitis C virus protein, see NS3 (HCV).
For other uses of "NS", see NS (disambiguation).
ns-3 Network Simulator
ns-3 logo
Developer(s) ns-3 project[note 1]
Initial release June 30, 2008 (2008-06-30)[1]
Stable release 3.24 / September 15, 2015; 4 months ago (2015-09-15)[2]
Preview release Mercurial repository[3]
Development status Active
Written in C++ (core) Python (bindings)
Operating system GNU/Linux, FreeBSD, Mac OS X
Platform IA-32, x86-64
Type Network simulator
License GPLv2
Website www.nsnam.org

ns (from network simulator) is a name for series of discrete event network simulators, specifically ns-1, ns-2 and ns-3. All of them are discrete-event computer network simulators, primarily used in research[4] and teaching. ns-3 is free software, publicly available under the GNU GPLv2 license for research, development, and use.

The goal of the ns-3 project is to create an open simulation environment for computer networking research that will be preferred inside the research community:[citation needed]

  • It should be aligned with the simulation needs of modern networking research.
  • It should encourage community contribution, peer review, and validation of the software.

Since the process of creation of a network simulator that contains a sufficient number of high-quality validated, tested and actively maintained models requires a lot of work, ns-3 project spreads this workload over a large community of users and developers.

History[edit]

ns-1[edit]

The first version of ns, known as ns-1, was developed at Lawrence Berkeley National Laboratory (LBNL) in the 1995-97 timeframe by Steve McCanne, Sally Floyd, Kevin Fall, and other contributors. This was known as the LBNL Network Simulator, and derived from an earlier simulator known as REAL by S. Keshav. The core of the simulator was written in C++, with Tcl-based scripting of simulation scenarios.

ns-2[edit]

Ns began as a variant of the REAL network simulator in 1989 and has evolved substantially over the past few years. In 1995 ns development was supported by DARPA through the VINT project at LBL, Xerox PARC, UCB, and USC/ISI. Currently ns development is support through DARPA with SAMAN and through NSF with CONSER, both in collaboration with other researchers including ACIRI. Ns has always included substantal contributions from other researchers, including wireless code from the UCB Daedelus and CMU Monarch projects and Sun Microsystems. For documentation on recent changes, see the version 2 change log.

ns-3[edit]

A team led by Tom Henderson, George Riley, Sally Floyd, and Sumit Roy, applied for and received funding from the U.S. National Science Foundation (NSF) to build a replacement for ns-2, called ns-3. This team collaborated with the Planete project of INRIA at Sophia Antipolis, with Mathieu Lacage as the software lead, and formed a new open source project.

In the process of developing ns-3, it was decided to completely abandon backward-compatibility with ns-2. The new simulator would be written from scratch, using the C++ programming language. Development of ns-3 began in July 2006. A framework for generating Python bindings (pybindgen) and use of the Waf build system were contributed by Gustavo Carneiro.

The first release, ns-3.1 was made in June 2008, and afterwards the project continued making quarterly software releases, and more recently has moved to three releases per year. ns-3 made its twenty first release (ns-3.21) in September 2014.

Current status of the three versions is:

  • ns-1 is no longer developed nor maintained,
  • ns-2 is not actively maintained,
  • ns-3 is actively developed (but not compatible for work done on ns-2).

Instaling NS2[edit]

There are two ways of using NS2: On Linux Operating System or on Windows Operating System.

On Linux, after downloading NS2 follow these steps:

  1. Copy ns-allinone-2.35.tar.gz file to your home directory.
  2. Run terminal by pressing Ctrl+Alt+T .
  3. Execute "tar -xzvf ns-allinone-2.35.tar.gz" command.
  4. Execute "cd ns-allinone-2.35" command.
  5. Execute "./install" command.
  6. Execute "cd ns2.35" command.
  7. Execute "./validate" command.

On Windows 7, first install Cygwin. After that go through the following steps:

  1. Copy ns-allinone-2.35.tar.gz file to cygwin folder
  2. Execute "cd /" command.
  3. Execute "tar -xzvf ns-allinone-2.35.tar.gz" command.
  4. Execute "cd ns-allinone-2.35" command.
  5. Execute "./install" command.
  6. Execute "cd ns2.35" command.
  7. Execute "./validate" command.

Design[edit]

ns-3 is built using C++ and Python with scripting capability. The ns-3 library is wrapped by Python thanks to the pybindgen library which delegates the parsing of the ns-3 C++ headers to gccxml and pygccxml to automatically generate the corresponding C++ binding glue. These automatically-generated C++ files are finally compiled into the ns-3 Python module to allow users to interact with the C++ ns-3 models and core through Python scripts. The ns-3 simulator features an integrated attribute-based system to manage default and per-instance values for simulation parameters. All of the configurable default values for parameters are managed by this system, integrated with command-line argument processing, Doxygen documentation, and an XML-based and optional GTK-based configuration subsystem.

The large majority of its users focuses on wireless simulations which involve models for Wi-Fi, WiMAX, or LTE for layers 1 and 2 and routing protocols such as OLSR and AODV.

Components[edit]

ns-3 is split over couple dozen modules containing one or more models for real-world network devices and protocols.

ns-3 has more recently integrated with related projects: The Direct Code Execution extensions allowing the use of C or C++-based applications and Linux kernel code in the simulations.

Simulation workflow[edit]

The general process of creating a simulation can be divided into several steps:

  1. Topology definition: To ease the creation of basic facilities and define their interrelationships, ns-3 has a system of containers and helpers that facilitates this process.
  2. Model development: Models are added to simulation (for example, UDP, IPv4, point-to-point devices and links, applications); most of the time this is done using helpers.
  3. Node and link configuration: models set their default values (for example, the size of packets sent by an application or MTU of a point-to-point link); most of the time this is done using the attribute system.
  4. Execution: Simulation facilities generate events, data requested by the user is logged.
  5. Performance analysis: After the simulation is finished and data is available as a time-stamped event trace. This data can then be statistically analysed with tools like R to draw conclusions.
  6. Graphical Visualization: Raw or processed data collected in a simulation can be graphed using tools like Gnuplot, matplotlib or XGRAPH.

Criticism[edit]

ns-2 is often criticized[by whom?] because modelling is a very complex and time-consuming task, since it has no GUI and one needs to learn scripting language, queuing theory and modelling techniques. Also, of late, there have been complaints that results are not consistent (probably because of continuous changes in the code base) and that certain protocols have unacceptable bugs.[citation needed]

ns-3 is often criticized[by whom?] for its lack of support for protocols (like WSN, MANET etc.) which were supported in ns-2, as well as for the lack of backward compatibility with ns-2. As with ns-2, ns-3 is also time consuming to learn and use compared to GUI-based simulators.

See also[edit]

Notes[edit]

  1. ^ Tom Henderson, Mathieu Lacage, George Riley, Mitch Watrous, Gustavo Carneiro, Tommaso Pecorella and others.

References[edit]

  1. ^ Henderson, Tom (2012-06-09). "upcoming ns-3.1 release" (Mailing list). ns-3 GSoC 2015 students. Retrieved 2013-05-31. 
  2. ^ "ns-3.24 released". ns-announce. 
  3. ^ "ns-3-dev". ns-3 project. Retrieved 26 December 2012. 
  4. ^ http://www.nsnam.org/overview/publications/

External links[edit]