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 | |
Spyridon Mastorakis | 484bcde | 2015-01-13 22:54:34 -0800 | [diff] [blame] | 44 | The code of ndnSIM is in active development. |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 45 | |
Spyridon Mastorakis | 484bcde | 2015-01-13 22:54:34 -0800 | [diff] [blame] | 46 | Please submit bug reports and feature requests on `ndnISM Redmine <http://redmine.named-data.net/projects/ndnsim?jump=welcome>`_, |
| 47 | or tell us about the error on `our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ . |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 48 | |
| 49 | A very short guide to the code |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 50 | ------------------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 51 | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 52 | All the NDN related code is in ``ns-3/src/ndnSIM`` |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 53 | |
| 54 | +-----------------+---------------------------------------------------------------------+ |
| 55 | | Folder | Description | |
| 56 | +=================+=====================================================================+ |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 57 | | ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces | |
| 58 | | | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding | |
| 59 | | | :ndnsim:`AppFace`), | |
| 60 | | | strategies (:ndnsim:`ForwardingStrategy`, | |
Alexander Afanasyev | b8d14ad | 2012-08-09 13:19:37 -0700 | [diff] [blame] | 61 | | | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 62 | | | etc. | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 63 | +-----------------+---------------------------------------------------------------------+ |
| 64 | | ``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] | 65 | | | Right now we have one producer (:ndnsim:`Producer`) and a | |
| 66 | | | collection of consumer (:ndnsim:`ConsumerCbr`, | |
| 67 | | | :ndnsim:`ConsumerWindow`, | |
| 68 | | | :ndnsim:`ConsumerBatches`). See doxygen documentation or | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 69 | | | source code for details | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 70 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 71 | | ``helper/`` | a number of :doc:`useful helpers <helpers>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 72 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 73 | | ``examples/`` | contain :doc:`several example scenarios <examples>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 74 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 75 | | ``utils/`` | helper classes, including implementation of generalized data | |
| 76 | | | structures | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 77 | +-----------------+---------------------------------------------------------------------+ |
| 78 | | ``plugins/`` | a number of plugins that may be helpful to run simulation scenarios | |
| 79 | +-----------------+---------------------------------------------------------------------+ |
| 80 | |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 81 | Logging |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 82 | ------- |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 83 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 84 | Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details. |
| 85 | 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] | 86 | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 87 | NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 88 | |
| 89 | 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] | 90 | |