Network simulation is used widely in network research to test new protocols, modifications to existing protocols and new ideas. The tool used in many cases is ns-2, which provides a wide range of protocol implementations and simulation tools. The nature of the ns-2 protocols means that they are often based on theoretical models and possibly lack the behaviour of real networks.

This project presents the Network Simulation Cradle which "cradles" real world operating systems' network stacks in a wrapper that allows the protocols to be used in the ns-2 network simulator. This provides real world code in a simulation context, allowing accurate simulation at little extra cost. Our results show that ns-2's TCP implementations do not match observed behaviour from real machines in some respects and using NSC produces results closer to real world network stacks.

This work is validated by comparing situations using a test network with the same situations in the simulator. To date it has been shown that the NSC is able to produce extremely accurate results.

NSC supports four real world stacks: FreeBSD, OpenBSD, lwIP and Linux.

Emphasis has been placed on not changing any of the network stacks by hand. Not a single line of code has been changed in the network protocol implementations of any of the above four stacks. However, a custom C parser was built to programmatically change source code.

More information

More information of this project:


The Network Simulation Cradle is available for download.

Publication simulation scripts, presentation slides and errata

Related work

At times this work has branched off into other, related, research:

About the author

Sam Jansen works in the Wand Network Research Group as a PhD student supervised by Associate Professor Tony McGregor in the Computer Science Department at The University of Waikato in Hamilton, New Zealand.

Contact details can be found on Sam's Wand page. More information might be present on his personal home page. The Wand web site also keeps a list of publications.