Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 1 | .. ndnSIM: NS-3 based NDN simulator |
| 2 | .. ============================================================ |
| 3 | |
Alexander Afanasyev | f34fe56 | 2013-08-09 17:16:12 -0700 | [diff] [blame] | 4 | ============ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 5 | Introduction |
Alexander Afanasyev | 5d79e68 | 2012-11-19 14:12:23 -0800 | [diff] [blame] | 6 | ============ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 7 | |
Alexander Afanasyev | fc9d9e1 | 2013-08-10 14:17:49 -0700 | [diff] [blame] | 8 | .. sidebar:: ndnSIM components |
| 9 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 10 | .. image:: _static/ndnSIM-structure.* |
Alexander Afanasyev | fc9d9e1 | 2013-08-10 14:17:49 -0700 | [diff] [blame] | 11 | :width: 100% |
| 12 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 13 | A new release of `NS-3 based Named Data Networking (NDN) simulator <https://ndnsim.net/current/>`__ |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 14 | went through a number of extensive refactoring and rewriting. The key new features of the |
| 15 | new version: |
| 16 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 17 | - Packet format changed to the `NDN packet format <https://named-data.net/doc/ndn-tlv/>`_ |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 18 | |
| 19 | - ndnSIM uses implementation of basic NDN primitives from |
| 20 | `ndn-cxx library (NDN C++ library with eXperimental eXtensions) |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 21 | <https://named-data.net/doc/ndn-cxx/>`_ |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 22 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 23 | - All NDN forwarding and management is implemented directly using source code of `Named |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 24 | Data Networking Forwarding Daemon (NFD) <https://named-data.net/doc/NFD/>`_ |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 25 | |
Spyridon Mastorakis | af09eac | 2018-02-22 11:25:26 -0800 | [diff] [blame] | 26 | - It is possible to :doc:`simulate some real applications <guide-to-simulate-real-apps>` |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 27 | written against ndn-cxx library |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 28 | |
| 29 | .. note:: |
Spyridon Mastorakis | af09eac | 2018-02-22 11:25:26 -0800 | [diff] [blame] | 30 | Please note that ndnSIM >= 2.0 has been through major refactoring and simulation scenario written for |
| 31 | ndnSIM 1.0 most likely would need to be changed to run on ndnSIM >= 2.0 platforms. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 32 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 33 | Such integration with ndn-cxx and NFD ensures that the simulations are maximally realistic |
| 34 | and can be reproduced in real environments with virtually no changes to the source code. |
| 35 | In addition to that, any experiments with NDN forwarding (e.g., custom forwarding |
| 36 | strategies) inside ndnSIM can be directly used within the real NFD implementation. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 37 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 38 | Specifically, the simulator directly uses NFD implementations of :nfd:`pending Interest |
Spyridon Mastorakis | afad459 | 2018-02-22 13:31:14 -0800 | [diff] [blame] | 39 | table (PIT) <nfd::Pit>`, :nfd:`forwarding information base (FIB) <nfd::Fib>`, and |
Spyridon Mastorakis | 5897c96 | 2015-08-31 15:37:18 -0700 | [diff] [blame] | 40 | :nfd:`content store <nfd::cs::Cs>` data structures. In addition to that, ndnSIM allows |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 41 | experimentation with :ndnSIM:`ndnSIM-specific content store <ndn::ContentStore>` along |
| 42 | with its cache replacement policies ported from the previous version of ndnSIM. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 43 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 44 | ndnSIM is implemented as a new network-layer protocol model and can run on top of any |
| 45 | available link-layer protocol model (point-to-point, CSMA, wireless, etc.). |
| 46 | In addition, the simulator provides an extensive collection of interfaces and helpers to |
| 47 | perform detailed tracing behavior of every component, as well as NDN traffic flow. |
| 48 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 49 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 50 | More documentation |
| 51 | ------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 52 | |
Spyridon Mastorakis | af09eac | 2018-02-22 11:25:26 -0800 | [diff] [blame] | 53 | Overall structure of ndnSIM is described in our paper and technical reports. |
| 54 | |
| 55 | **For ndnSIM >= 2.0:** |
Spyridon Mastorakis | a879e02 | 2017-10-16 17:12:14 -0700 | [diff] [blame] | 56 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 57 | - **S. Mastorakis, A. Afanasyev, and L. Zhang, "On the Evolution of ndnSIM: an Open-Source Simulator for NDN Experimentation," ACM SIGCOMM Computer Communication Review (CCR), July 2017** (`PDF <https://ccronline.sigcomm.org/wp-content/uploads/2017/08/sigcomm-ccr-final112-full-letter.pdf>`__, `BibTex <https://web.cs.ucla.edu/~mastorakis/bibtex-ndnsim>`__) |
Spyridon Mastorakis | acd5e1a | 2016-12-07 14:34:25 -0800 | [diff] [blame] | 58 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 59 | - **S. Mastorakis, A. Afanasyev, I. Moiseenko, and L. Zhang, "ndnSIM 2: An updated NDN simulator for NS-3," NDN, Technical Report NDN-0028, Revision 2, 2016** (`PDF <https://named-data.net/wp-content/uploads/2016/11/ndn-0028-2-ndnsim-v2.pdf>`__, `BibTex <https://users.cs.fiu.edu/~afanasyev/assets/bibtex/tr-mastorakis2016ndnsim.html>`__) |
Spyridon Mastorakis | acd5e1a | 2016-12-07 14:34:25 -0800 | [diff] [blame] | 60 | |
Spyridon Mastorakis | af09eac | 2018-02-22 11:25:26 -0800 | [diff] [blame] | 61 | **For ndnSIM 1.0:** |
| 62 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 63 | - **A. Afanasyev, I. Moiseenko, and L. Zhang, "ndnSIM: NDN simulator for NS-3," NDN, Technical Report NDN-0005, 2012** (`PDF <https://users.cs.fiu.edu/~afanasyev/assets/bibtex/tr-afanasyev2012ndnsim.html>`__) |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 64 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 65 | `ndnSIM API documentation <doxygen/index.html>`_ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 66 | |
Spyridon Mastorakis | af09eac | 2018-02-22 11:25:26 -0800 | [diff] [blame] | 67 | Presentations on ndnSIM: |
| 68 | |
| 69 | - **S. Mastorakis, A. Afanasyev, and L. Zhang, "On the Evolution of ndnSIM: an Open-Source Ecosystem for NDN Experimentation", NDN Community Meeting (NDNcomm), Memphis, TN, March 2017** (`Slides <https://www.caida.org/workshops/ndn/1703/slides/ndn1703_smastorakis.pptx>`__) |
| 70 | |
| 71 | - **A. Afanasyev and others, “Developing Simple Simulations with ndnSIM.” NDN Tutorial at ACM ICN 2016, Kyoto, Japan, Sep-2016** (`Slides <https://users.cs.fiu.edu/~afanasyev/assets/papers/talks-afanasyev2016ndn-tutorial-ndnsim.pdf>`__) |
| 72 | |
| 73 | - **S. Mastorakis, "ndnSIM: Current Status & Latest Advancements", 6th NDN Retreat, San Diego, CA, March 2016** (`Slides <https://www.caida.org/workshops/ndn/1603/slides/ndn1603_smastorakis2.pdf>`__) |
| 74 | |
| 75 | - **A. Afanasyev, J. Burke, P. Crowley, S. DiBenedetto, V. Jacobson, J. Thompson, B. Zhang, and L. Zhang, “Named Data Networking. ndnSIM: a modular NDN simulator.” An Introduction to NDN and its Software Architecture Tutorial at 1st ACM Conference on Information-Centric Networking (ICN-2014), Sep-2014** (`Slides <https://users.cs.fiu.edu/~afanasyev/assets/papers/talks-afanasyev2014ndnsim.pptx>`__) |
| 76 | |
| 77 | - **A. Afanasyev, “Tutorial for students: ndnSIM.” AsiaFI 2013 Summer School, Aug-2013** (`Slides <https://users.cs.fiu.edu/~afanasyev/assets/papers/talks-afanasyev2013ndnsim-tutorial.pptx>`__) |
| 78 | |
| 79 | - **A. Afanasyev, I. Moiseenko, and L. Zhang, “ndnSIM: a modular NDN simulator. Introduction and Tutorial.” 3rd NDN retreat, Oct-2012** (`Slides <https://users.cs.fiu.edu/~afanasyev/assets/papers/talks-afanasyev2012ndnsim.pdf>`__) |
| 80 | |
| 81 | - **A. Afanasyev, I. Moiseenko, and L. Zhang, “ndnSIM: a modular NDN simulator.” CCNxCon 2012, Sep-2012** (`Slides <https://users.cs.fiu.edu/~afanasyev/assets/papers/talks-ccnxcon-afanasyev2012ndnsim.pdf>`__) |
| 82 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 83 | Also, you can `join our mailing list |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 84 | <https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 85 | discussions about ndnSIM implementation and simulations in general. Do not forget to |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 86 | check mailling list `archives <https://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_. |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 87 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 88 | |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 89 | Support |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 90 | ------- |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 91 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 92 | The code of ndnSIM is in active development. Bug reports (issues) as well as new feature |
| 93 | implementation are always welcome. |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 94 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 95 | To file a bug report, please use `NDN Redmine |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 96 | <https://redmine.named-data.net/projects/ndnsim>`_. |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 97 | |
| 98 | To create new feature, please fork the code and submit Pull Request on GitHub. |
| 99 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 100 | And of course, `our mailing list <https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 101 | is the best way to communicate with and get support from ndnSIM team and other users of |
| 102 | ndnSIM. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 103 | |
| 104 | A very short guide to the code |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 105 | ------------------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 106 | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 107 | All the NDN related code is in ``ns-3/src/ndnSIM`` |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 108 | |
| 109 | +-----------------+---------------------------------------------------------------------+ |
| 110 | | Folder | Description | |
| 111 | +=================+=====================================================================+ |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 112 | | ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces | |
Spyridon Mastorakis | acd5e1a | 2016-12-07 14:34:25 -0800 | [diff] [blame] | 113 | | | (:ndnsim:`Face`, :ndnsim:`NetDeviceTransport`, | |
spirosmastorakis | c09bb40 | 2016-10-28 19:16:58 -0700 | [diff] [blame] | 114 | | | :ndnsim:`AppLinkService`), | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 115 | | | etc. | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 116 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 117 | | ``NFD/`` | submodule of `NDN Forwarding Daemon (NFD)`_ source code with few | |
| 118 | | | modifications to make it compatible with the simulator | |
| 119 | +-----------------+---------------------------------------------------------------------+ |
| 120 | | ``ndn-cxx/`` | submodule of `ndn-cxx library`_ source code with few | |
| 121 | | | modifications to make it compatible with the simulator | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 122 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 123 | | ``apps/`` | applications (in NS-3 sense) that can be installed on the nodes. | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 124 | | | Right now we have one producer (:ndnsim:`Producer`) and a | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 125 | | | collection of consumer applications (:ndnsim:`ConsumerCbr`, | |
| 126 | | | :ndnsim:`ConsumerWindow`, :ndnsim:`ConsumerBatches`, | |
| 127 | | | :ndnsim:`ConsumerZipfMandelbrot`). See doxygen documentation or | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 128 | | | source code for details | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 129 | +-----------------+---------------------------------------------------------------------+ |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 130 | | ``utils/`` | helper classes, including implementation of generalized data | |
| 131 | | | structures, topology readers and tracers | |
| 132 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 133 | | ``helper/`` | a number of :doc:`useful helpers <helpers>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 134 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 135 | | ``examples/`` | contain :doc:`several example scenarios <examples>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 136 | +-----------------+---------------------------------------------------------------------+ |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 137 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 138 | .. _NDN Forwarding Daemon (NFD): https://named-data.net/doc/NFD/ |
Alexander Afanasyev | 5dee361 | 2015-08-25 16:09:04 -0700 | [diff] [blame] | 139 | |
Xinyu Ma | fc8956c | 2019-04-08 23:17:52 -0700 | [diff] [blame^] | 140 | .. _ndn-cxx library: https://named-data.net/doc/ndn-cxx/ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 141 | |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 142 | Logging |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 143 | ------- |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 144 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 145 | Almost every component in ndnSIM exports logging interface, so in debug compilation it is |
| 146 | possible to track many internal details. For example, logging of :ndnsim:`Face` and |
| 147 | :ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer` |
| 148 | classes:: |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 149 | |
Alexander Afanasyev | fbbe13d | 2019-02-21 13:40:52 -0500 | [diff] [blame] | 150 | NS_LOG=ndn.Consumer ./waf --run=ndn-simple |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 151 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 152 | Refer to the source code and NS-3 documentation to see what logging interfaces are |
| 153 | available and about details how enable one or more logging interfaces. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 154 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 155 | .. note:: |
| 156 | |
| 157 | Please remember that logging is enabled **only** in debug mode. When simulator is |
| 158 | compiled in optimized mode (``./waf configure -d optimized``), logging will be |
| 159 | completely disabled as it significantly slows down execution. |
| 160 | |
| 161 | .. note:: |
| 162 | |
| 163 | A list of log components available in the current version of NS-3 and ndnSIM is listed |
| 164 | `in this page <doxygen/LogComponentList.html>`_. |