and edition of the C++ ns-3 simulation script) and a
Python main script which controls the execution of
the simulation.
We have used Ansible to carry out all the envi-
ronmental tasks and the logic was left in the Python
script. Using Ansible instead of Bash scripts has a
number of advantages:
• the simulation can be easily deployed in any
server, different from the OS where the main
script is being executed;
• it is idempotent, and therefore more efficient since
it only performs actions when needed reducing
setup time;
• it is declarative (not procedural), which added to
its smooth learning curve makes the playbook files
19
easier to read and modify;
• it will be possible to take advantage of new mod-
ules and features added to Ansible.
Once the simulation has finished, Ansible it is
also used to gather all the traffic exchanged by all the
nodes collected in PCAP files (except the LR-WPAN
traffic, which is collected in text files) and also the
logs generated by the client and server applications
executed in the Docker containers.
6 CONCLUSIONS
Dockemu provides a realistic and easy to setup sim-
ulation framework which meets the requirements of
a wide range of IoT simulations. It enables the use
of real client/server IoT software without any modifi-
cation by just creating a Docker container following
Dockemu guidelines to be included as a node in the
simulation.
The fact of using ns-3 to simulate the network
means a great advantage since it allows to use all the
exiting and future ns-3 modules to increase the num-
ber of simulation scenarios covered.
Dockemu can simulate different network tech-
nologies (WiFi, Ethernet, LTE and 802.15.4) and can
be used with different purposes:
• validate IoT software over realistic network con-
ditions;
• check the impact of modification in the applica-
tions or at any level of the network stack;
• carry out performance test of IoT software under
specific network conditions.
19
Playbook is the name given by Ansible framework to the
scripts where all the instruction needed to carry out a task
are written.
6.1 Future Lines
We have identified several work lines to improve and
complete Dockemu simulation in the future. These
tasks can be divided in three main groups:
1. Improvement of Existing Framework: this
group of tasks goes from improving and complet-
ing the documentation for the framework in or-
der to be used by others to including more config-
uration parameters for the simulation of the net-
work. This configuration parameters will give the
researcher more control about what is happening
on the wireless interfaces and enable the execu-
tion of more specific experiments.
2. Addition of More Complex Network Topolo-
gies and Support of More Network Technolo-
gies: the network topologies offered are pretty
static. The framework could be easily enriched
with more topologies and network technologies in
order to cover more scenarios.
3. Support of Parallel and Distributed Simula-
tion Mode: ns-3 supports parallel and distributed
modes for simulation. These modes can handle
a higher number of nodes which is essential to
cover IoT scenarios with more elements in or-
der to cover real-world scenarios. To support dis-
tributed simulation in ns-3, the standard Message
Passing Interface (MPI) is used. There is an exist-
ing module
20
which already supports it and which
makes use of the OpenMPI Linux library
21
.
REFERENCES
Bormann, C. and Shelby, Z. (2016). Block-Wise Transfers
in the Constrained Application Protocol (CoAP). RFC
7959 (Proposed Standard).
D’Angelo, G., Ferretti, S., and Ghini, V. (2016). Simulation
of the internet of things. CoRR, abs/1605.04876.
Ebert, C., Gallardo, G., Hernantes, J., and Serrano, N.
(2016). Devops. IEEE Software, 33(3):94–100.
G Gupta, S., Ghonge, M., D P M Thakare, P., and Jawand-
hiya, P. (2013). Open-source network simulation tools
an overview. 2.
Gluhak, A., Krco, S., Nati, M., Pfisterer, D., Mitton, N.,
and Razafindralambo, T. (2011). A survey on facili-
ties for experimental internet of things research. IEEE
Communications Magazine, 49(11):58–67.
Hasan, A. B., Kiong, T., Paw, J. K., Musa, A. B., and Mo-
hamed, H. (2017). Real-time video streaming over
ns3-based emulated lte networks. volume 4. Interna-
tional Journal of Electronics, Computer and Commu-
nications Technologies.
20
https://www.nsnam.org/docs/models/html/distributed.html
21
https://www.open-mpi.org/
Dockemu: Extension of a Scalable Network Simulation Framework based on Docker and NS3 to Cover IoT Scenarios
181