2007-03-30 15:39:02 -07:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
The Network Simulator, Version 3
|
|
|
|
|
================================
|
2006-08-21 15:22:28 +02:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
## Table of Contents:
|
2006-08-26 14:20:18 -07:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
1) [An overview](#an-open-source-project)
|
|
|
|
|
2) [Building ns-3](#building-ns-3)
|
|
|
|
|
3) [Running ns-3](#running-ns3)
|
|
|
|
|
4) [Getting access to the ns-3 documentation](#getting-access-to-the-ns-3-documentation)
|
|
|
|
|
5) [Working with the development version of ns-3](#working-with-the-development-version-of-ns-3)
|
2007-02-02 14:41:28 -05:00
|
|
|
|
2008-12-05 13:11:26 -08:00
|
|
|
Note: Much more substantial information about ns-3 can be found at
|
|
|
|
|
http://www.nsnam.org
|
2007-02-14 22:04:38 -08:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
## An Open Source project
|
2007-02-14 22:04:38 -08:00
|
|
|
|
2008-12-05 13:11:26 -08:00
|
|
|
ns-3 is a free open source project aiming to build a discrete-event
|
|
|
|
|
network simulator targeted for simulation research and education.
|
|
|
|
|
This is a collaborative project; we hope that
|
2007-05-17 11:32:22 +02:00
|
|
|
the missing pieces of the models we have not yet implemented
|
|
|
|
|
will be contributed by the community in an open collaboration
|
|
|
|
|
process.
|
2007-02-14 22:04:38 -08:00
|
|
|
|
2011-12-07 16:11:42 -08:00
|
|
|
The process of contributing to the ns-3 project varies with
|
|
|
|
|
the people involved, the amount of time they can invest
|
|
|
|
|
and the type of model they want to work on, but the current
|
|
|
|
|
process that the project tries to follow is described here:
|
|
|
|
|
http://www.nsnam.org/developers/contributing-code/
|
2007-02-21 01:37:00 -08:00
|
|
|
|
2011-12-07 16:11:42 -08:00
|
|
|
This README excerpts some details from a more extensive
|
|
|
|
|
tutorial that is maintained at:
|
|
|
|
|
http://www.nsnam.org/documentation/latest/
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
## Building ns-3
|
2007-05-17 11:32:22 +02:00
|
|
|
|
|
|
|
|
The code for the framework and the default models provided
|
|
|
|
|
by ns-3 is built as a set of libraries. User simulations
|
2007-05-18 10:27:42 -07:00
|
|
|
are expected to be written as simple programs that make
|
2007-05-17 11:32:22 +02:00
|
|
|
use of these ns-3 libraries.
|
|
|
|
|
|
|
|
|
|
To build the set of default libraries and the example
|
|
|
|
|
programs included in this package, you need to use the
|
2016-12-27 11:12:08 +03:00
|
|
|
tool 'waf'. Detailed information on how to use waf is
|
2008-09-08 11:29:12 -07:00
|
|
|
included in the file doc/build.txt
|
2007-05-17 11:32:22 +02:00
|
|
|
|
|
|
|
|
However, the real quick and dirty way to get started is to
|
2011-12-07 16:11:42 -08:00
|
|
|
type the command
|
2018-12-13 18:21:03 +01:00
|
|
|
```shell
|
|
|
|
|
./waf configure --enable-examples
|
|
|
|
|
```
|
|
|
|
|
|
2011-12-07 16:11:42 -08:00
|
|
|
followed by
|
2018-12-13 18:21:03 +01:00
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
./waf
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
in the directory which contains this README file. The files
|
|
|
|
|
built will be copied in the build/ directory.
|
2007-05-17 11:32:22 +02:00
|
|
|
|
|
|
|
|
The current codebase is expected to build and run on the
|
2018-12-13 18:21:03 +01:00
|
|
|
set of platforms listed in the [release notes](RELEASE_NOTES)
|
|
|
|
|
file.
|
2008-09-08 11:29:12 -07:00
|
|
|
|
2018-12-17 11:09:02 +01:00
|
|
|
Other platforms may or may not work: we welcome patches to
|
|
|
|
|
improve the portability of the code to these other platforms.
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
## Running ns-3
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2011-12-07 16:11:42 -08:00
|
|
|
On recent Linux systems, once you have built ns-3 (with examples
|
|
|
|
|
enabled), it should be easy to run the sample programs with the
|
|
|
|
|
following command, such as:
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
```shell
|
|
|
|
|
./waf --run simple-global-routing
|
|
|
|
|
```
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
That program should generate a `simple-global-routing.tr` text
|
|
|
|
|
trace file and a set of `simple-global-routing-xx-xx.pcap` binary
|
|
|
|
|
pcap trace files, which can be read by `tcpdump -tt -r filename.pcap`
|
2011-12-07 16:11:42 -08:00
|
|
|
The program source can be found in the examples/routing directory.
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
## Getting access to the ns-3 documentation
|
2007-05-17 14:31:08 +02:00
|
|
|
|
|
|
|
|
Once you have verified that your build of ns-3 works by running
|
2016-12-27 11:47:21 +03:00
|
|
|
the simple-point-to-point example as outlined in 3) above, it is
|
2007-05-17 14:31:08 +02:00
|
|
|
quite likely that you will want to get started on reading
|
2018-12-17 11:09:02 +01:00
|
|
|
some ns-3 documentation.
|
2007-05-17 14:31:08 +02:00
|
|
|
|
|
|
|
|
All of that documentation should always be available from
|
2011-12-07 16:11:42 -08:00
|
|
|
the ns-3 website: http:://www.nsnam.org/documentation/.
|
2007-05-17 14:31:08 +02:00
|
|
|
|
2007-05-18 18:03:48 +02:00
|
|
|
This documentation includes:
|
2007-05-17 14:31:08 +02:00
|
|
|
|
2008-04-07 21:07:38 -07:00
|
|
|
- a tutorial
|
2018-12-17 11:09:02 +01:00
|
|
|
|
2011-12-07 16:11:42 -08:00
|
|
|
- a reference manual
|
|
|
|
|
|
|
|
|
|
- models in the ns-3 model library
|
2007-05-17 14:31:08 +02:00
|
|
|
|
|
|
|
|
- a wiki for user-contributed tips: http://www.nsnam.org/wiki/
|
|
|
|
|
|
2011-12-07 16:11:42 -08:00
|
|
|
- API documentation generated using doxygen: this is
|
2018-12-17 11:09:02 +01:00
|
|
|
a reference manual, most likely not very well suited
|
2007-05-17 14:31:08 +02:00
|
|
|
as introductory text:
|
|
|
|
|
http://www.nsnam.org/doxygen/index.html
|
|
|
|
|
|
2018-12-13 18:21:03 +01:00
|
|
|
## Working with the development version of ns-3
|
2007-05-17 11:32:22 +02:00
|
|
|
|
2018-12-14 12:31:45 +01:00
|
|
|
If you want to download and use the development version of ns-3, you
|
|
|
|
|
need to use the tool `git`. A quick and dirty cheat sheet is included
|
2018-12-17 11:09:02 +01:00
|
|
|
in the manual, but reading through the git
|
2018-12-14 12:31:45 +01:00
|
|
|
tutorials found in the Internet is usually a good idea if you are not
|
2007-05-17 11:32:22 +02:00
|
|
|
familiar with it.
|
|
|
|
|
|
2018-12-14 12:31:45 +01:00
|
|
|
If you have successfully installed git, you can get
|
2007-05-31 08:20:09 -07:00
|
|
|
a copy of the development version with the following command:
|
2018-12-13 18:21:03 +01:00
|
|
|
```shell
|
2018-12-14 12:31:45 +01:00
|
|
|
git clone https://gitlab.com/nsnam/ns-3-dev.git
|
2018-12-13 18:21:03 +01:00
|
|
|
```
|
2018-12-14 12:31:45 +01:00
|
|
|
|
|
|
|
|
However, we recommend to follow the Gitlab guidelines for starters,
|
|
|
|
|
that includes creating a Gitlab account, forking the ns-3-dev project
|
|
|
|
|
under the new account's name, and then cloning the forked repository.
|
|
|
|
|
You can find more information in the manual [link].
|