Ns (simulator)

Last updated
ns-3
Initial releaseJune 30, 2008;14 years ago (2008-06-30) [1]
Stable release
3.37 [2]   OOjs UI icon edit-ltr-progressive.svg / 1 November 2022;2 months ago (1 November 2022)
Repository
Written in C++ (core), Python (bindings)
Operating system Linux, FreeBSD, macOS
Platform IA-32, x86-64
Type Network simulator
License GNU GPL
Website www.nsnam.org   OOjs UI icon edit-ltr-progressive.svg

ns (from network simulator) is a name for a series of discrete event network simulators, specifically ns-1, ns-2, and ns-3. All are discrete-event computer network simulators, primarily used in research [3] and teaching.

Contents

History

ns-1

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 in 1989 from an earlier simulator known as REAL by S. Keshav.

ns-2

Ns-2 began as a revision of ns-1. From 1997 to 2000, ns development was supported by DARPA through the VINT project at LBL, Xerox PARC, UCB, and USC/ISI. In 2000, ns-2 development was supported through DARPA with SAMAN and through NSF with CONSER, both at USC/ISI, in collaboration with other researchers including ACIRI.

Features of NS2

1. It is a discrete event simulator for networking research.

2. It provides substantial support to simulate bunch of protocols like TCP, FTP, UDP, https and DSR.

3. It simulates wired and wireless network.

4. It is primarily Unix based.

5. Uses TCL as its scripting languages.

6. Otcl: Object oriented support

7. Tclcl: C++ and otcl linkage

8. Discrete event schedule

Ns-2 incorporates substantial contributions from third parties, including wireless code from the UCB Daedelus and CMU Monarch projects and Sun Microsystems.

ns-3

In 2003, 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.

Current status of the three versions is:

Design

ns-3 is built using C++ and Python with scripting capability. The ns library is wrapped by Python thanks to the pybindgen library which delegates the parsing of the ns C++ headers to castxml and pygccxml to automatically generate the corresponding C++ binding glue. These automatically generated C++ files are finally compiled into the ns Python module to allow users to interact with the C++ ns models and core through Python scripts. The ns simulator features an integrated attribute-based system to manage default and per-instance values for simulation parameters.

Requirements

To build ns you need a computer and a C++ compiler. We develop ns on several kinds of Unix (FreeBSD, Linux, SunOS, Solaris), so it installs smoothest there, but it should run on an Posix-like computer, possibly with some tweaking. Ns also builds and runs under Windows, see the dedicated Windows / Cygwin page. Simple scenarios should run on any reasonable machine, but very large scenarios benefit from large amounts of memory.

Ns is fairly large. The allinone package requires about 320MB of disk space to build. Building ns from pieces can save some disk space. (If multiple people want to share files in the ns build tree to save space, you may download a simple perl script, then follow the instruction in its README. There is detailed instruction from CS599b class of USC. You may also find discussions in the ns-users mailing list archive useful.)

Downloading and building ns

As of November 2005, ns is available at this SourceForge location.

Ns requires a modestly up-to-date installation of Tcl/Tk (with header files), and two additional packages: tclcl and otcl. Most OS installations do not come with full Tcl/Tk installations or with these other packages, so you will most likely need to install several packages.

Generic Linux, BSD, OS X, and Solaris instructions There are two typical ways to build ns: building each component individually ("from the pieces") or running a script that installs them all in one shot ("allinone"). If you just want to try it out quickly, you might try the allinone package. If you want to do C-level development, or save download time or disk space, or have trouble with allinone, you should build it from the pieces.

Installing the allinone package: This package has an install script that handles installation of Tcl/Tk, OTcl, tclcl, ns-2, nam-1 and other packages. Updating allinone: The "allinone" package is only updated for every release. If you are interested in the convenience of the allinone package for your platform, but are interested in using a fresher snapshot of the ns-2 code, this page is for you. Building ns from sources: Instructions (Note: The above allinone and pieces ISI pages need wikified and updated)

Below are some instructions specific to different systems.

Fedora Installation Guide Fedora installation guide Debian Installation Guide Debian installation guide Alternate installation guide for Debian with gcc 4.0.3 Ubuntu Installation Guide Wouter Horré maintains a PPA for ns/nam, so you can get ready-to-use deb packages there. If looking for the build-from-sources installation instructions for some reason, check below... [4]

Simulation workflow

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.

See also

Related Research Articles

dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.

<span class="mw-page-title-main">Windows Script Host</span> Automation Technology for Windows

The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.

<span class="mw-page-title-main">Arch Linux</span> Rolling release distribution of Linux

Arch Linux is an independently developed, x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a rolling-release model. The default installation is a minimal base system, configured by the user to only add what is purposely required.

<span class="mw-page-title-main">MacPorts</span> Package Manager for macOS

MacPorts, formerly DarwinPorts, is a package manager for macOS and Darwin. It is an open-source software project that aims to simplify the installation of other open source software. It's similar in function to Fink and the BSD ports collections.

<span class="mw-page-title-main">Waf (build system)</span>

Waf is a build automation tool designed to assist in the automatic compilation and installation of computer software. It is written in Python and maintained by Thomas Nagy.


This is a comparison of notable free and open-source configuration management software, suitable for tasks like server configuration, orchestration and infrastructure as code typically performed by a system administrator.

CheckInstall is a computer program for Unix-like operating systems which eases the installation and uninstallation of software compiled from source by making use of package management systems. After software compilation it can automatically generate a Slackware-, RPM-, or Debian-compatible package that can later be cleanly uninstalled through the appropriate package manager.

<span class="mw-page-title-main">Tk (software)</span> GUI toolkit or framework

Tk is a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages.

AC3D is a 3D design program which has been available since 1994. The software is used by designers for modeling 3D graphics for games and simulations - most notably it is used by the scenery creators at Laminar Research on the X-Plane (simulator). The .ac format has also been used in FlightGear for scenery objects and aircraft models.

The Debian build toolchain is a collection of software utilities used to create Debian source packages (.dsc) and Debian binary packages from upstream source tarballs.

<span class="mw-page-title-main">WeeChat</span> IRC client

WeeChat is a free and open-source Internet Relay Chat client that is designed to be light and fast. It is released under the terms of the GNU GPL-3.0-or-later and has been developed since 2003.

<span class="mw-page-title-main">Tkabber</span> Instant messaging client using Tk

Tkabber is a GPL instant messaging client for the XMPP protocol which uses the Tk toolkit for the GUI. It runs on anything to which Tcl/Tk is ported: almost any X-based system, Microsoft Windows, and Mac OS X.

tkWWW

tkWWW is an early, now discontinued web browser and WYSIWYG HTML editor written by Joseph Wang at MIT as part of Project Athena and the Globewide Network Academy project. The browser was based on the Tcl language and the Tk (toolkit) extension but did not achieve broad user-acceptance or market share, although it was included in many Linux distributions by default. Joseph Wang wanted tkWWW to become a replacement for r r n and to become a "swiss army knife" of networked computing.

<span class="mw-page-title-main">20-sim</span>

20-sim is commercial modeling and simulation program for multi-domain dynamic systems, which is developed by Controllab. With 20-sim, models can be entered as equations, block diagrams, bond graphs and physical components. 20-sim is widely used for modeling complex multi-domain systems and for the development of control systems.

Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful. Tcl casts everything into the mold of a command, even programming constructs like variable assignment and procedure definition. Tcl supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles.

In computer science and visualization, a canvas is a container that holds various drawing elements. It takes its name from the canvas used in visual arts. It is sometimes called a scene graph because it arranges the logical representation of a user interface or graphical scene. Some implementations also define the spatial representation and allow the user to interact with the elements via a graphical user interface.

References

  1. Henderson, Tom (2012-06-09). "upcoming ns-3.1 release" (Mailing list). ns-3 GSoC 2015 students. Archived from the original on 2012-03-27. Retrieved 2013-05-31.
  2. https://www.nsnam.org/releases/ns-3-37/; retrieved: 1 December 2022.
  3. "Publications « ns-3". Archived from the original on 2013-02-22. Retrieved 2012-08-30.
  4. "User Information - nsnam".