20 and provide pointers to source code for those interested in delving deeper |
20 and provide pointers to source code for those interested in delving deeper |
21 into the workings of the system. |
21 into the workings of the system. |
22 |
22 |
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 * |ns3| is open-source, and the project strives to maintain an |
|
26 open environment for researchers to contribute and share their software. |
|
27 * |ns3| is not a backwards-compatible extension of `ns-2 |
26 <http://www.isi.edu/nsnam/ns>`_; |
28 <http://www.isi.edu/nsnam/ns>`_; |
27 it is a new simulator. The two simulators are both written in C++ but |
29 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 |ns2| APIs. Some |
30 |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 |
31 models from |ns2| have already been ported from |ns2| to |ns3|. The |
30 project will continue to maintain |ns2| while |ns3| is being built, |
32 project will continue to maintain |ns2| while |ns3| is being built, |
31 and will study transition and integration mechanisms. |
33 and will study transition and integration mechanisms. |
32 * |ns3| is open-source, and the project strives to maintain an |
|
33 open environment for researchers to contribute and share their software. |
|
34 |
34 |
|
35 About |ns3| |
|
36 *********** |
|
37 |
|
38 |ns3| has been developed to provide an open, extensible network simulation |
|
39 platform, for networking research and education. In brief, |ns3| provides |
|
40 models of how packet data networks work and perform, and provides a |
|
41 simulation engine for users to conduct simulation experiments. Some of the |
|
42 reasons to use |ns3| include to perform studies that are more difficult |
|
43 or not possible to perform with real systems, to study system behavior in |
|
44 a highly controllled, reproducible environment, and to learn about how |
|
45 networks work. Users will note that the available model set in |ns3| |
|
46 focuses on modeling how Internet protocols and networks work, but |
|
47 |ns3| is not limited to Internet systems; several users are using |
|
48 |ns3| to model non-Internet-based systems. |
|
49 |
|
50 Many simulation tools exist for network simulation studies. Below are |
|
51 a few distinguishing features of |ns3| in contrast to other tools. |
|
52 |
|
53 * |ns3| is designed as a set of libraries that can be combined together |
|
54 and also with other external software libraries. While some simulation |
|
55 platforms provide users with a single, integrated graphical user |
|
56 interface environment in which all tasks are carried out, |ns3| is |
|
57 more modular in this regard. Several external animators and |
|
58 data analysis and visualization tools can be used with |ns3|. However, |
|
59 users should expect to work at the command line and with C++ and/or |
|
60 Python software development tools. |
|
61 * |ns3| is primarily used on Linux systems, although support exists |
|
62 for FreeBSD, Cygwin (for Windows), and native Windows Visual Studio |
|
63 support is in the process of being developed. |
|
64 * |ns3| is not an officially supported software product of any company. |
|
65 Support for |ns3| is done on a best-effort basis on the |
|
66 ns-3-users mailing list. |
|
67 |
35 |
68 |
36 For |ns2| Users |
69 For |ns2| Users |
37 *************** |
70 *************** |
38 |
71 |
39 For those familiar with |ns2|, the most visible outward change when moving to |
72 For those familiar with |ns2| (a popular tool that preceded |ns3|), |
|
73 the most visible outward change when moving to |
40 |ns3| is the choice of scripting language. Programs in |ns2| are |
74 |ns3| is the choice of scripting language. Programs in |ns2| are |
41 scripted in OTcl and results of simulations can be visualized using the |
75 scripted in OTcl and results of simulations can be visualized using the |
42 Network Animator nam. It is not possible to run a simulation |
76 Network Animator nam. It is not possible to run a simulation |
43 in |ns2| purely from C++ (i.e., as a main() program without any OTcl). |
77 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. |
78 Moreover, some components of |ns2| are written in C++ and others in OTcl. |
55 objects, and some code from |ns2| has already been ported to |ns3|). |
89 objects, and some code from |ns2| has already been ported to |ns3|). |
56 We will try to highlight differences between |ns2| and |ns3| |
90 We will try to highlight differences between |ns2| and |ns3| |
57 as we proceed in this tutorial. |
91 as we proceed in this tutorial. |
58 |
92 |
59 A question that we often hear is "Should I still use |ns2| or move to |
93 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 |
94 |ns3|?" In this author's opinion, unless the user is somehow vested |
61 all of the models that |ns2| currently has, but on the other hand, |ns3| |
95 in |ns2| (either based on existing personal comfort with and knowledge |
62 does have new capabilities (such as handling multiple interfaces on nodes |
96 of |ns2|, or based on a specific simulation model that is only available |
63 correctly, use of IP addressing and more alignment with Internet |
97 in |ns2|), a user will be more productive with |ns3| for the following |
64 protocols and designs, more detailed 802.11 models, etc.). |ns2| |
98 reasons: |
65 models can sometimes be ported to |ns3| (a porting guide is under |
99 |
66 development). The support available on the user mailing list, and the |
100 * |ns3| is actively maintained with an active, responsive users mailing |
67 developer and maintainer activity, is higher for |ns3|. A good guideline |
101 list, while |ns2| is only lightly maintained and has not seen |
68 would be to look at both simulators, and in particular the models available |
102 significant development in its main code tree for over a decade. |
69 for your research, but when in doubt or when starting new simulation |
103 * |ns3| provides features not available in |ns2|, such as a implementation |
70 projects, choose the tool that is under more active development (|ns3|). |
104 code execution environment (allowing users to run real implementation |
|
105 code in the simulator) |
|
106 * |ns3| provides a lower base level of abstraction compared with |ns2|, |
|
107 allowing it to align better with how real systems are put together. |
|
108 Some limitations found in |ns2| (such as supporting multiple types of |
|
109 interfaces on nodes correctly) have been remedied in |ns3|. |
|
110 |
|
111 |ns2| has a more diverse set of contributed modules than does |ns3|, owing to |
|
112 its long history. However, |ns3| has more detailed models in several |
|
113 popular areas of research (including sophisticated LTE and WiFi models), |
|
114 and its support of implementation code admits a very wide spectrum |
|
115 of high-fidelity models. Users may be surprised to learn that the |
|
116 whole Linux networking stack can be encapsulated in an |ns3| node, |
|
117 using the Direct Code Execution (DCE) framework. |ns2| |
|
118 models can sometimes be ported to |ns3|, particularly if they have been |
|
119 implemented in C++. |
|
120 |
|
121 If in doubt, a good guideline would be to look at both simulators (as |
|
122 well as other simulators), and in particular the models available |
|
123 for your research, but keep in mind that your experience may be better |
|
124 in using the tool that is being actively developed and |
|
125 maintained (|ns3|). |
71 |
126 |
72 Contributing |
127 Contributing |
73 ************ |
128 ************ |
74 |
129 |
75 |ns3| is a research and educational simulator, by and for the |
130 |ns3| is a research and educational simulator, by and for the |