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 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 13 | ndnSIM 2.0 is a new release of `NS-3 based Named Data Networking (NDN) simulator |
| 14 | <http://ndnsim.net/1.0/>`_ that went through extensive refactoring and rewriting. The key |
| 15 | new features of the new version: |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 16 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 17 | - ndnSIM no longer re-implements basic NDN primitives and directly uses implementation |
| 18 | from `ndn-cxx library (NDN C++ library with eXperimental eXtensions) |
| 19 | <http://named-data.net/doc/ndn-cxx/>`_. |
| 20 | - All NDN forwarding and management is implemented directly using source code of `Named |
| 21 | Data Networking Forwarding Daemon (NFD) <http://named-data.net/doc/NFD/>`_ |
Alexander Afanasyev | 963621b | 2015-01-11 18:34:33 -0800 | [diff] [blame^] | 22 | - Packet format changed to the `NDN packet format <http://named-data.net/doc/ndn-tlv/>`_ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 23 | |
| 24 | .. note:: |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 25 | Please note that ndnSIM 2.0 has major refactoring and simulation scenario written for |
| 26 | previous releases most likely would need to be changed to run on ndnSIM 2.0 platform. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 27 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 28 | Such integration with ndn-cxx and NFD ensures that the simulations are maximally realistic |
| 29 | and can be reproduced in real environments with virtually no changes to the source code. |
| 30 | In addition to that, any experiments with NDN forwarding (e.g., custom forwarding |
| 31 | strategies) inside ndnSIM can be directly used within the real NFD implementation. |
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 | Specifically, the simulator directly uses NFD implementations of :nfd:`pending Interest |
| 34 | table (PIT) <nfd::Pit>`, :nfd:`forwarding information base (FIB) <nfd::Fib>`, and |
| 35 | :nfd:`content store <nfd::Cs>` data structures. In addition to that, ndnSIM allows |
| 36 | experimentation with :ndnSIM:`ndnSIM-specific content store <ndn::ContentStore>` along |
| 37 | with its cache replacement policies ported from the previous version of ndnSIM. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 38 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 39 | ndnSIM is implemented as a new network-layer protocol model and can run on top of any |
| 40 | available link-layer protocol model (point-to-point, CSMA, wireless, etc.). |
| 41 | In addition, the simulator provides an extensive collection of interfaces and helpers to |
| 42 | perform detailed tracing behavior of every component, as well as NDN traffic flow. |
| 43 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 44 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 45 | More documentation |
| 46 | ------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 47 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 48 | Overall structure of ndnSIM is described in our `technical report |
| 49 | <http://lasr.cs.ucla.edu/afanasyev/data/files/Afanasyev/ndnSIM-TR.pdf>`_. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 50 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 51 | `ndnSIM API documentation <doxygen/index.html>`_ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 52 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 53 | Also, you can `join our mailing list |
| 54 | <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in |
| 55 | discussions about ndnSIM implementation and simulations in general. Do not forget to |
| 56 | check mailling list `archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_. |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 57 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 58 | |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 59 | Support |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 60 | ------- |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 61 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 62 | The code of ndnSIM is in active development. Bug reports (issues) as well as new feature |
| 63 | implementation are always welcome. |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 64 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 65 | To file a bug report, please use `NDN Redmine |
| 66 | <http://redmine.named-data.net/projects/ndnsim>`_. |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 67 | |
| 68 | To create new feature, please fork the code and submit Pull Request on GitHub. |
| 69 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 70 | And of course, `our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ |
| 71 | is the best way to communicate with and get support from ndnSIM team and other users of |
| 72 | ndnSIM. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 73 | |
| 74 | A very short guide to the code |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 75 | ------------------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 76 | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 77 | All the NDN related code is in ``ns-3/src/ndnSIM`` |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 78 | |
| 79 | +-----------------+---------------------------------------------------------------------+ |
| 80 | | Folder | Description | |
| 81 | +=================+=====================================================================+ |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 82 | | ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 83 | | | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 84 | | | :ndnsim:`AppFace`), | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 85 | | | etc. | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 86 | +-----------------+---------------------------------------------------------------------+ |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 87 | | ``NFD/`` | contains the `NFD`_ source code with few modifications to make it | |
| 88 | | | compatible with the simulator | |
| 89 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 90 | | ``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] | 91 | | | Right now we have one producer (:ndnsim:`Producer`) and a | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 92 | | | collection of consumer applications (:ndnsim:`ConsumerCbr`, | |
| 93 | | | :ndnsim:`ConsumerWindow`, :ndnsim:`ConsumerBatches`, | |
| 94 | | | :ndnsim:`ConsumerZipfMandelbrot`). See doxygen documentation or | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 95 | | | source code for details | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 96 | +-----------------+---------------------------------------------------------------------+ |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 97 | | ``utils/`` | helper classes, including implementation of generalized data | |
| 98 | | | structures, topology readers and tracers | |
| 99 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 100 | | ``helper/`` | a number of :doc:`useful helpers <helpers>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 101 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 102 | | ``examples/`` | contain :doc:`several example scenarios <examples>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 103 | +-----------------+---------------------------------------------------------------------+ |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 104 | |
| 105 | .. _NFD: http://named-data.net/doc/NFD/ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 106 | |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 107 | Logging |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 108 | ------- |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 109 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 110 | Almost every component in ndnSIM exports logging interface, so in debug compilation it is |
| 111 | possible to track many internal details. For example, logging of :ndnsim:`Face` and |
| 112 | :ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer` |
| 113 | classes:: |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 114 | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 115 | NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 116 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 117 | Refer to the source code and NS-3 documentation to see what logging interfaces are |
| 118 | available and about details how enable one or more logging interfaces. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 119 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 120 | .. note:: |
| 121 | |
| 122 | Please remember that logging is enabled **only** in debug mode. When simulator is |
| 123 | compiled in optimized mode (``./waf configure -d optimized``), logging will be |
| 124 | completely disabled as it significantly slows down execution. |
| 125 | |
| 126 | .. note:: |
| 127 | |
| 128 | A list of log components available in the current version of NS-3 and ndnSIM is listed |
| 129 | `in this page <doxygen/LogComponentList.html>`_. |