CS 4873 Computer Networks, Fall 1999 Assignment 3

Due Thursday, November 4 at the start of class


Print out the postscript files: /usr/local/courses/cs4873/fall1999/cover3.ps and /usr/local/courses/cs4873/fall1999/table3.ps.
The first should be used as your cover sheet. The second is for part of your answers to the first two problems.
For some of these problems you will be running the protocol simulator and describing the results you obtained. To run the simulator execute:
/usr/local/courses/java/bin/runnet
The results of the simulation (like real network protocols) depends on real time and if timeouts are set tight, other processes on the machine can affect the timing. If this seems to be happening, slow down the flow of virtual time. For performance reasons you should run the scenarios with the Gantt chart hidden and then show the Gantt chart after the scenario has completed.

You will be asked to print out snapshots of the Gantt chart. There are two ways to do this.

  1. You can use the save button on the Gantt chart to create a GIF file out of the image. You can then view the GIF file in a browser to print it out.
  2. You can use snapshot from the Programs menu to produce an Sun raster file and then convert this raster file to postscript using a program like xv. If you do not know how to use these programs, ask a friend or see me. Hand in all Gantt chart printouts with your assignment. Make sure they are labeled with the problem that they correspond to.

  1. This problem refers to Protocol 5. Assume that sequence numbers are 3 bits.
    Suppose that frames 3, 4, 5, 6 and 7 are buffered by the sender and that the receiver is expecting frame 5.
    Note that both of these statements refer to the protocol running on the same host.
    Assume that no events occur except for those explicitly stated in this problem.
    1. Fill in the second column of the table with the values of the variables listed there.
    2. Is the network layer enabled or disabled?
    3. Suppose a frame of type data is received with sequence number 4 and Ack sequence number 5. What does the protocol do?
      Fill in the third column of the table.
    4. Suppose instead, a frame comes in with sequence number 5 and Ack sequence number 1. What does the protocol do?
      Fill in the fourth column of the table.

  2. This problem refers to Protocol 6. Assume that sequence numbers are 3 bits.
    Suppose that frames 2, 3, 4 and 5 are buffered by the sender and that the receiver has frame 6 buffered and is expecting frame 5.
    Note that both of these statements refer to the protocol running on the same host.
    Assume that no events occur except for those explicitly stated in this problem.
    1. Fill in the second column in table.
    2. Suppose a frame of type data is received with s.seq = 7 and s.ack = 4.
      Fill in the third column of the table below.
    3. Starting with the original situation, (not part ii), suppose a frame of type data is received with s.seq = 5 and s.ack = 1. Fill in the fourth column of the table.

  3. Run Scenarios 1 and 2 of Protocol 5 and describe the results. Describe what happened in each scenario. Print out a copy of the Gantt charts that are produced. What is the total time to complete each Scenario?

  4. Run Scenario 3 of Protocol 5. This is identical to Scenario 1, but with a longer timeout. What is the timeout value used? Print out a copy of the Gantt chart produced. What is the total time for the scenario?

  5. Suppose that the timeout for Scenario 1 of Protocol 5 were set to x seconds where x >> 50. Write down an approximate formula for the total time for completing Scenario 1 of Protocol 5.

  6. Run Protocol 5, Scenario 4 and again print out a Gantt chart. This is a modification of Protocol 5 in which the sender treats an unexpected Ack as a Nak. This would be a minor modification to the protocol. How does the long timeout value affect the time to complete the scenario? Explain why this is not feasible for the bidirectional Protocol 5 described in the text.

  7. Run Protocol 6, Scenario 1 and print out a Gantt chart. This scenario is similar to Scenario 3 of Protocol 5. Compare the total running time with that of Protocol 5, Scenario 3.

  8. Run Protocol 6, Scenario 1 with a timeout of 50 seconds and print out a Gantt chart. To run the scenario with a different timeout, push the Immediate Start button before starting the scenario. This will change the button to Delay Start. Start the scenario (nothing should happen) and pull up the Control panel. Change the timeout and then push the Delay Start button to start it going.
    Compare the results to that with the default timeout of 30 seconds. How does the result depend on the timeout?

  9. Describe a possible scenario for Protocol 6 which starts like Scenario 1 but in which an event occurs and a long timeout affects the total running time.

  10. Run Scenario 2 of Protocol 6 in which the protocol does not send Naks. Print out a Gantt chart and describe the results.