The Network Simulator ns-2: Validation Tests
Daily status of the validation suite
The test suite (described below) is run every day on the ns
snapshot.
Output of the daily validation is sent to the nsnam-commits mailing list (browse the
list archive to see whether other platforms are encountering problems).
Classes of Ns Protocols
The program ``validate'' in the root directory of the ns distribution
runs all current standard tests.
Protocols covered in validate represent the most stable core of ns.
We insure that validate passes on several different systems for
each ns release, and we run it over the daily snapshot (see below).
We encourage you to report problems with validated protocols to
us. We try to resolve these problems rapidly (as resources allow).
Even though we consider these protocols ``validated'', our test
suite coverage is not complete. You are advised to look at what
aspects of the protocols are tested in the test suite before drawing
research conclusions from these protocols.
Protocols and modules covered at least in part by validate
include the following:
Application-level:
- HTTP, web caching and invalidation, TcpApp (test-suite-webcache.tcl)
- telnet and ftp sources (test-suite-simple.tcl)
- Constant-Bit-Rate (CBR) sources (e.g., in test-suite-cbq.tcl)
- On/Off sources (in test-suite-intserv.tcl)
Transport protocols (UDP, TCP, RTP, SRM):
- basic TCP behavior (test-suite-simple.tcl, test-suite-v1{,a}.tcl)
- Tahoe, Reno, New-Reno, and SACK TCP under different losses (test-suite-tcpVariants.tcl)
- FACK TCP (limited validation in test-suite-tcpVariants.tcl)
- TCP vegas (test-suite-vegas-v1.tcl)
- New-Reno TCP (test-suite-newreno.tcl)
- SACK TCP (test-suite-sack{,-v1,v1a})
- full TCP (test-suite-full.tcl), partial validation only.
- TCP initial window behavior (test-suite-tcp.tcl)
- rate-based pacing TCP (test-suite-rbp.tcl)
- RFC-2001 (Reno) TCP behavior (test-suite-rfc2001.tcl)
- RTP (in test-suite-friendly.tcl, not yet added to "validate")
- SRM (in test-suite-srm.tcl)
Routing:
- algorithmic routing (test-suite-algo-routing)
- hierarchical routing (test-suite-hier-routing.tcl)
- lan routing and broadcast (test-suite-lan.tcl)
- manual routing (test-suite-manual-routing.tcl)
- centralized multicast, DM multicast, not detailedDM, not
multicast over LAN (test-suite-mcast.tcl)
- routing dynamics (test-suite-routed.tcl)
- detailed simulation using virtual classifier (test-suite-vc.tcl)
- mixed-mode session-levels simulation (test-suite-mixmode.tcl)
- session-level simulation (test-suite-session.tcl)
Router Mechanisms (scheduling, queue management, admissions control, etc.):
- several queue scheduling algorithms: FQ (Fair Queueing), SFQ
(Stochastic Fair Queuing), DRR (Deficit Round Robin), FIFO
(with drop-tail and RED queue management) (test-suite-schedule.tcl)
- CBQ (both in v1 and v2 mode) (test-stuite-cbq{,-v1,-v1a})
- RED queue management (test-suite-red{,-v1,-v1a})
- ECN behavior (and TCP interactions) (test-suite-ecn.tcl)
- admission control algorithms: MS, HB, ACTP, ACTO, parameter-based (in test-suite-intserv.tcl)
Link-layer mechanisms:
- LANs, with CSMA/CD MAC protocols (in test-suite-lan.tcl)
- snoop
Other:
- Error Modules (e.g., in test-suite-ecn.tcl,
test-suite-tcp-init-win.tcl, test-suite-session.tcl, and
test-suite-srm.tcl)
In addition there are a number of protocols in the standard ns
distribution which are not covered by validate. Because they cannot
be automatically tested, bit-rot sometimes breaks these protocols.
We attempt to keep non-validated protocols working and welcome bug
reports. Becuase of difficulties maintaining code that we did not
write and for which we may not know ``ground truth'', we cannot
promise that these protocols will remain working. We
strongly encourage people using these protocols in their
research to examine their output carefully and implement test suites
for them so that we can move them into the ``validated'' category.
Protocols and modules in the core but not validated include:
- Fack and Asym TCP
- RTCP
- RTP
- LANs with CSMA/CA MAC protocols (tcl/ex/mac-test.tcl), with
MultihopMac (mac-multihop.cc), with 802.11 (mac-802_11.cc)
- RLM (Receiver Layered Multicast) (tcl/ex/test-rlm.tcl)
- token bucket filters (tcl/ex/test-tbf.tcl)
- trace-generated sources (tcl/ex/tg.tcl)
- delay-adaptive receivers (tcl/ex/test-rcvr.tcl)
- delay modules (delaymodel.cc)
- IVS (ivs.cc)
- emulation mode
- (many other protocols not yet listed)
Finally, there are a number of contributed
protocols described on their
own web page. These protocols are often for specific releases of
ns and may not work in the current release.
We welcome discussion of contributed protocols on the ns-users
mailing list, but we are unlikely to be able to provide support for
them. We welcome outside efforts to move these protocols into the
core; we will add protocols that include test suites and work with the
current release at their authors or users request. In some cases we
are actively integrating contributed code on a case-by-case basis (for
example, we're currently adding wireless extensions).
Specific Ns Validation Tests
The basic test
The Simulator Tests
document illustrates a basic suite of validation tests that mainly
tests TCP congestion control algorithms. These tests are run with the command
./test-all-simple
in ns-2/tcl/test
(or ./test-all quiet to suppress graphs).
Comments.
Extended versions of this test suite are in tcl/test/test-suite-routed.tcl.
This version also separates out the topology as a single library (tcl/test/topology.html),
and common drivers for the different test suites (tcl/test/misc.tcl).
The test-all-simple suite, but using the tcl code for that test suite from
ns-1, can be run in ns-2 in ``backward compatibility mode'' with the command
test-all-v1 in ns-2/tcl/test (or ./test-all-v1 quiet
to suppress graphs).
The
SSF TCP validation tests
are adapted from the TCP validation tests in ns-2 to validate the
TCP implementation in the SSFNET simulator. The SSFNET web page
also includes a detailed description of the behavior in each test.
More TCP tests
The SACK TCP validation tests -1 can be run with the command
test-all-sack in ns-2/tcl/test (or ./test-all-sack quiet
to suppress graphs). The SACK TCP validation tests from ns-1 can
be run with the command test-all-sack-v1 in ns-2/tcl/test. Comments.
The TCP implementations in these tests use one-way TCP without SYN/FIN
packets.
Tests comparing Tahoe, Reno, SACK, and Vegas TCP can be run with
the command test-all-tcpVariants in ns-2/tcl/test. Some of these tests
are described in Simulation-based
Comparisons of Tahoe, Reno, and SACK TCP . Comments.
The TCP implementations in these tests use both one-way and two-way TCP.
Tests with Reno FullTCP (with SYN/FIN packets
and two-way data flow) can be run with the command test-all-full
in ns-2/tcl/test. These tests are described in Ns
Simulator Tests for Reno FullTCP.
Additional tests of TCP's retransmit timer and ECN functionality can
be run with the command ./test-all-tcp in ns-2/tcl/test (or ./test-all-tcp
quiet to suppress graphs). This test is discussed in the file test-suite-tcp.txt.
Tests for TCP-Vegas (ported from ns-v1) can be run tcl/test/test-all-vegas-v1.
Tests for TCP with rate-based-pacing are in tcl/test/test-all-rbp
(see Improving
Restart of Idle TCP Connections for a description of RBP). This script
also tests Reno and Vegas behavior after an idle period, with and without
the slow-start restart option.
Queue management
Ns Simulator Tests
for Random Early Detection (RED) Gateways illustrates the validation
tests for the implementation of RED queue management. These tests can be
run with ./test-all-red in ns-2/tcl/test (or ./test-all-red
quiet to suppress graphs). The ns-1 tests are run with the command
./test-all-red-v1 in ns-2/tcl/test.
Comments.
The validation tests for ECN are described in the note
ECN Implementations in the NS Simulator
(postscript,
PDF).
Scheduling
Ns Simulator Tests
for Class-Based Queueing illustrates the validation tests for the implementation
of CBQ in the ns simulator. These tests are run with the command ./test-all-cbq
in ns-2/tcl/test (or ./test-all-cbq quiet to suppress graphs).
The command test-all-cbq-v1 in ns-2/tcl/test runs the ns-1 cbq
test suite in backward compatibility mode. All of the tests run in ns-2
except for the text showing the ``old'' implementation of formal link-sharing,
which is not implemlented in ns-2.
The Deficit Round Robin (DRR), Fair Queueing (FQ), and
Stochastic Fair Queueing (SFQ) scheduling
algorithms are contrasted with FIFO scheduling in the scheduling validation
tests, run with the command test-all-schedule in ns-2/tcl/test
(or ./test-all-schedule quiet to suppress graphs).
Multicast routing
The validation tests for multicast routing can be run with the command
test-all-mcast in ns-2/tcl/test. Currently the test suites consist of 2
tests for Centralized Multicast, 2 tests for a basic dense mode protocol,
DM (does not respond to topology changes) and 7 tests for a more complete
version of the dense mode protocol, detailedDM.
A test suite for exhaustive selective loss on lans can be run with the
detailedDM multicast in two simulation runs. The first run uses the
script ns-2/ex/newmcast/pim-no-loss.tcl, which runs the simulations
without loss to determine which packets/links will lose the packets in
later runs. A second simulation is then run using the script
ns-2/ex/newmcast/pim-loss.tcl. This example script targets Join messages
for selective loss.
Demos
(Many of these demos use nam.)
Unicast routing
- ns simple-dyn.tcl
in ns-2/tcl/ex: a simple demo to illustrate link failure and recovery;
no dynamic routing is done to heal the failure.
- ns simple-rtg.tcl
in ns-2/tcl/ex: a dynamic routing demo.
- ns simple-eqp.tcl
in ns-2/tcl/ex: equal cost multi-path routing through two equal
cost routes.
ns simple-eqp1.tcl
shows equal cost multi-path routing on a different dynamic topology.
Multicast routing
- ns mcast.tcl
in ns-2/tcl/ex: a multicast routing demo. Comments in mcast.txt.
- ns cmcast.tcl
in ns-2/tcl/ex/newmcast: centralized multicast computation for use
in ``session-level'' simulations. Instead of using join messages and implementing
multicast routing protocols in the individual routers, the multicast routing
tables are implemented in a centralized fashion for the entire topology.
PIM sparse mode shared trees and source-specific trees are supported. Comments
in cmcast.txt.
ns cmcast-spt.tcl
uses source-specific trees.
ns cmcast-100.tcl
creates a topology of 100 nodes and 950 edges. 10 members join the multicast
group. One sender sends for 90 seconds.
- ns detailedDM*.tcl
in ns-2/tcl/ex/newmcast: Dense Mode protocol that adapts to network changes
and works with LAN topologies (LANs created by the multi-link method).
Note that this is the recommended version of the dense mode protocol in
ns. Comments in detailedDM.txt.
- ns mcast*.tcl
in ns-2/tcl/ex/mcast*.tcl: multicast routing demos to illustrate the use
of Centralized multicast and the dense mode protocols. Comments in mcast.txt
Multicast transport
- ns simple-rtp.tcl
in ns-2/tcl/ex/newmcast: RTP. Black for data packets, green for
RTCP reports, cream for join messages, purple for prune messages.
- ns srm-demo.tcl in ns-2/tcl/ex: an SRM (Scalable Reliable
Multicast) demo. Comments in srm-demo.txt.
- Five tests demonstrate the behaviour of ns' SRM implementation:
Scripts are:
- ns srm.tcl
Different receivers join at different times. Each receiver requests back-data
from the start of the source session that is has missed. The demo uses
fixed timers.
- ns srm-star.tcl
Code to analyse SRM behaviour in a star topology. Loss of a single packet
is created through link failure/recovery. The number of nodes in the star
can be changed in the script, but the nam demo is optimised for eight nodes.
The demo uses fixed timers.
- ns srm-chain.tcl
Code to analyse SRM behaviour in a chain (or string) topology. Loss of
a single packet is created through link failure/recovery. The number of
nodes in the chain can be changed in the script, but the nam demo is optimised
for eight nodes. The demo uses fixed timers.
- ns srm-adapt-req.tcl [SrmType]
Code to analyse the request parameter behaviour of the SRM Adaptive timers.
The topology is a eight-node star. It can be changed in the script. To
compare different timer algorithms, the user can specify a different SrmType
agent, such as Fixed.
- ns srm-adapt-rep.tcl [SrmType]
Code to analyse the repair parameter behaviour of the SRM Adaptive timers.
The topology is a eight-node star. It can be changed in the script. To
compare different timer algorithms, the user can specify a different SrmType
agent, such as Fixed.
Traffic
- ns shuttle-mcast.tcl
in ns-2/tcl/ex: Example multicast traffic on a partial MBone topology
- ns web-traffic.tcl
in ns-2/tcl/ex: Example small-scale web traffic
- ns large-scale-web-traffic.tcl
in ns-2/tcl/exl: Example large-scale web traffic
Other
- ns simple.tcl
in ns-2/tcl/ex: a simple nam demo.
- ns rc.tcl
in ns-2/tcl/ex: rate-based congestion control.
- ns tg.tcl
in ns-2/tcl/ex: traffic generation modules. Comments in tg.txt.
- ns-2/tcl/ex/rbp_demo.tcl Compres TCP with rate-based pacing
against other variants.
- ns mac-test.tcl
in ns-2/tcl/ex: tests for LANs, especially the MAC protocols. There
are several options, all specified/documented in the source file. The MAC
protocols currently supported include CSMA/CA (modeled after the AT&T
WaveLAN), CSMA/CD (modeled after standard 10 Mbps Ethernets), Multihop
(loosely modeled after Metricom's Ricochet), and the 802.11 protocol. Coming
soon are complete tests for the link layer protocols in the distribution,
such as the snoop protocol, and tests for various error models.
- ns-2/tcl/ex/test-suite-intserv.tcl : A test suite which demonstrates
4 admission-control algorithms to support controlled load class of service
in ns. More details can be found in ns-2/tcl/ex/test-suite-intserv.txt.
- ns-2/tcl/ex/test-rlm.tcl : A nam-based test which demonstrates
support for Receiver Layered Multicast (RLM)
in ns.
- ns-2/tcl/ex/test-tbf.tcl : A nam-based test which demonstrates
use of a token bucket filter in ns.
- ns-2/tcl/ex/test-rcvr.tcl : A test for demonstrating support for
delay-adaptive receivers in ns.
- ns-2/tcl/ex/trace-driven.tcl : An test for trace driven random variable.
ns
[email protected]