Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 1 | .. ndnSIM: NS-3 based NDN simulator |
| 2 | .. ============================================================ |
| 3 | |
| 4 | .. .. toctree:: |
| 5 | .. :maxdepth: 2 |
| 6 | |
| 7 | Introduction |
Alexander Afanasyev | 5d79e68 | 2012-11-19 14:12:23 -0800 | [diff] [blame] | 8 | ============ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 9 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 10 | 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 (Project CCNx). |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 11 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 12 | 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] | 13 | |
| 14 | .. note:: |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 15 | 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] | 16 | However, it is not yet implemented and patches are welcome. |
| 17 | |
| 18 | .. This flexibility allows ndnSIM to simulate scenarios of various homogeneous and heterogeneous networks (e.g., NDN-only, NDN-over-IP, etc.). |
| 19 | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 20 | 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] | 21 | This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components. |
| 22 | 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. |
| 23 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 24 | |
| 25 | .. aafig:: |
| 26 | :aspect: 60 |
| 27 | :scale: 120 |
| 28 | |
| 29 | +----------------+ +-----------+ |
| 30 | | "Applications" | | NetDevice | |
| 31 | +----------------+ +-----------+ |
| 32 | ^ ^ |
| 33 | .................|......................................|...................... |
| 34 | . v v . |
| 35 | . +------------------+ +----------------------+ . |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 36 | . | "Face" | | "Face" | . |
| 37 | . | "(AppFace)" | | "(NetDeviceFace)" | . |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 38 | . +------------------+ +----------------------+ . |
| 39 | . ^ ^ . |
| 40 | . | | . |
| 41 | . v v . |
| 42 | . XXXXXXXXXXXXXXXXXXXXXXXXXXXXX . |
| 43 | . XX XX . |
| 44 | . XX Core NDN protocol XX . |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 45 | . XX "(L3Protocol)" XX |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 46 | . XX XX . |
| 47 | . XXXXXXXXXXXXXXXXXXXXXXXXXXXXX . |
| 48 | . ^ ^ ^ ^ . |
| 49 | . | | | | . |
| 50 | . +-------------------+ +---+ +---+ +------------+ . |
| 51 | . | | | | . |
| 52 | . v v v v . |
| 53 | . +-------------------+ +-------+ +-------+ +-------------+ . |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 54 | . | "ContentStore" | | PIT | | FIB | | "Forwarding"| . |
| 55 | . +-------------------+ +-------+ +-------+ | "Strategy" | . |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 56 | . +-------------+ . |
| 57 | . . |
| 58 | ............................................................................... |
| 59 | |
| 60 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 61 | The wire format of Interest and Data packets follows the format of the existing `CCNx Project's NDN implementation`_ (CCNx Binary Encoding), allowing reuse of the existing traffic analysis tools, as well as driving simulations using real NDN traffic traces. |
| 62 | |
| 63 | .. _CCNx Project's NDN implementation: http://www.ccnx.org/ |
| 64 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 65 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 66 | More documentation |
| 67 | ------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 68 | |
Alexander Afanasyev | 5b147e8 | 2012-06-22 10:39:46 -0700 | [diff] [blame] | 69 | 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] | 70 | |
Alexander Afanasyev | 97fb44d | 2012-06-04 18:50:47 -0700 | [diff] [blame] | 71 | `ndnSIM API documentation <doxygen/index.html>`_ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 72 | |
Alexander Afanasyev | 9c0794a | 2012-12-10 01:02:33 -0800 | [diff] [blame] | 73 | 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. |
| 74 | 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] | 75 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 76 | |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 77 | Support |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 78 | ------- |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 79 | |
| 80 | The code of ndnSIM is in active development. Bug reports (issues) as well as new feature implementation are always welcome. |
| 81 | |
| 82 | To file a bug report, please use `GitHub Issues <https://github.com/NDN-Routing/ndnSIM/issues>`_. |
| 83 | |
| 84 | To create new feature, please fork the code and submit Pull Request on GitHub. |
| 85 | |
Alexander Afanasyev | 26b558b | 2012-12-13 11:39:46 -0800 | [diff] [blame] | 86 | 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] | 87 | |
| 88 | A very short guide to the code |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 89 | ------------------------------ |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 90 | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 91 | All the NDN related code is in ``ns-3/src/ndnSIM`` |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 92 | |
| 93 | +-----------------+---------------------------------------------------------------------+ |
| 94 | | Folder | Description | |
| 95 | +=================+=====================================================================+ |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 96 | | ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces | |
| 97 | | | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding | |
| 98 | | | :ndnsim:`AppFace`), | |
| 99 | | | strategies (:ndnsim:`ForwardingStrategy`, | |
Alexander Afanasyev | b8d14ad | 2012-08-09 13:19:37 -0700 | [diff] [blame] | 100 | | | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 101 | | | etc. | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 102 | +-----------------+---------------------------------------------------------------------+ |
| 103 | | ``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] | 104 | | | Right now we have one producer (:ndnsim:`Producer`) and a | |
| 105 | | | collection of consumer (:ndnsim:`ConsumerCbr`, | |
| 106 | | | :ndnsim:`ConsumerWindow`, | |
| 107 | | | :ndnsim:`ConsumerBatches`). See doxygen documentation or | |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 108 | | | source code for details | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 109 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 110 | | ``helper/`` | a number of :doc:`useful helpers <helpers>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 111 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 6315ef7 | 2012-06-01 20:56:31 -0700 | [diff] [blame] | 112 | | ``examples/`` | contain :doc:`several example scenarios <examples>` | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 113 | +-----------------+---------------------------------------------------------------------+ |
Alexander Afanasyev | 508269a | 2012-07-28 13:59:54 -0700 | [diff] [blame] | 114 | | ``utils/`` | helper classes, including implementation of generalized data | |
| 115 | | | structures | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 116 | +-----------------+---------------------------------------------------------------------+ |
| 117 | | ``plugins/`` | a number of plugins that may be helpful to run simulation scenarios | |
| 118 | +-----------------+---------------------------------------------------------------------+ |
| 119 | |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 120 | Logging |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 121 | ------- |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 122 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 123 | Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details. |
| 124 | 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] | 125 | |
Alexander Afanasyev | f6807a5 | 2012-08-10 18:11:43 -0700 | [diff] [blame] | 126 | NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple |
Alexander Afanasyev | d4e97b3 | 2012-06-04 15:09:50 -0700 | [diff] [blame] | 127 | |
| 128 | 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] | 129 | |
Alexander Afanasyev | e095f0f | 2012-11-21 17:43:32 -0800 | [diff] [blame] | 130 | |
Alexander Afanasyev | 4d32516 | 2012-06-01 12:28:50 -0700 | [diff] [blame] | 131 | .. Indices and tables |
| 132 | .. ================== |
| 133 | |
| 134 | .. * :ref:`genindex` |
| 135 | .. * :ref:`modindex` |
| 136 | .. * :ref:`search` |
| 137 | |