An Introduction to Network Simulator NS2 is a beginners guide for network simulator NS2, an open-source discrete event simulator designed mainly for networking research. NS2 has been widely accepted as a reliable simulation tool for computer communication networks both in academia and industry. This book will present two fundamental NS2 concepts:i) how objects (e.g., nodes, links, queues, etc.) are assembled to create a network and ii) how a packet flows from one object to another. Based on these concepts, this book will demonstrate through examples how new modules can be incorporated into NS2. The book will: -Give an overview on simulation and communication networks. -Provide general information (e.g., installation, key features, etc.) about NS2. -Demonstrate how to set up a simple network simulation scenario using Tcl scripting lanuage. -Explain how C++ and OTcl (Object oriented Tcl) are linked, and constitute NS2. -Show how Ns2 interprets a Tcl Script and executes it. -Suggest post simulation processing approaches and identify their pros and cons. -Present a number of NS2 extension examples. -Discuss how to incorporate MATLAB into NS2.
Introduction.- Network Simulator NS2.- C++ and OTcl Linkage.- Implementation of Discrete Event Simulation in NS2.- Base Classes and Inheritance Concept in NS2.- Node Connection and Packet Flow Mechanism.- Applications and Transport Control Protocols.- Related Supporting Classes.- Post Simulation Processing.- Slected Extension Samples.- Other NS2 Classes.- Importing MATLAB into NS2.- Review of Probability Principles and Random Variables.- Review of Objected Oriented Programming by OTcll.- Various Tips and Troubleshooting.- Tcl/OTcl Command List.- NS2 Command List.- Index.