23 A few key points are worth noting at the onset: |
23 A few key points are worth noting at the onset: |
24 |
24 |
25 * Ns-3 is not an extension of `ns-2 |
25 * Ns-3 is not an extension of `ns-2 |
26 <http://www.isi.edu/nsnam/ns>`_; |
26 <http://www.isi.edu/nsnam/ns>`_; |
27 it is a new simulator. The two simulators are both written in C++ but |
27 it is a new simulator. The two simulators are both written in C++ but |
28 |ns3| is a new simulator that does not support the ns-2 APIs. Some |
28 |ns3| is a new simulator that does not support the |ns2| APIs. Some |
29 models from ns-2 have already been ported from ns-2 to |ns3|. The |
29 models from |ns2| have already been ported from |ns2| to |ns3|. The |
30 project will continue to maintain ns-2 while |ns3| is being built, |
30 project will continue to maintain |ns2| while |ns3| is being built, |
31 and will study transition and integration mechanisms. |
31 and will study transition and integration mechanisms. |
32 * |ns3| is open-source, and the project strives to maintain an |
32 * |ns3| is open-source, and the project strives to maintain an |
33 open environment for researchers to contribute and share their software. |
33 open environment for researchers to contribute and share their software. |
34 |
34 |
35 |
35 |
36 For ns-2 Users |
36 For |ns2| Users |
37 ************** |
37 ************** |
38 |
38 |
39 For those familiar with ns-2, the most visible outward change when moving to |
39 For those familiar with |ns2|, the most visible outward change when moving to |
40 |ns3| is the choice of scripting language. Ns-2 is |
40 |ns3| is the choice of scripting language. Programs in |ns2| are |
41 scripted in OTcl and results of simulations can be visualized using the |
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 |
42 Network Animator nam. It is not possible to run a simulation |
43 in ns-2 purely from C++ (i.e., as a main() program without any OTcl). |
43 in |ns2| purely from C++ (i.e., as a main() program without any OTcl). |
44 Moreover, some components of ns-2 are written in C++ and others in OTcl. |
44 Moreover, some components of |ns2| are written in C++ and others in OTcl. |
45 In |ns3|, the simulator is written entirely in C++, with optional |
45 In |ns3|, the simulator is written entirely in C++, with optional |
46 Python bindings. Simulation scripts can therefore be written in C++ |
46 Python bindings. Simulation scripts can therefore be written in C++ |
47 or in Python. The results of some simulations can be visualized by |
47 or in Python. New animators and visualizers are available and under |
48 nam, but new animators are under development. Since |ns3| |
48 current development. Since |ns3| |
49 generates pcap packet trace files, other utilities can be used to |
49 generates pcap packet trace files, other utilities can be used to |
50 analyze traces as well. |
50 analyze traces as well. |
51 In this tutorial, we will first concentrate on scripting |
51 In this tutorial, we will first concentrate on scripting |
52 directly in C++ and interpreting results via trace files. |
52 directly in C++ and interpreting results via trace files. |
53 |
53 |
54 But there are similarities as well (both, for example, are based on C++ |
54 But there are similarities as well (both, for example, are based on C++ |
55 objects, and some code from ns-2 has already been ported to |ns3|). |
55 objects, and some code from |ns2| has already been ported to |ns3|). |
56 We will try to highlight differences between ns-2 and |ns3| |
56 We will try to highlight differences between |ns2| and |ns3| |
57 as we proceed in this tutorial. |
57 as we proceed in this tutorial. |
58 |
58 |
59 A question that we often hear is "Should I still use ns-2 or move to |
59 A question that we often hear is "Should I still use |ns2| or move to |
60 |ns3|?" The answer is that it depends. |ns3| does not have |
60 |ns3|?" The answer is that it depends. |ns3| does not have |
61 all of the models that ns-2 currently has, but on the other hand, |ns3| |
61 all of the models that |ns2| currently has, but on the other hand, |ns3| |
62 does have new capabilities (such as handling multiple interfaces on nodes |
62 does have new capabilities (such as handling multiple interfaces on nodes |
63 correctly, use of IP addressing and more alignment with Internet |
63 correctly, use of IP addressing and more alignment with Internet |
64 protocols and designs, more detailed 802.11 models, etc.). ns-2 |
64 protocols and designs, more detailed 802.11 models, etc.). |ns2| |
65 models can usually be ported to |ns3| (a porting guide is under |
65 models can sometimes be ported to |ns3| (a porting guide is under |
66 development). There is active development on multiple fronts for |
66 development). The support available on the user mailing list, and the |
67 |ns3|. The |ns3| developers believe (and certain early users |
67 developer and maintainer activity, is higher for |ns3|. A good guideline |
68 have proven) that |ns3| is ready for active use, and should be an |
68 would be to look at both simulators, and in particular the models available |
69 attractive alternative for users looking to start new simulation projects. |
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|). |
70 |
71 |
71 Contributing |
72 Contributing |
72 ************ |
73 ************ |
73 |
74 |
74 |ns3| is a research and educational simulator, by and for the |
75 |ns3| is a research and educational simulator, by and for the |
75 research community. It will rely on the ongoing contributions of the |
76 research community. It will rely on the ongoing contributions of the |
76 community to develop new models, debug or maintain existing ones, and share |
77 community to develop new models, debug or maintain existing ones, and share |
77 results. There are a few policies that we hope will encourage people to |
78 results. There are a few policies that we hope will encourage people to |
78 contribute to |ns3| like they have for ns-2: |
79 contribute to |ns3| like they have for |ns2|: |
79 |
80 |
80 * Open source licensing based on GNU GPLv2 compatibility |
81 * Open source licensing based on GNU GPLv2 compatibility |
81 * `wiki |
82 * `wiki |
82 <http://www.nsnam.org/wiki/index.php>`_ |
83 <http://www.nsnam.org/wiki/index.php>`_ |
83 * `Contributed Code |
84 * `Contributed Code |
84 <http://www.nsnam.org/wiki/index.php/Contributed_Code>`_ page, similar to ns-2's popular Contributed Code |
85 <http://www.nsnam.org/wiki/index.php/Contributed_Code>`_ page, similar to |ns2|'s popular Contributed Code |
85 `page |
86 `page |
86 <http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_ |
87 <http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_ |
87 * Open `bug tracker |
88 * Open `bug tracker |
88 <http://www.nsnam.org/bugzilla>`_ |
89 <http://www.nsnam.org/bugzilla>`_ |
89 |
90 |