# Computer Network Simulation with ns-3:
## 2 Related Work  
Simulation is a widely accepted tool in the field of computer networks. Literature offers both free and commercial simulation tools that aim at supporting, at different levels and with different purposes, design and analysis of computer networks. With no claim to completeness, this Section presents some relevant cases to provide a first reference to the readers. Within the category of open-source simulators, besides ns-3 literature reports ns-2, OMNET++ and SWANS as noticeable examples. ns-2 ([[https://www.isi.edu/nsnam/ns/](https://www.isi.edu/nsnam/ns/)]([https://www.isi.edu/nsnam/ns/](https://www.isi.edu/nsnam/ns/))), actually the previous version of ns-3, deserves to be mentioned as a different tool, because it is still widely used notwithstanding it is not maintained anymore and its last version has been released in 2011, since, as previously reported, ns-3 has been completely redesigned on a different basis. ns-2 implements discrete-event simulation. ns-2 is characterized by a separation between the approach to the definition of the simulated components and the approach to the definition of simulation management and setup: the first is based on a compiled software base, programmed in C++, including the components defined by the user or third parties, if any, while the second is managed by interpreted code written in OTcl, an object-oriented extension of the popular Tcl language, to ease the process. ns-2 has a significant base of available simulation components, due both to its popularity and lifespan, including protocols, reusable simulation objects that represent real-world equipment or routing algorithms. Support exist for wired and wireless networks, mobile networks, generation of specific patterns of traffic and energy-oriented evaluation. Its wide adoption fostered the development of third-party tools that partially compensate its limited support for visual management and analysis. OMNET++ ([[https://omnetpp.org/](https://omnetpp.org/)]([https://omnetpp.org/](https://omnetpp.org/))) is an event-based simulator that aims to provide a generic support to all kind of networked systems, from mobile networks to on-chip networks. The core of the simulator is a C++-based kernel that provides several services on which different application areas are made available by additional third-party frameworks, including very different cases such as photonic networks or sensor networks, or more abstract system performance modeling tools such as queuing networks: the official website reports a very comprehensive list of domains that have been covered by users and made publicly available under open-source licenses. OMNET++ provides a proprietary scripting language to describe topologies in model setups and can be used both from the command line and a rich graphical user interface. Models and components may be specified by an event-based paradigm and a process-oriented paradigm. The simulation kernel, designed for portability, allows distributed and parallel execution to support large simulation scenarios and speed up the runs. The simulation definition process is integrated in Eclipse to ease setup and management, and interactive simulation is provided. OMNET++ supports analysis of performance metrics by visual tools. SWANS ([[http://jist.ece.cornell.edu/](http://jist.ece.cornell.edu/)]([http://jist.ece.cornell.edu/](http://jist.ece.cornell.edu/))) is a simulator for wireless networks and sensor networks that has been designed with special attention to allow high simulation performance and larger simulation scenarios with respect to ns-2 and GloMoSim, the open-source version of the QualNet simulator described later in this section. SWANS uses jiST, a Java-based high-performance discrete-event simulation engine, as simulation support. The main aim of SWANS is scalability. Its architecture is component-based, and it can run Java network applications over simulated networks. The last version has been released in 2005.