Quick Public Links

DEGAS Member Links

People

Sponsors

DEGAS networking group

QualNet 5.0 Exercises:
Chapter 3. Transport Layer

Objective

This exercise is to simulate the data transfer services of the two Internet transport layer protocols - TCP and UDP, and the end-to-end congestion control mechanisms used by an early version of TCP - TCP Tahoe.


Overview

In this exercise, you will simulate both FTP/TCP and CBR/UDP traffic at the same time over a simple wired network of five nodes shown in the following figure. By examining/modifying the default configuration files under '[QUALNET_HOME]/scenarios/default/', you will create the following customized configuration files for above networks: exp3.config for specifying global parameters like experiment name, time, links, nodes, etc.), exp3.nodes (for node placement), and exp3.app (for application specification). Next, you will study the congestion control mechanisms (slow start and congestion avoidance) in TCP Tahoe, by examining TCP's response to congestion and plotting the congestion window graph.

Experiment 3 topology

Figure 1. Topology

Procedure

  1. Make a copy of default.config named as exp3.config, and make the following changes to it:
    • Set EXPERIMENT-NAME to 'exp3';
    • Set SIMULATION-TIME to '10M';
    • Set TERRAIN-DIMENSIONS to '(600, 400)';
    • Comment out the SUBNET statement, and set four point-to-point links according to above topology;
    • Set LINK-PHY-TYPE to 'WIRED';
    • Set LINK-BANDWIDTH to '65536';
    • Set LINK-PROPAGATION-DELAY to '5MS';
    • Set LINK-MAC-PROTOCOL to 'ABSTRACT';
    • Set NODE-PLACEMENT to 'FILE', and NODE-POSITION-FILE to './exp3.nodes';
    • Specify a wired routing protocol, say, 'BELLMANFORD';
    • Set TCP implementation to 'TAHOE' ('LITE' is the default flavor of TCP for QualNet 5.0);
    • Set TCP-RECEIVE-BUFFER to '65535';
    • Set APP-CONFIG-FILE to './exp3.app';
    • Turn off all statistics except for application, TCP, and UDP.

  2. Copy the file default.nodes to exp3.nodes. Specify the (x, y, z) coordinates of nodes 1~5 as (100, 275, 0), (100, 150, 0), (200, 200, 0), (400, 200, 0), and (500, 200, 0).

  3. Copy the file default.app to exp3.app, and specify the following traffic:
    • TCP traffic: Create a FTP/GENERIC connection from node 1 to node 5 that continuously transmits 512-byte application layer data items at the start of the simulation up to 590 seconds into the simulation.
    • UDP traffic: Create a CBR traffic from node 2 to node 5 that continuously transmits 512-byte application layer data items at the start of the simulation up to 590 seconds into the simulation. The interdeparture time for each item is 0.1 second. This traffic is used to create network congestion for testing TCP's as well as UDP's responses to congestion.

  4. With above three configuration files in '[QUALNET_HOME]/bin/', run 'qualnet exp3.config' in above directory. Check the generated statistics file exp3.stat, and analyze the results of the simulation.

  5. In order to examine TCP's congestion control mechanism, values of snd_swnd (sending side congestion window) need to be traced:
    • In the file exp3.config, enable TCP-TRACE option for node 1 (the source of the TCP traffic), i.e., add ' [1] TCP-TRACE DEBUG'.

  6. Run 'qualnet exp3.config' again. A file named tcptrace.out will also be generated.

  7. Use 'cat tcp_trace.out | grep snd_cwnd > tcp_cwnd.out' to get the file tcp_cwnd.out which only contains lines with snd_cwnd values.

  8. Based on the file tcp_cwnd.out, plot snd_cwnd values against the RTT using any graph generating program such as gnuplot or Microsoft Excel. You should be able to observe a graph similar to the following.

    cwnd of TCP Tahoe

    Figure 2. Sending side congestion window size vs. RTT for TCP Tahoe

Solution: Click here to download the configuration files (exp3.config, exp3.nodes, exp3.app).


Questions

  1. What are the TCP variants supported by QualNet 5.0? Describe the differences among these TCP variants.

  2. Examine the FTP/TCP statistics in the file exp3.stat:
    • For node 1 (the TCP sender), what is the 'Total Bytes Sent' from the FTP application? How about the 'Data Packets Sent', 'Data Packets in Sequence', and 'Data Packets Retransmitted' by TCP? What are the relationships among them?
    • For node 5 (the TCP receiver), what is the 'Total Bytes Received' by the FTP application? What is the delivery ratio (i.e., #received / #sent) for this FTP application?

  3. Examine the CBR/UDP statistics in the file exp3.stat:
    • For node 2 (the UDP sender), what is the 'Total Packets Sent' from the CBR application?
    • For node 5 (the UDP receiver), what is the 'Total Packets Received' by the CBR application? What is the delivery ratio (i.e., #received / #sent) for this CBR application? Compared to TCP, how reliable is UDP's data transfer service?

  4. Examine the the file tcp_cwnd.out and plotted congestion window graph:
    • What is the Maximum Segment Size (MSS) used in this TCP connection?
    • Describe the slow start phase, congestion avoidance phase, and the window decrease throughout the life time of this TCP connection.
    • Comment on the responses of the TCP sender to packet loss in different TCP variants.

References and Further Readings

  1. Sections 3.1, 3.3, and 3.5 ~ 3.7 of the textbook.
  2. QualNet 5.0 User's Guide.