author | Tom Henderson <tomh@tomh.org> |
Tue, 27 Dec 2011 14:32:55 -0800 | |
changeset 7663 | a39cbfe79fac |
parent 7654 | 62ecccd96cad |
child 10184 | 0f7b3b88b438 |
permissions | -rw-r--r-- |
6754 | 1 |
.. include:: replace.txt |
2 |
||
3 |
Introduction |
|
4 |
------------ |
|
5 |
||
6 |
The |ns3| simulator is a discrete-event network simulator targeted |
|
7 |
primarily for research and educational use. The |
|
8 |
`ns-3 project |
|
9 |
<http://www.nsnam.org>`_, |
|
10 |
started in 2006, is an open-source project developing |ns3|. |
|
11 |
||
12 |
The purpose of this tutorial is to introduce new |ns3| users to the |
|
13 |
system in a structured way. It is sometimes difficult for new users to |
|
14 |
glean essential information from detailed manuals and to convert this |
|
15 |
information into working simulations. In this tutorial, we will build |
|
16 |
several example simulations, introducing and explaining key concepts and |
|
17 |
features as we go. |
|
18 |
||
19 |
As the tutorial unfolds, we will introduce the full |ns3| documentation |
|
20 |
and provide pointers to source code for those interested in delving deeper |
|
21 |
into the workings of the system. |
|
22 |
||
23 |
A few key points are worth noting at the onset: |
|
24 |
||
25 |
* Ns-3 is not an extension of `ns-2 |
|
26 |
<http://www.isi.edu/nsnam/ns>`_; |
|
27 |
it is a new simulator. The two simulators are both written in C++ but |
|
7654 | 28 |
|ns3| is a new simulator that does not support the |ns2| APIs. Some |
29 |
models from |ns2| have already been ported from |ns2| to |ns3|. The |
|
30 |
project will continue to maintain |ns2| while |ns3| is being built, |
|
6754 | 31 |
and will study transition and integration mechanisms. |
32 |
* |ns3| is open-source, and the project strives to maintain an |
|
7654 | 33 |
open environment for researchers to contribute and share their software. |
6754 | 34 |
|
35 |
||
7654 | 36 |
For |ns2| Users |
7663
a39cbfe79fac
clear warning in tutorial build process
Tom Henderson <tomh@tomh.org>
parents:
7654
diff
changeset
|
37 |
*************** |
6754 | 38 |
|
7654 | 39 |
For those familiar with |ns2|, the most visible outward change when moving to |
40 |
|ns3| is the choice of scripting language. Programs in |ns2| are |
|
6754 | 41 |
scripted in OTcl and results of simulations can be visualized using the |
42 |
Network Animator nam. It is not possible to run a simulation |
|
7654 | 43 |
in |ns2| purely from C++ (i.e., as a main() program without any OTcl). |
44 |
Moreover, some components of |ns2| are written in C++ and others in OTcl. |
|
6754 | 45 |
In |ns3|, the simulator is written entirely in C++, with optional |
46 |
Python bindings. Simulation scripts can therefore be written in C++ |
|
7654 | 47 |
or in Python. New animators and visualizers are available and under |
48 |
current development. Since |ns3| |
|
6754 | 49 |
generates pcap packet trace files, other utilities can be used to |
50 |
analyze traces as well. |
|
51 |
In this tutorial, we will first concentrate on scripting |
|
52 |
directly in C++ and interpreting results via trace files. |
|
53 |
||
54 |
But there are similarities as well (both, for example, are based on C++ |
|
7654 | 55 |
objects, and some code from |ns2| has already been ported to |ns3|). |
56 |
We will try to highlight differences between |ns2| and |ns3| |
|
6754 | 57 |
as we proceed in this tutorial. |
58 |
||
7654 | 59 |
A question that we often hear is "Should I still use |ns2| or move to |
6754 | 60 |
|ns3|?" The answer is that it depends. |ns3| does not have |
7654 | 61 |
all of the models that |ns2| currently has, but on the other hand, |ns3| |
6754 | 62 |
does have new capabilities (such as handling multiple interfaces on nodes |
63 |
correctly, use of IP addressing and more alignment with Internet |
|
7654 | 64 |
protocols and designs, more detailed 802.11 models, etc.). |ns2| |
65 |
models can sometimes be ported to |ns3| (a porting guide is under |
|
66 |
development). The support available on the user mailing list, and the |
|
67 |
developer and maintainer activity, is higher for |ns3|. A good guideline |
|
68 |
would be to look at both simulators, and in particular the models available |
|
69 |
for your research, but when in doubt or when starting new simulation |
|
70 |
projects, choose the tool that is under more active development (|ns3|). |
|
6754 | 71 |
|
72 |
Contributing |
|
73 |
************ |
|
74 |
||
75 |
|ns3| is a research and educational simulator, by and for the |
|
76 |
research community. It will rely on the ongoing contributions of the |
|
77 |
community to develop new models, debug or maintain existing ones, and share |
|
78 |
results. There are a few policies that we hope will encourage people to |
|
7654 | 79 |
contribute to |ns3| like they have for |ns2|: |
6754 | 80 |
|
7286 | 81 |
* Open source licensing based on GNU GPLv2 compatibility |
6754 | 82 |
* `wiki |
7286 | 83 |
<http://www.nsnam.org/wiki/index.php>`_ |
6754 | 84 |
* `Contributed Code |
7654 | 85 |
<http://www.nsnam.org/wiki/index.php/Contributed_Code>`_ page, similar to |ns2|'s popular Contributed Code |
6754 | 86 |
`page |
7286 | 87 |
<http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_ |
6754 | 88 |
* Open `bug tracker |
7286 | 89 |
<http://www.nsnam.org/bugzilla>`_ |
6754 | 90 |
|
91 |
We realize that if you are reading this document, contributing back to |
|
92 |
the project is probably not your foremost concern at this point, but |
|
93 |
we want you to be aware that contributing is in the spirit of the project and |
|
94 |
that even the act of dropping us a note about your early experience |
|
95 |
with |ns3| (e.g. "this tutorial section was not clear..."), |
|
96 |
reports of stale documentation, etc. are much appreciated. |
|
97 |
||
98 |
Tutorial Organization |
|
99 |
********************* |
|
100 |
||
101 |
The tutorial assumes that new users might initially follow a path such as the |
|
102 |
following: |
|
103 |
||
104 |
* Try to download and build a copy; |
|
105 |
* Try to run a few sample programs; |
|
106 |
* Look at simulation output, and try to adjust it. |
|
107 |
||
108 |
As a result, we have tried to organize the tutorial along the above |
|
109 |
broad sequences of events. |
|
110 |