Almost all of the functionality now in ns version 1 has been merged into ns version 2, and only ns version 2 will be developed further. Ns-2 maintains full backward compatibility for all functionality except the flow manager, so that Tcl scripts developed for ns version 1 will generally run directly on ns version 2.
The ns simulation description language is an extension of the Tool Command Language, Tcl. A simulation is defined by a Tcl program. Using the ns command, a network topology is defined, traffic sources and sinks are configured, statistics are collected, and the simulation is invoked. By building upon a general-purpose language, arbitrary actions can be programmed into the configuration.
Several of the test scripts included with the distribution invoke
a graphing tool to display trace output.
home page to obtain this program.
To build ns from source to enable debugging, simply run:
If you have to make changes in order to compile ns, please send in your patches. Likewise, if you encounter bugs or unexpected behavior, please contact firstname.lastname@example.org (this list includes only the developers and is not distributed beyond our site). Finally, if you implement ns extensions that others can benefit from, please (if possible) send them in for inclusion in a future release.
You might run the following command as a quick test to verify that ns built correctly:
% ./ns test-suite.tcl tahoe1You should see some debugging output, then an xgraph window will pop-up with a sequence plot of the connection (xgraph and awk must be in your path for this script to work properly). See test-suite.tcl and example.tcl for more examples. A note describing the test suite is in ftp://ftp.ee.lbl.gov/papers/simtests.ps.Z. If you make changes to the simulator, you might want to make sure you haven't introduced bugs by running Matt Mathis' (email@example.com) test-all script, which is included in the distribution.
The (still rough) man page ns.1
is the only other source of documentation at this time.
The most recent version of the man page is
included in the ns distribution with
the source code.
Considerably more documentation is available for ns-2.
The Simulator Tests document illustrates the basic suite of validation tests included in the source distribution.
Ns Simulator Tests for Random Early Detection (RED) Gateways illustrates the validation tests for the implementation of RED queue management. The validation tests are included in the source distribution.
Ns Simulator Tests for Class-Based Queueing illustrates the validation tests for the implementation of class-based queueing (CBQ). The validation tests are included in the source distribution.
Simulation-based Comparisons of Tahoe, Reno, and SACK TCP illustrates simulations of Tahoe, Reno, new-Reno, and SACK TCP. The tests to run these simulations are included in the source distribution.
There is a short test to illustrate and exercise lossy links. This can be executed by running the script "./test-all-lossy".
The dynamic routing added by Kannan Varadhan can be tested with "./test-all-routed". These tests will be included in the v1.3 source distribution.
Funding for this work was provided by the Office of Energy Research, Mathematical, Information, and Computational Sciences Division, of the U.S. Department of Energy under Contract No. DE-AC03-76SF00098, and an AT&T Graduate Fellowship. Equipment grants and support were provided by Sun Microsystems, Digital Equipment Corporation, and Silicon Graphics Inc.
Sally Floyd (firstname.lastname@example.org)
Kevin Fall (email@example.com)