Skip to Main Content
The network simulator ns-2 implements both wireless networks and emulation — a feature that allows to simulate a network environment among real stations. However, the real-time requirements of a network emulation introduce an inaccurate timing behavior of the simulator scheduler. These timing errors have a negative impact on the performance of network protocols in ns-2. Even more, they lead to false simulation results in the IEEE 802.11 protocol implementation. In this paper we present performance improvements in ns-2, that increase the accuracy of its virtual clock and the the exactness of the real-time simulation. Then we describe a simple time monitoring and correction technique that ensures a timely correct execution of network protocols and enables wireless network emulation in ns-2.