Lab for Day 1

Installation

Download the compressed tar file from using this link and place it in yourhome directory.

Install ns using the following commands:

	  tar zxvf ns2-allinone.tar.gz
	  cd ns-2-allinone
	  ./install >& install.out
When installation is over, view install.out with an editor and look for any possible errors. If you don't want any error, proceed. If there is an error, notify one of the instructors

Put ~/ns-allinone-2.1b6/bin in your default path

Run and play with sample scripts

Create a ns-test subdirectory at your home directory. Go to xxxx and click on "Run/play with the examples scripts provided". Copy all the scripts into test-ns directory. Run each script using the following command:
	       % ns 
If you encounter any run-time error, please notify the instructors.

Routing Protocols

Change your current directory to ~/ns-allinone-2.1b6/ns-2.1b6/tcl/ex. Open at simple-rtg.tcl and find out the routing protocol. What is it?

Open srm.tcl and find out the routing protocol for the session. What do you see?

Run srm.tcl using the following command:

       % ns srm.tcl
Simulator will create a NAM session for you. Run the nam file. Could explain the behavior of nodes 1, 2, and 3? 3- Exercise EXERCISE 1 NOTE: To bring down a node using the following command in your Tcl code: $ns rtmode-at 0.25 down $n(0) $n(1) EXERCISE 2 Create a network which looks like the following: 4 | | 0-------------1----------2---------5 | | 3 Choose CtrMcast as the multicast routing protocol for the experiment. Create a multicast group address using: set group [Node allocaddr] Node 5 will be your RP. Node 0 is a UDP source for this group. The source will start transmission at time 0.05. Nodes 3 and 4 will join the multicast group at times 0.10 and 0.12, respectively. NOTES: Use the following commands to for the orientation of the nodes: $ns duplex-link-op $n(0) $n(1) orient right $ns duplex-link-op $n(1) $n(2) orient right $ns duplex-link-op $n(2) $n(3) orient right $ns duplex-link-op $n(1) $n(3) orient down $ns duplex-link-op $n(1) $n(4) orient up Remeber to set the destination at the source using the following command: $src set dst_addr_ $group
Nader Salehi
Last modified: Thu Jun 22 23:14:26 PDT 2000