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 | |
| 10 | .. image:: _static/ndnsim-components.* |
| 11 | :width: 100% |
| 12 | |
Alexander Afanasyev | f34fe56 | 2013-08-09 17:16:12 -0700 | [diff] [blame] | 13 | The ndnSIM is NS-3 module that implements Named Data Networking (NDN) communication model, the clean slate Internet design. ndnSIM is specially optimized for simulation purposes and has a cleaner and more extensible internal structure comparing to the existing NDN implementation (NDNx). |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 14 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 15 | Following the NDN architecture, ndnSIM is implemented as a new network-layer protocol model, which can run on top of any available link-layer protocol model (point-to-point, CSMA, wireless, etc.). |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 16 | |
| 17 | .. note:: |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 18 | It will also be possible to run ndnSIM on top of network-layer (IPv4, IPv6) and transport-layer (TCP, UDP) protocols. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 19 | However, it is not yet implemented and patches are welcome. |
| 20 | |
| 21 | .. This flexibility allows ndnSIM to simulate scenarios of various homogeneous and heterogeneous networks (e.g., NDN-only, NDN-over-IP, etc.). |
| 22 | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 23 | The simulator is implemented in a modular fashion, using separate C++ classes to model behavior of each network-layer entity in NDN: :ndnsim:`pending Interest table (PIT) <Pit>`, :ndnsim:`forwarding information base (FIB) <Fib>`, :ndnsim:`content store <ContentStore>`, :ndnsim:`network <NetDeviceFace>` and :ndnsim:`application <AppFace>` interfaces, :ndnsim:`Interest forwarding strategies <ForwardingStrategy>`, etc. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 24 | This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components. |
| 25 | In addition, the simulator provides an extensive collection of interfaces and helpers to perform detailed tracing behavior of every component, as well as NDN traffic flow. |
| 26 | |
Alexander Afanasyev | 9fb2e3d | 2013-03-30 21:11:07 -0700 | [diff] [blame] | 27 | The current wire format for the Interest and Data packets used by ndnSIM is defined in :ref:`ndnSIM packet format`. |
Alexander Afanasyev | f34fe56 | 2013-08-09 17:16:12 -0700 | [diff] [blame] | 28 | ndnSIM also has an option to be compatible to wire format used by `NDNx implementation <http://named-data.net/>`_ (NDNx binary XML encoding). However currently, this option is deprecated, but can be reintroduced in the future as an optional wire format. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 29 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 30 | More documentation |
| 31 | ------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 32 | |
Alexander Afanasyev | 5b147e8 | 2012-06-22 10:39:46 -0700 | [diff] [blame] | 33 | Overall structure of ndnSIM is described in our `technical report <http://lasr.cs.ucla.edu/afanasyev/data/files/Afanasyev/ndnSIM-TR.pdf>`_. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 34 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 35 | `ndnSIM API documentation <doxygen/index.html>`_ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 36 | |
Alexander Afanasyev | 9c0794a | 2012-12-10 01:02:33 -0800 | [diff] [blame] | 37 | Also, you can `join our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in discussions about ndnSIM implementation and simulations in general. |
| 38 | Do not forget to check mailling list `archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_. |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 39 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 40 | |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 41 | Support |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 42 | ------- |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 43 | |
| 44 | The code of ndnSIM is in active development. Bug reports (issues) as well as new feature implementation are always welcome. |
| 45 | |
| 46 | To file a bug report, please use `GitHub Issues <https://github.com/NDN-Routing/ndnSIM/issues>`_. |
| 47 | |
| 48 | To create new feature, please fork the code and submit Pull Request on GitHub. |
| 49 | |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 50 | And of course, `our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ is the best way to communicate with and get support from ndnSIM team and other users of ndnSIM. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 51 | |
| 52 | A very short guide to the code |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 53 | ------------------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 54 | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 55 | All the NDN related code is in ``ns-3/src/ndnSIM`` |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 56 | |
| 57 | +-----------------+---------------------------------------------------------------------+ |
| 58 | | Folder | Description | |
| 59 | +=================+=====================================================================+ |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 60 | | ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces | |
| 61 | | | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding | |
| 62 | | | :ndnsim:`AppFace`), | |
| 63 | | | strategies (:ndnsim:`ForwardingStrategy`, | |
Alexander Afanasyev | b8d14ad | 2012-08-09 13:19:37 -0700 | [diff] [blame] | 64 | | | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 65 | | | etc. | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 66 | +-----------------+---------------------------------------------------------------------+ |
| 67 | | ``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] | 68 | | | Right now we have one producer (:ndnsim:`Producer`) and a | |
| 69 | | | collection of consumer (:ndnsim:`ConsumerCbr`, | |
| 70 | | | :ndnsim:`ConsumerWindow`, | |
| 71 | | | :ndnsim:`ConsumerBatches`). See doxygen documentation or | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 72 | | | source code for details | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 73 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 74 | | ``helper/`` | a number of :doc:`useful helpers <helpers>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 75 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 76 | | ``examples/`` | contain :doc:`several example scenarios <examples>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 77 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 78 | | ``utils/`` | helper classes, including implementation of generalized data | |
| 79 | | | structures | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 80 | +-----------------+---------------------------------------------------------------------+ |
| 81 | | ``plugins/`` | a number of plugins that may be helpful to run simulation scenarios | |
| 82 | +-----------------+---------------------------------------------------------------------+ |
| 83 | |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 84 | Logging |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 85 | ------- |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 86 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 87 | Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details. |
| 88 | For example, logging of :ndnsim:`Face` and :ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer` classes:: |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 89 | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 90 | NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 91 | |
| 92 | Refer to the source code and NS-3 documentation to see what logging interfaces are available and about details how enable one or more logging interfaces. |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 93 | |