.. ndnSIM: NS-3 based NDN simulator .. ============================================================ ============ Introduction ============ .. sidebar:: ndnSIM components .. image:: _static/ndnsim-components.* :width: 100% 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). 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.). .. note:: It will also be possible to run ndnSIM on top of network-layer (IPv4, IPv6) and transport-layer (TCP, UDP) protocols. However, it is not yet implemented and patches are welcome. .. This flexibility allows ndnSIM to simulate scenarios of various homogeneous and heterogeneous networks (e.g., NDN-only, NDN-over-IP, etc.). 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) `, :ndnsim:`forwarding information base (FIB) `, :ndnsim:`content store `, :ndnsim:`network ` and :ndnsim:`application ` interfaces, :ndnsim:`Interest forwarding strategies `, etc. This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components. 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. The current wire format for the Interest and Data packets used by ndnSIM is defined in :ref:`ndnSIM packet format`. ndnSIM also has an option to be compatible to wire format used by `NDNx implementation `_ (NDNx binary XML encoding). However currently, this option is deprecated, but can be reintroduced in the future as an optional wire format. More documentation ------------------ Overall structure of ndnSIM is described in our `technical report `_. `ndnSIM API documentation `_ Also, you can `join our mailing list `_ to see and participate in discussions about ndnSIM implementation and simulations in general. Do not forget to check mailling list `archives `_. Support ------- The code of ndnSIM is in active development. Please submit bug reports and feature requests on `ndnISM Redmine `_, or tell us about the error on `our mailing list `_ . A very short guide to the code ------------------------------ All the NDN related code is in ``ns-3/src/ndnSIM`` +-----------------+---------------------------------------------------------------------+ | Folder | Description | +=================+=====================================================================+ | ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces | | | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding | | | :ndnsim:`AppFace`), | | | strategies (:ndnsim:`ForwardingStrategy`, | | | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), | | | etc. | +-----------------+---------------------------------------------------------------------+ | ``apps/`` | applications (in NS-3 sense) that can be installed on the nodes. | | | Right now we have one producer (:ndnsim:`Producer`) and a | | | collection of consumer (:ndnsim:`ConsumerCbr`, | | | :ndnsim:`ConsumerWindow`, | | | :ndnsim:`ConsumerBatches`). See doxygen documentation or | | | source code for details | +-----------------+---------------------------------------------------------------------+ | ``helper/`` | a number of :doc:`useful helpers ` | +-----------------+---------------------------------------------------------------------+ | ``examples/`` | contain :doc:`several example scenarios ` | +-----------------+---------------------------------------------------------------------+ | ``utils/`` | helper classes, including implementation of generalized data | | | structures | +-----------------+---------------------------------------------------------------------+ | ``plugins/`` | a number of plugins that may be helpful to run simulation scenarios | +-----------------+---------------------------------------------------------------------+ Logging ------- Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details. For example, logging of :ndnsim:`Face` and :ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer` classes:: NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple 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.