blob: eb001fa6adf3a28788c2d5f720435066663212ee [file] [log] [blame]
Alexander Afanasyev4d325162012-06-01 12:28:50 -07001.. ndnSIM: NS-3 based NDN simulator
2.. ============================================================
3
Alexander Afanasyevf34fe562013-08-09 17:16:12 -07004============
Alexander Afanasyev4d325162012-06-01 12:28:50 -07005Introduction
Alexander Afanasyev5d79e682012-11-19 14:12:23 -08006============
Alexander Afanasyev4d325162012-06-01 12:28:50 -07007
Alexander Afanasyevfc9d9e12013-08-10 14:17:49 -07008.. sidebar:: ndnSIM components
9
10 .. image:: _static/ndnsim-components.*
11 :width: 100%
12
Alexander Afanasyevf34fe562013-08-09 17:16:12 -070013The 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 Afanasyev4d325162012-06-01 12:28:50 -070014
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070015Following 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 Afanasyev4d325162012-06-01 12:28:50 -070016
17.. note::
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070018 It will also be possible to run ndnSIM on top of network-layer (IPv4, IPv6) and transport-layer (TCP, UDP) protocols.
Alexander Afanasyev4d325162012-06-01 12:28:50 -070019 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 Afanasyevf6807a52012-08-10 18:11:43 -070023The 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 Afanasyev4d325162012-06-01 12:28:50 -070024This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components.
25In 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 Afanasyev9fb2e3d2013-03-30 21:11:07 -070027The current wire format for the Interest and Data packets used by ndnSIM is defined in :ref:`ndnSIM packet format`.
Alexander Afanasyevf34fe562013-08-09 17:16:12 -070028ndnSIM 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 Afanasyev4d325162012-06-01 12:28:50 -070029
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -080030More documentation
31------------------
Alexander Afanasyev4d325162012-06-01 12:28:50 -070032
Alexander Afanasyev5b147e82012-06-22 10:39:46 -070033Overall structure of ndnSIM is described in our `technical report <http://lasr.cs.ucla.edu/afanasyev/data/files/Afanasyev/ndnSIM-TR.pdf>`_.
Alexander Afanasyev4d325162012-06-01 12:28:50 -070034
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070035`ndnSIM API documentation <doxygen/index.html>`_
Alexander Afanasyev4d325162012-06-01 12:28:50 -070036
Alexander Afanasyev9c0794a2012-12-10 01:02:33 -080037Also, 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.
38Do not forget to check mailling list `archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_.
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070039
Alexander Afanasyev4d325162012-06-01 12:28:50 -070040
Alexander Afanasyev508269a2012-07-28 13:59:54 -070041Support
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -080042-------
Alexander Afanasyev508269a2012-07-28 13:59:54 -070043
44The code of ndnSIM is in active development. Bug reports (issues) as well as new feature implementation are always welcome.
45
46To file a bug report, please use `GitHub Issues <https://github.com/NDN-Routing/ndnSIM/issues>`_.
47
48To create new feature, please fork the code and submit Pull Request on GitHub.
49
Alexander Afanasyev26b558b2012-12-13 11:39:46 -080050And 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 Afanasyev4d325162012-06-01 12:28:50 -070051
52A very short guide to the code
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -070053------------------------------
Alexander Afanasyev4d325162012-06-01 12:28:50 -070054
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070055All the NDN related code is in ``ns-3/src/ndnSIM``
Alexander Afanasyev4d325162012-06-01 12:28:50 -070056
57+-----------------+---------------------------------------------------------------------+
58| Folder | Description |
59+=================+=====================================================================+
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070060| ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces |
61| | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding |
62| | :ndnsim:`AppFace`), |
63| | strategies (:ndnsim:`ForwardingStrategy`, |
Alexander Afanasyevb8d14ad2012-08-09 13:19:37 -070064| | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), |
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070065| | etc. |
Alexander Afanasyev4d325162012-06-01 12:28:50 -070066+-----------------+---------------------------------------------------------------------+
67| ``apps/`` | applications (in NS-3 sense) that can be installed on the nodes. |
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070068| | 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 Afanasyev6315ef72012-06-01 20:56:31 -070072| | source code for details |
Alexander Afanasyev4d325162012-06-01 12:28:50 -070073+-----------------+---------------------------------------------------------------------+
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070074| ``helper/`` | a number of :doc:`useful helpers <helpers>` |
Alexander Afanasyev4d325162012-06-01 12:28:50 -070075+-----------------+---------------------------------------------------------------------+
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070076| ``examples/`` | contain :doc:`several example scenarios <examples>` |
Alexander Afanasyev4d325162012-06-01 12:28:50 -070077+-----------------+---------------------------------------------------------------------+
Alexander Afanasyev508269a2012-07-28 13:59:54 -070078| ``utils/`` | helper classes, including implementation of generalized data |
79| | structures |
Alexander Afanasyev4d325162012-06-01 12:28:50 -070080+-----------------+---------------------------------------------------------------------+
81| ``plugins/`` | a number of plugins that may be helpful to run simulation scenarios |
82+-----------------+---------------------------------------------------------------------+
83
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -070084Logging
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -080085-------
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -070086
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -080087Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details.
88For example, logging of :ndnsim:`Face` and :ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer` classes::
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -070089
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070090 NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -070091
92Refer 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 Afanasyev4d325162012-06-01 12:28:50 -070093