Next: 2.3 Class and object
Up: 2. Software Architecture
Previous: 2.1 Basics
Contents
Index
To introduce the design of ns-3, we first review design issues and
usage models that have arisen with ns-2, and mention trends in
simulation use within the networking research community.
- Model extensibility. Most research users want to extend
the simulator by writing new simulation scripts, modifying existing
models, or writing new models. To facilitate model modification,
ns-3 continues the use of object-oriented design with polymorphic
classes, allowing
users to subclass the aspects that they wish to modify. To
facilitate the addition of new models, ns-3 adopts a component-based
architecture for compile-time or run-time addition of new models, interface
aggregation, and encapsulation, without requiring modification of the
base models of ns-3.
- Simulation code reuse. Many users start their work with ns-2 by
adapting existing code. Some common code is written in terms of
base-class object pointers, allowing for run-time
substitution of subclassed objects. ns-3 will use several techniques
to facilitate simulation code reuse, such as inheritance to
extend existing classes, the provision of (extensible) stock
topology objects, simulation frameworks that are easily modifiable,
an example script repository, and a system for run-time
configuration of classes and default values.
- Run-time configuration. ns-3 provides a flexible technique
to allow users to redefine default values and class types without
recompiling the simulator. The default value database is integrated
with a command-line argument parsing facility, making all the variables
configurable from the command-line as well.
- Tracing. ns-3 features a callback-based approach
to tracing that decouples tracing sources from tracing sinks and that
is focused on flexibility for the user. Packet traces will be made
available in libpcap format, to allow for post-processing tools built
around that trace format. Built-in statistics will also be widely available.
- Scaling. ns-3 will include techniques for improving
the scalability of simulations, including distributed simulation
techniques introduced with PDNS and GTNetS, scalability techniques
introduced for wireless simulations such as caching of
computationally-intensive results, and flexibility in tracing
infrastructure (to avoid large traces).
- Software integration. ns-3 is oriented towards the reuse
of existing software such as routing daemons, applications, and kernel
code. The design is built around encapsulation techniques that decouple
the interface from the implementation, an architecture that better
mirrors how real-world devices are built (e.g., explicitly handling
multiple interfaces per node), and an abstraction library that allows
implementation code to run in both real and simulated environments.
- Network emulation. Increasingly, network research that
involves simulation also includes an experimental component, with
facilities such as PlanetLab, Emulab, and ORBIT.
Researchers would like to more easily move between simulation and experimental
domains. The ns-3 design is intended to facilitate this
interaction between simulation and experiments, with a packet design
oriented towards serialization and deserialization, and encapsulation
techniques that will allow real application and kernel code to run
in the simulator, thereby improving traceability to real-world
implementations.
- Scripting The primary ns-3 user interface at present is
a C++ ``main'' program, and we expect that C++ will continue to be
a preferred language for many users. However, ns-3 will also feature
Python bindings allowing for users to define scripts and replaceable
components in Python.
We organize the rest of the discussion in this chapter as follows:
- Class and object design
- Memory management
- Configuration
- Tracing
- Scaling
- Emulation
- Scripting
The next chapter goes into more detail on the Node, Channel, and Packet
object designs.
Next: 2.3 Class and object
Up: 2. Software Architecture
Previous: 2.1 Basics
Contents
Index
Tom Henderson
2007-06-17