TCP: Transmission Control Protocol: A Reliable, Connection-Oriented, Byte-Stream Service
TCP: Transmission Control Protocol: A Reliable, Connection-Oriented, Byte-Stream Service
TCP: Transmission
Control Protocol
A Reliable, Connection-Oriented,
Byte-Stream Service
OBJECTIVES
This lab is designed to demonstrate the congestion control algorithms implemented by the
Transmission Control Protocol (TCP). The lab provides a number of scenarios to simulate
these algorithms. You will compare the performance of the algorithms through the analysis
of the simulation results.
99
OVERVIEW
The Internets TCP guarantees the reliable, in-order delivery of a stream of bytes. It includes
a flow-control mechanism for the byte streams that allows the receiver to limit how much
data the sender can transmit at a given time. In addition, TCP implements a highly tuned
congestion-control mechanism. The idea of this mechanism is to throttle the rate at which
TCP sends data, to keep the sender from overloading the network.
The idea of TCP congestion control is for each source to determine how much capacity is
available in the network so that it knows how many packets it can safely have in transit. It
maintains a state variable for each connection, called the congestion window, which is used
by the source to limit how much data the source is allowed to have in transit at a given time.
TCP uses a mechanism called additive increase/multiplicative decrease. With this feature,
TCP decreases the congestion window when the level of congestion goes up and increases
the congestion window when the level of congestion goes down. TCP interprets timeouts
as a sign of congestion. Each time a timeout occurs, the source sets the congestion window
to half of its previous value. This halving corresponds to the multiplicative decrease part
of the mechanism. The congestion window is not allowed to fall below the size of a single
packet (the TCP maximum segment size, or MSS). Every time the source successfully sends a
congestion window worth of packets, it adds the equivalent of one packet to the congestion
window; this is the additive increase part of the mechanism.
TCP uses a mechanism called slow start to increase the congestion window rapidly from
a cold start in TCP connections. It increases the congestion window exponentially rather
than linearly. Finally, TCP utilizes a mechanism called fast retransmit and fast recovery.
Fast retransmit is a heuristic that sometimes triggers the retransmission of a dropped packet
sooner than the regular timeout mechanism.
Network Simulation Experiments Manual
In this lab, you will set up a network that utilizes TCP as its end-to-end transmission protocol,
and you will analyze the size of the congestion window with different mechanisms.
PRE-LAB ACTIVITIES
& Read Section 5.2 from Computer Networks: A Systems Approach, 5th Edition.
: Go to www.net-seal.net and play the following animations:
TCP Connections
TCP Multiplexing
TCP Buffering and Sequencing
User Datagram Protocol (UDP)
PROCEDURE
Create a New Project
1. Start OPNET IT Guru Academic Edition Choose New from the File menu.
2. Select Project and click OK Name the project <your initials>_TCP, and the scenario
No_Drop Click OK.
3. In the Startup Wizard: Initial Topology dialog box, make sure that Create Empty Scenario
is selected Click Next Select Choose From Maps from the Network Scale list Click
Next Choose USA from the Map List Click Next twice Click OK.
101
Applications Profiles
IP
West East
USA internet
3. Click Show. The resulting graphs should resemble the ones that follow.
105
4. To zoom in on the details in the graph, click and drag your mouse to draw a rectangle, as
shown in the preceding figure.
The graph should be redrawn to resemble the following one:
Network Simulation Experiments Manual
Notice the Segment Sequence Number is almost flat with every drop in the congestion
window.
5. Close the View Results dialog box and select Compare Results from the Result menu.
6. Fully expand the Object Statistics hierarchy as shown and select the following result:
Sent Segment Sequence Number.
7. Click Show. After you zoom in, the resulting graph should resemble the one shown here.
106
LAB 10
TCP: Transmission Control Protocol
FURTHER READINGS
OPNET TCP Model Description: From the Protocols menu, select TCP Model Usage
Guide.
Transmission Control Protocol: IETF RFC number 793 (www.ietf.org/rfc.html).
EXERCISES
1. Why does the Segment Sequence Number remain unchanged (indicated by a horizontal
line in the graphs) with every drop in the congestion window?
2. Analyze the graph that compares the Segment Sequence numbers of the three scenarios.
Why does the Drop_NoFast scenario have the slowest growth in sequence numbers?
3. In the Drop_NoFast scenario, obtain the overlaid graph that compares Sent Segment
Sequence Number with Received Segment ACK Number for Server_West. Explain
the graph. Hint: Make sure to assign all values to the Capture mode of the Received
Segment ACK Number statistic.
4. Create another scenario as a duplicate of the Drop_Fast scenario. Name the new scenario
Q4_Drop_Fast_Buffer. In the new scenario, edit the attributes of the Client_East node
and assign 65535 to its Receiver Buffer (bytes) attribute (one of the TCP Parameters).
Generate a graph that shows how the Congestion Window Size (bytes) of Server_West
gets affected by the increase in the receiver buffer. (Compare the congestion window size
graph from the Drop_Fast scenario with the corresponding graph from the Q4_Drop_
Fast_Buffer scenario.)
LAB REPORT
Prepare a report that follows the guidelines explained in the Introduction Lab. The report
should include the answers to the preceding exercises as well as the graphs you generated 107
from the simulation scenarios. Discuss the results you obtained and compare these results
with your expectations. Mention any anomalies or unexplained behaviors.