Dockemu: An IoT Simulation Framework Based on Linux Containers and the ns-3 Network Simulator — Application to CoAP IoT Scenarios

  • Antón Román PortabalesEmail author
  • Martín López Nores
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 947)


Large-scale and realistic simulations have been a pending issue in IoT research and development, hampering the design and optimization of networked systems. This paper presents new features added to the Dockemu open-source project, aimed at making it a valuable framework for such studies. The framework is based on the use of Linux Docker containers for the individual constrained nodes, and the ns-3 network simulator to emulate the network and connect the nodes during the simulation. Both technologies combined enable the capacity to simulate a huge number of lightweight nodes under realistic network conditions. The Linux interface mechanism used to interconnect the containers and the ns-3 simulation are described in detail. We also explain how LTE and LR-WPAN network technologies were added to the framework in order to cover a wide range of scenarios. Details on how Ansible has been used to orchestrate the setup and execution of the testing framework are given, too, showing how this widely-used devops tool can replace different programming and scripting languages for the orchestration of a simulation framework. Finally, the paper includes an example of IoT scenario simulation, using a real implementation of the CoAP protocol and involving a relevant number of nodes.


IoT Network simulation Docker real-time containers CoAP 


  1. 1.
    3GPP: Standardization of NB-IOT completed (2016). Accessed 3 Mar 2019
  2. 2.
  3. 3.
    Bai, J., Bi, J., Kuang, P., Fan, C., Zhou, Y., Zhang, C.: NS4: enabling programmable data plane simulation. In: Proceedings of the Symposium on SDN Research, SOSR 2018, pp. 12:1–12:7. ACM, New York (2018).,
  4. 4.
    Baldo, N., Requena-Esteso, M., Núñez-Martínez, J., Portoles-Comeras, M., Nin-Guerrero, J., Dini, P., Mangues-Bafalluy, J.: Validation of the IEEE 802.11 MAC model in the ns3 simulator using the EXTREME testbed. In: SimuTools (2010)Google Scholar
  5. 5.
    Bormann, C., Shelby, Z.: Block-Wise Transfers in the Constrained Application Protocol (CoAP). RFC 7959 (Proposed Standard), August 2016.,
  6. 6.
    D’Angelo, G., Ferretti, S., Ghini, V.: Simulation of the internet of things. CoRR abs/1605.04876 (2016).
  7. 7.
    Docker-Team: Best practices for writing dockerfiles. Accessed 3 Jan 2019
  8. 8.
    Ebert, C., Gallardo, G., Hernantes, J., Serrano, N.: DevOps. IEEE Softw. 33(3), 94–100 (2016). Scholar
  9. 9.
    Gupta, S.G., Ghonge, M., Thakare, P.D.P.M., Jawandhiya, P.: Open-source network simulation tools an overview. Int. J. Adv. Res. Comput. Eng. Technol. 2 (2013)Google Scholar
  10. 10.
    Gluhak, A., Krco, S., Nati, M., Pfisterer, D., Mitton, N., Razafindralambo, T.: A survey on facilities for experimental internet of things research. IEEE Commun. Mag. 49(11), 58–67 (2011). Scholar
  11. 11.
    Hartke, C.: Observing Resources in the Constrained Application Protocol (CoAP). RFC 7641 (Proposed Standard), September 2015.,
  12. 12.
    Hasan, A.B., Kiong, T., Paw, J.K., Musa, A.B., Mohamed, H.: Real-time video streaming over NS3-based emulated LTE networks. Int. J. Electron., Comput. Commun. Technol. 4 (2017).
  13. 13.
    Iglesias Urkia, M., Urbieta, A., Parra, J., Casado Mansilla, D.: IEC 61850 meets CoAP: towards the integration of smart grids and IoT standards, pp. 1–9, October 2017.
  14. 14.
    Maggi, F., Vosseler, R., Quarta, D.: The fragility of industrial IoT’s data backbone - security and privacy issues in MQTT and CoAP protocols. Trend Micro Res. (2018).
  15. 15.
    Patrick Vandewalle, J.K., Vetterli, M.: Reproducible research in signal processing. IEEE Signal Process. Mag. 37, 47 (2009).
  16. 16.
    Pei, G., Henderson, T.R.: Validation of OFDM error rate model in ns-3 (2010)Google Scholar
  17. 17.
    Pino, D.: Network namespaces. (2016). Accessed 22 Apr 2018
  18. 18.
    Rampf, S.: Network simulation and its limitations. In: Seminar Future Internet SS2013 (2010)Google Scholar
  19. 19.
    ur Rehman Khan, A., Bilal, S.M., Othman, M.: A performance comparison of network simulators for wireless networks. CoRR abs/1307.4129 (2013)Google Scholar
  20. 20.
    Rescorla, E., Modadugu, N.: Datagram Transport Layer Security Version 1.2. RFC 6347 (Proposed Standard), January 2012.,
  21. 21.
    Román, A., López, M.: Dockemu: extension of a scalable network simulation framework based on Docker and NS3 to cover IoT scenarios. In: Proceedings of 8th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH). INSTICC, INSTICC, Porto, Portugal, July 2018Google Scholar
  22. 22.
    Sharma, P., Chaufournier, L., Shenoy, P., Tay, Y.C.: Containers and virtual machines at scale: a comparative study. In: Proceedings of the 17th International Middleware Conference, Middleware 2016, pp. 1:1–1:13. ACM, New York (2016).,
  23. 23.
    libcoap team: libcoap: A CoAP (RFC 7252) implementation in C (2019). Accessed 12 Jan 2019.
  24. 24.
    NS3 Team: Mobility model library guide (2018). Accessed 21 Apr 2018.
  25. 25.
    NS3 Team: Mobility model library guide (2018). Accessed 22 Apr 2018.
  26. 26.
    NS3 Team: NB-IOT guide (2019). Accessed 3 Mar 2019.
  27. 27.
    To, M.A., Cano, M., Biba, P.: DOCKEMU – a network emulation tool. In: 2015 IEEE 29th International Conference on Advanced Information Networking and Applications Workshops. IEEE, March 2015.

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Antón Román Portabales
    • 1
    Email author
  • Martín López Nores
    • 2
  1. 1.QuobisO PorriñoSpain
  2. 2.AtlantTIC Research Center for Information and Communication TechnologiesUniversity of VigoVigoSpain

Personalised recommendations