Ns (simulator)
Encyclopedia
ns is a name for series of discrete event
Discrete Event Simulation
In discrete-event simulation, the operation of a system is represented as a chronological sequence of events. Each event occurs at an instant in time and marks a change of state in the system...

 network simulators
Network simulation
In communication and computer network research, network simulation is a technique where a program models the behavior of a network either by calculating the interaction between the different network entities using mathematical formulas, or actually capturing and playing back observations from a...

, specifically ns-1, ns-2 and ns-3. These simulators are used in the simulation of routing
Route assignment
Route assignment, route choice, or traffic assignment concerns the selection of routes between origins and destinations in transportation networks. It is the fourth step in the conventional transportation forecasting model, following trip generation, trip distribution, and mode choice...

 protocols, among others, and are heavily used in ad-hoc networking research, and support popular network protocols, offering simulation results for wired and wireless networks alike.

Design

ns-3 is built using C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 and Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 and scripting is available with either language. Split over 30 modules
Modular programming
Modular programming is a software design technique that increases the extent to which software is composed of separate, interchangeable components called modules by breaking down program functions into modules, each of which accomplishes one function and contains everything necessary to accomplish...

, features of ns-3 include
  • Callback-driven events
  • Attribute system that manages default and per-object simulation values
  • Helpers that allow using simpler API when configuring simulations

Work Flow for NS

It include following four steps:
  • 1. Implement protocol models
  • 2. Setup simulation scenario i.e. Make Tcl file in which you mention what type of scenario you want, e.g. no of nodes, kind of agent working on nodes etc.
  • 3. Run simulation i.e. Run the tcl file
  • 4. Analyse simulation results i.e. by GNU Awk and gnuplot

History

ns began development in 1989 as a variant of the REAL network simulator and it is currently maintained by volunteers. Long-running contributions have also come from Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 and the UCB Daedelus and Carnegie Mellon
Carnegie Mellon University
Carnegie Mellon University is a private research university in Pittsburgh, Pennsylvania, United States....

 Monarch projects

ns-2

ns-2 was built in C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 and provides a simulation interface through OTcl
OTcl
OTcl usually refers to an object oriented extension of Tcl created by David Wetherall at MIT. It is used in network simulator and usually run under Unix environment...

, an object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 dialect of Tcl
Tcl
Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration", according to the author, with programmers devising their own languages intended to be embedded into applications, Tcl gained acceptance on its own...

. The user describes a network topology by writing OTcl scripts, and then the main ns-2 program simulates that topology with specified parameters. It runs on Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

, FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

, Solaris, Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 and on Windows using Cygwin
Cygwin
Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment...

. It is licensed for use under version 2 of the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

.

ns-3

On February 22, 2005 Tom Henderson made a post on ns-developers mailing list
Mailing list
A mailing list is a collection of names and addresses used by an individual or an organization to send material to multiple recipients. The term is often extended to include the people subscribed to such a list, so the group of subscribers is referred to as "the mailing list", or simply "the...

 saying We intend to have some discussions on how some of ns-2 might be either refactored or forked as part of a future development effort (in parallel, for now, with maintenance of the existing code tree).

In the process of discussing the necessary changes, it was found out that maintaining backward compatibility with ns-2 was generally not worth the effort, since most useful ns-2 models were already implemented in forks of ns-2 that were generally incompatible with each other. It was decided that new simulator will be written from scratch, using C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 programming language.

Mathieu Lacage started developing yans (Yet Another Network Simulator) back in 2004, which was later used as a base for ns-3. Development of ns-3, initially sponsored by the NSF
NSF
-Politics:* National Service Framework, any of a series of British government policies on medical care* National Socialist Front, a Swedish Nazi party* NS-Frauenschaft, the women's wing of the former German Nazi party...

, INRIA, and Georgia Tech, began on July 1, 2006,.. The first release, ns-3.1 was made in June 2008, and afterwards the project continued making quarterly software releases.

ns-3 made its eleventh release (ns-3.11) in the first quarter of 2011.

Criticism

ns-2 is often criticized because modeling is a very complex and time-consuming task, since it has no GUI and one needs to learn scripting language, queuing theory and modeling techniques. Of late, there have been complaints that results are not consistent (probably because of continuous changes in the code base) and that certain protocols are replete with bugs.

ns-3 is often criticized for its lack of support for some protocols which were supported in ns-2.

Educational use

It's expected that ns-3 it will eventually replace ns-2 in most universities that are currently using ns-2.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK