CSE342 - Lab 8: Network simulation

PURPOSE: To use a modern network simulator to test effects of various network workloads and topologies.

ns2 is a network simulator used by researchers worldwide to explore and test new network protocols and their performance. In this lab you will learn a little about ns by working through an ns tutorial and testing your intuitions in an exercise. Note that as a simulator, ns runs a simulation and then produces a log file with results. Typically, however, one will want to see the results graphically, and so NAM (Network Animator) is used to show over time what the simulator has calculated.

In order to run ns/nam locally, you'll have to set some environment variables and start X-Windows. For bash users (used at Lehigh by default), you'll need:


If there are any csh or tcsh shell users, you'll need:

You should start the ns tutorial at section I (Introduction), but skip section III.1 (since it is already installed). In section IV (and beyond), when the instructions say to run ns, we'll be using the version in /home/brian/ns-allinone-2.30/bin/ns. Note that the local copy of ns has been compiled for the older Sparcs. So if you are logged into a new AMD-based machine, you should ssh to an older machine: ssh -X europa in order to run and display the simulator.

EXERCISES:

  1. Go through the tutorial sections IV-VI, and VIII, and implement the sample networks they describe.
  2. Create a new topology. Node A wants to send a constant bitrate stream of UDP packets to Node S at 5Mbps. Node A connects to router B with a 10Mbps ethernet. Router B has two additional connections: a 10Mbps connection to Node C and a 1.5Mbps connection to D. C and D both connect to S at 10Mbps. Part way through your simulation, make link BC fail and show the performance degradation that results.


Last revised 21 October 2007.