# Computer Network Simulation with ns-3:
## 1 Introduction
The availability of modular, extensible, programmable, open, open-source, community-supported and community-driven simulation tools or simulation frameworks gives the modeler the possibility of producing simulation scenarios with any desired level of detail, even with an heterogeneous level in different simulated nodes, portions of network or subsystems, provided that a component for the simulation tool is available or autonomously developed by the modeler for the purpose. The extensibility allows the definition of new components for experimental or future real-world networks components, as well as the implementation of different versions of the same real-world networks component with a different inner complexity to manage with the duration of large simulation runs or to interface, in case, real-world networks components with simulated components. Modularity and extensibility enable component reuse, thus empowering the modeling process with well-tested, well-documented third-party components with little effort by the modeler, faster model development, incremental modeling strategies, comparative simulation for cross-validation by means of alternative modules, parameterization of models, definition of semifinished models or model portions, up to the support for structured modeling and analysis processes, including standardized processes in the framework of industrial certifications. Openness guarantees the legal rights needed for extension, while open-sourceness guarantees inspectability of code for debug, verification or certification of simulations, or easy refactorization of components to evolve them with the simulation software infrastructure, and portability between version. Community-supportednessfosters the collective effort to produce or improve new components, to augment the usefulness of the simulation tool and to strengthen the effectiveness of its use into simulation processes, or, together with open-sourceness, the implementation of third-party tools to support or automate simulation campaigns, simulation generation, model-based simulation development or other useful tools that ease or empower the management of simulation and its application in structured development and assessment processes and methodologies. Many alternatives exist for computer network simulation: in this Systematic Literature Review (SLR) we focus on ns-3 (www.nsnam.org/), a modular, programmable, extensible, open, open-source, community-supported simulation framework for computer networks. Our choice is due to the fact that the technical characteristics of ns-3 match the needs of our research activities, and to the increasing popularity that this tool is gaining among the computer networks research community and, slowly, among professionals. ns-3 is an open computer networks simulation environment that is based on discrete-event simulation. In such a simulator, each event is associated with its execution time, and the simulation proceeds by executing events in the temporal order of simulation time. When an event is processed, it may generate zero, one or more events. As a simulation executes, events are consumed, but more events may (or may not) be generated. The simulation will stop automatically when no further events are in the event queue, or when a special _\"Stop\"_ event is found [1]. It is designed for research use, thinking of the needs of the research community, and fosters a community-based collaboration model both to support the development of new modules and to perform validation or peer review activities across different groups. ns-3 is distributed under an open-source model and a free software paradigm. The simulation environment is designed to allow its use as a real-time emulator as well, integrating simulated portions and physical portions in the same network. This level of integration is provided by a real-time scheduler, besides the simulation support, to enable simulation-in-the-loop.