blob: 1ef79b3435588f32d5eadabc0169d53596594aeb [file] [log] [blame]
Alexander Afanasyev4d325162012-06-01 12:28:50 -07001.. ndnSIM: NS-3 based NDN simulator
2.. ============================================================
3
4.. .. toctree::
5.. :maxdepth: 2
6
7Introduction
Alexander Afanasyev5d79e682012-11-19 14:12:23 -08008============
Alexander Afanasyev4d325162012-06-01 12:28:50 -07009
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070010The 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 Afanasyev4d325162012-06-01 12:28:50 -070011
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070012Following 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 -070013
14.. note::
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070015 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 -070016 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 Afanasyevf6807a52012-08-10 18:11:43 -070020The 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 -070021This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components.
22In 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 Afanasyev97fb44d2012-06-04 18:50:47 -070024
25.. aafig::
26 :aspect: 60
27 :scale: 120
28
29 +----------------+ +-----------+
30 | "Applications" | | NetDevice |
31 +----------------+ +-----------+
32 ^ ^
33 .................|......................................|......................
34 . v v .
35 . +------------------+ +----------------------+ .
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070036 . | "Face" | | "Face" | .
37 . | "(AppFace)" | | "(NetDeviceFace)" | .
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070038 . +------------------+ +----------------------+ .
39 . ^ ^ .
40 . | | .
41 . v v .
42 . XXXXXXXXXXXXXXXXXXXXXXXXXXXXX .
43 . XX XX .
44 . XX Core NDN protocol XX .
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070045 . XX "(L3Protocol)" XX
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070046 . XX XX .
47 . XXXXXXXXXXXXXXXXXXXXXXXXXXXXX .
48 . ^ ^ ^ ^ .
49 . | | | | .
50 . +-------------------+ +---+ +---+ +------------+ .
51 . | | | | .
52 . v v v v .
53 . +-------------------+ +-------+ +-------+ +-------------+ .
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070054 . | "ContentStore" | | PIT | | FIB | | "Forwarding"| .
55 . +-------------------+ +-------+ +-------+ | "Strategy" | .
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070056 . +-------------+ .
57 . .
58 ...............................................................................
59
60
Alexander Afanasyev9fb2e3d2013-03-30 21:11:07 -070061The current wire format for the Interest and Data packets used by ndnSIM is defined in :ref:`ndnSIM packet format`.
62ndnSIM also has an option to be compatible to wire format used by `CCNx Project's NDN implementation <http://www.ccnx.org/>`_ (CCNx Binary 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 -070063
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -080064More documentation
65------------------
Alexander Afanasyev4d325162012-06-01 12:28:50 -070066
Alexander Afanasyev5b147e82012-06-22 10:39:46 -070067Overall 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 -070068
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070069`ndnSIM API documentation <doxygen/index.html>`_
Alexander Afanasyev4d325162012-06-01 12:28:50 -070070
Alexander Afanasyev9c0794a2012-12-10 01:02:33 -080071Also, 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.
72Do not forget to check mailling list `archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_.
Alexander Afanasyev97fb44d2012-06-04 18:50:47 -070073
Alexander Afanasyev4d325162012-06-01 12:28:50 -070074
Alexander Afanasyev508269a2012-07-28 13:59:54 -070075Support
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -080076-------
Alexander Afanasyev508269a2012-07-28 13:59:54 -070077
78The code of ndnSIM is in active development. Bug reports (issues) as well as new feature implementation are always welcome.
79
80To file a bug report, please use `GitHub Issues <https://github.com/NDN-Routing/ndnSIM/issues>`_.
81
82To create new feature, please fork the code and submit Pull Request on GitHub.
83
Alexander Afanasyev26b558b2012-12-13 11:39:46 -080084And 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 -070085
86A very short guide to the code
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -070087------------------------------
Alexander Afanasyev4d325162012-06-01 12:28:50 -070088
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070089All the NDN related code is in ``ns-3/src/ndnSIM``
Alexander Afanasyev4d325162012-06-01 12:28:50 -070090
91+-----------------+---------------------------------------------------------------------+
92| Folder | Description |
93+=================+=====================================================================+
Alexander Afanasyevf6807a52012-08-10 18:11:43 -070094| ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces |
95| | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding |
96| | :ndnsim:`AppFace`), |
97| | strategies (:ndnsim:`ForwardingStrategy`, |
Alexander Afanasyevb8d14ad2012-08-09 13:19:37 -070098| | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), |
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070099| | etc. |
Alexander Afanasyev4d325162012-06-01 12:28:50 -0700100+-----------------+---------------------------------------------------------------------+
101| ``apps/`` | applications (in NS-3 sense) that can be installed on the nodes. |
Alexander Afanasyevf6807a52012-08-10 18:11:43 -0700102| | Right now we have one producer (:ndnsim:`Producer`) and a |
103| | collection of consumer (:ndnsim:`ConsumerCbr`, |
104| | :ndnsim:`ConsumerWindow`, |
105| | :ndnsim:`ConsumerBatches`). See doxygen documentation or |
Alexander Afanasyev6315ef72012-06-01 20:56:31 -0700106| | source code for details |
Alexander Afanasyev4d325162012-06-01 12:28:50 -0700107+-----------------+---------------------------------------------------------------------+
Alexander Afanasyev6315ef72012-06-01 20:56:31 -0700108| ``helper/`` | a number of :doc:`useful helpers <helpers>` |
Alexander Afanasyev4d325162012-06-01 12:28:50 -0700109+-----------------+---------------------------------------------------------------------+
Alexander Afanasyev6315ef72012-06-01 20:56:31 -0700110| ``examples/`` | contain :doc:`several example scenarios <examples>` |
Alexander Afanasyev4d325162012-06-01 12:28:50 -0700111+-----------------+---------------------------------------------------------------------+
Alexander Afanasyev508269a2012-07-28 13:59:54 -0700112| ``utils/`` | helper classes, including implementation of generalized data |
113| | structures |
Alexander Afanasyev4d325162012-06-01 12:28:50 -0700114+-----------------+---------------------------------------------------------------------+
115| ``plugins/`` | a number of plugins that may be helpful to run simulation scenarios |
116+-----------------+---------------------------------------------------------------------+
117
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -0700118Logging
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -0800119-------
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -0700120
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -0800121Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details.
122For 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 -0700123
Alexander Afanasyevf6807a52012-08-10 18:11:43 -0700124 NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple
Alexander Afanasyevd4e97b32012-06-04 15:09:50 -0700125
126Refer 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 -0700127
Alexander Afanasyeve095f0f2012-11-21 17:43:32 -0800128
Alexander Afanasyev4d325162012-06-01 12:28:50 -0700129.. Indices and tables
130.. ==================
131
132.. * :ref:`genindex`
133.. * :ref:`modindex`