This document provides an overview of Network Simulator 2 (NS-2) and how to use it to simulate computer networks. It discusses:
- The basic design of NS-2, which uses Tcl for scripting and C++ for implementing network objects. Simulation scripts are written in OTcl to set up the network topology and control packet transmissions.
- Common tasks in NS-2 like creating nodes and links, defining traffic sources and sinks, generating traffic patterns, and outputting trace files.
- Example scripts that demonstrate how to initialize a simulation, generate network traffic with different protocols (UDP, TCP), and visualize results using the Network Animator (NAM) tool.
- Key aspects of