USC CSD Home



Homework #1

(60 points total)

Due 11:45PM
 
Problem 1 (30 points)

Description

In this problem, we will reproduce a well-known problem with Distance Vector routings. We will use NS-2 simulatior to set up the following topology,

Figure 1
where,
  • There are 5 nodes as shown in the figure above.
  • All links have 10Mbps bandwidths and 5ms delays, with DropTail queues.
  • The network is using Distance Vector routing.
  • A CBR source at node 0 will send UDP packets to node 4, staring at 0.1s and ending at 1.0s.
  • The link between node 3 and node 4 will go down at 0.4s.
  • The entire simulation terminates at 1.0 seconds.

Requirements

  1. Write an NS-2 tcl script based on the template given below.
  2. Run your script, observe all the phenomena, and try to figure out what is the problem that we are reproducing and what is its effect.
  3. Prepare a short write-up where you describe what you have seen and name the problem we have reproduced. You DO NOT need to explain why, but DO need to report what happened and when.
  4. See the submission section below regarding what you need to submit.

Template

To write your ns-2 script, you can start with hw1-1.tmpl.txt, a template provided for your convenience, and fill in your own code.
 
Problem 2 (30 points)

Description

Use NS-2 to set up the following topology,

Figure 2
where,
  • There are 6 nodes as shown in the figure above.
  • The link annotations are bandwidths and delays.
  • All queues are DropTail queues. The queue limit for the link between nodes 2 and 3 is 8 packets.
  • There is a TCP flow from node 1 to node 5 carrying an FTP connection. This flow starts at 0.1 seconds and ends at 3.0 seconds.
  • There is a UDP flow from node 0 to node 4 carrying CBR traffic which starts at 1.0 seconds and ends at 2.0 seconds.
  • The entire simulation terminates at 3.0 seconds.

Requirements

  1. Write an NS-2 tcl script based on the template given below.
  2. Run your script, observe all the phenomena, and try to figure out what is the problem that we are reproducing and what is its effect.
  3. Prepare a short write-up where you describe what you have seen and name the problem we have reproduced. You DO NOT need to explain why, but DO need to report what happened and when.
  4. See the submission section below regarding what you need to submit.

Template

To write your ns-2 script, you can start with hw1-2.tmpl.txt, a template provided for your convenience, and fill in your own code.
 
Environment
To run NS, use:
    ~csci551/ns yourscript
and to run NAM, use:
    ~csci551/nam
The SUN workstaions in the SAL 125 are good for running NS and showing NAM animations.
 
Submission
You must follow the Electronic Submission Guidelines to submit HW1. Please note that the event ID for HW1 is:
    
Your submission should contain at least 4 files:
  • hw1-1.tcl - your ns-2 script for problem 1, based on hw1-1.tmpl.txt
  • hw1-1.README - your answer to the question posed in problem 1
  • hw1-2.tcl - your ns-2 script for problem 2, based on hw1-2.tmpl.txt
  • hw1-2.README - your answer to the question posed in problem 2
The preferred format for the README files is ASCII text. PDF, Postscript, and HTML are also acceptable (please change "README" to the appropriate filename extension).

You can create your submission by doing the following:

    % tar cvf hw1.tar hw1-1.tcl hw1-1.README hw1-2.tcl \
          hw1-2.README
    % gzip hw1.tar
    % ~csci551b/bin/bsubmit upload \
          -event  \
          -file hw1.tar.gz
 

   [Please see copyright regarding copying.]