TA Page for CS276 : Advanced Topics in Networking

Please contact the TAs (kharras@cs.ucsb.edu, gayatri@cs.ucsb.edu) with any questions pertaining to the class.

Preface the subject line of your e-mails with "[CS 276]:" for a faster response to your questions.
 

The Network Simulator: NS-2

Installing NS-2    |    Related Tools    |     Getting Started With NS-2    |    Homework3 FAQs  

Installing NS-2

In order to run ns-2, you could type in the complete path or modify your PATH: 

% /usr/local/ns-allinone-2.28/ns-2.28/ns your-tcl-program.tcl

For example, download: ex-tcl.tcl and type:

% /usr/local/ns-allinone-2.28/ns-2.28/ns ex-tcl.tcl

The program should output:

k < 5, pow = 1.0
k < 5, pow = 1120.0
k < 5, pow = 1254400.0
k < 5, pow = 1404928000.0
k < 5, pow = 1573519360000.0
k >= 5, mod = 0
k >= 5, mod = 4
k >= 5, mod = 0
k >= 5, mod = 0
k >= 5, mod = 4

Note: The global copy of ns2 is sufficient for Homework 3.
 

If you plan to develop new protocols (as part of your project work) using ns2, you will need to install a local copy of ns2. A local install is necessary if you need to implement new protocols, make changes to existing protocols, compile the makefile, etc.  Here are the instructions to perform a local install.

1) cd to your sandbox account.
2) At the shell prompt, type the following command: % ulimit -f unlimited
This will remove the upper limit on the file size (**make sure to do this in the bash shell**)
3) download the ns-allinone-2.28 package using the following command: % wget http://www.isi.edu/nsnam/dist/ns-allinone-2.28.tar.gz
4) cd to the ns-allinone-2.28 directory. Run the install script: % ./install

Check the ns-2 installation problems page if you run into any compile errors. Know more about the building ns from here.

Note: Check this webpage frequently, as we may post additional installation instructions or patches.
 

Related Tools

All of the related tools (e.g. nam, xgraph) can be found within the /usr/local/ns-allinone-2.28 directory.  To make accessing these tools more convenient, update the following
environment variables for your shell:

PATH variable
- Add /usr/local/ns-allinone-2.28/bin

LD_LIBRARY_PATH variable
- Add /usr/local/ns-allinone-2.28/otcl-1.9
- Add /usr/local/ns-allinone-2.28/lib



Network Simulator NS-2  

Getting started with NS-2

Sample NS-2 assignment

Homework 3

FAQs

  1. I am not sure how I can access my sandbox account.

          => You need to ssh to your cs account. Once you do that, just type: % cd /cs/sandbox/student/

          Next, locate your directory and cd to it.

Note: This space is NOT backed up. If there are important files you need as part of HW 3, you should copy these into your home directory. Also note that these directories will disappear soon after the quarter is over. So again, if there is anything you want to save after the assignment is turned in, you should copy it out.

  1. I do not have enough space to install NS-2. / I do not have a sandbox account created for me.

          => You do not need an account or quota increase for Homework 3. Use the global copy of ns2. Contact me (gayatri@cs) if you plan to do your project in ns2.

  1. What value of delay should I use for the duplex links? What about queue management type?

          => Use a 10ms delay with DropTail.

  1. What do you mean by a "TCP stream" a CBR over TCP or a FTP over TCP?

         => CBR traffic is used only for UDP, not for TCP. So use FTP over TCP.

  1. Is there a particular rate and  packet size you want us to use for the FTP over TCP?

=> No, there aren't any specific requirements.

Even though the experiment says you need to vary the CBR flow and measure the bandwidth/packet loss rate etc, you will still need to determine your choice (and the reasoning) of nominal values for the other parameters like packet size etc. Refer to the parameter, factors, metrics class notes to understand what your experiment parameters, nominal (default) values and metrics will be.

  1. For hw3 part1 when it says we have to re-run the simulation for each of the following variants:

    run1) Reno/Reno and NewReno/Reno
    run2) Vegas/Vegas and NewReno/Vegas.
    run3) SACK/Reno and SACK/NewReno

=> There are actually 6 scenarios presented here for the TCP sources. Interpret this question as 6 runs - Reno/Reno, NewReno/Reno, Vegas/Vegas, NewReno/Vegas, SACK/Reno and SACK/NewReno. These will be your TCP sources at N1 and N5 resp.

  1. For part 2, there is no CBR flow from N2 to N3, correct? Just a tcp flow from N1 to N4 and a CBR flow from N5 to N6?

    => That is correct.
     

  2. When you say: "Graph the average packet loss rate and the average bandwidth used by all three flows ". What do you mean? I have two alternatives:
     a) If I run for a given bandwidth "b1" used by the CBR flow then I have to average the loss rate and bandwidth of all three flows:  e.g. (tcp1 + tcp2
    + cbr ) /3 where tcp1, tcp2, cbr are the packet loss at a given time t (or for the total running time).
     OR
     b) if I run ten times for B1, B2, ..., B10 (B1..B10 are different CBR bandwidth) then I have to average for each flow: e.g.: tcp1: avg(b1...b10)
     where b1..b2 are the packet loss for tcp1 at a given time t. In this case I will have separate packet loss for each flow (tcp1, tcp2 and cbr)

            => You need to do (b) i.e. plot the averages for each flow - udp, tcp1, and tcp2.

  1. I am a bit confused by the note in the assignment. Should we write extra-scripts to parse the nam traces and calculate the average bw, etc by
    ourselves. Our should we write a procedure that records each event and calculate these things and output them to a file which we give to xgraph?

            => You can do whatever you wish to really. The assignment is upto you.

  1. What is the difference between using a lossmonitor and a flowmonitor?

=> There are different types of monitors that track arrival, departure stats. Very specifically:
The Agent/LossMonitor is a traffic sinks, and stores the amount of bytes received. With a queue monitor it is possible to track the statistics of arrivals, departures and drops in either bytes or packets. A flow monitor is similar to the queue monitor but it keeps track of the statistics for a flow rather than for aggregated traffic. A classifier first
determines which flow the packet belongs to and then passes the packet to the flow monitor.

  1. For the question 2 in part 2, should we have all 3 UDP flows from N2 to N3, or N1->N4, N5->N6 and N2->N3? Since we are comparing their end-to-end delays, they probably should have  the same source node and destination nodes, right?

           => It will be the same link N2 to N3.

  1. When removing one TCP stream to analyze how a single TCP flow responds to a CBR flow, are the resulting two flows ...
    a) one TCP flow from N1 to N4 and one CBR flow from N2 to N3 or
    b) one TCP flow from N1 to N4 and one CBR flow from N5 to N6

         => Case a)

  1. I have 18 tcl files in total.  Do you really want them all pasted in to the pdf file or wouldn't it be easier to send them as seperate files?

=> You can submit a sample TCL script representative of each part (part 1 and 2) your homework assignment. That is, if you have just one line or two lines of your TCL script varying for each experiment, submit one of the .tcl files.