Studying The TCP Flow and Congestion Con
Studying The TCP Flow and Congestion Con
Abstract - The Transmission Control Protocol (TCP) is outstanding data, the minimum of cwnd and rwnd governs data
connection oriented, reliable and end-to-end protocol that support transmission, and to determine which algorithm is used to
flow and congestion control, with the evolution and rapid growth control data transmission the slow start threshold (ssthresh) is
of the internet and emergence of internet of things IoT, flow and used.
congestion have clear impact in the network performance. In this
When an out-of-order segment arrives TCP receiver
paper we study congestion control mechanisms Tahoe, Reno,
Newreno, SACK and Vegas, which are introduced to control should send an immediate duplicate ACK to inform the sender
network utilization and increase throughput, in the performance that a segment was received out-of-order and which sequence
evaluation we evaluate the performance metrics such as number is expected, duplicate ACKs can be cause due to
throughput, packets loss, delivery and reveals impact of the cwnd. dropped segments or re-ordering of data segments by the
Showing that SACK had done better performance in terms of network, after fast retransmit algorithm sends the missing
numbers of packets sent, throughput and delivery ratio than segment the transmission of new data is governs by the "fast
Newreno, Vegas shows the best performance of all of them. recovery" algorithm until a non-duplicate ACK arrives [9].
Now days with the invention of Internet of Things (IoT)
Index Terms – TCP, Congestion mechanisms, Tahoe, Reno,
several low power communication technologies have been
Newreno, SACK and Vegas.
proposed, this devices may relay on the transport protocols
I. INTRODUCTION such as TCP or User Datagram Protocol (UDP), however there
are quite challenge must be considered, UDP may be easier to
The Transmission Control Protocol (TCP) is intended to implement in microcontrollers than TCP, but the security tools
provide a reliable process-to-process communication service, used for TCP (SSL/TLS) are not available in UDP, HTTP
able to transfer a continuous stream of octets in a multinetwork relies on the TCP. TCP’s flow control mechanism is not
environment. The TCP is intended to be a host-to-host appropriate for Low Power and Lossy Networks (LLNs) and
protocol in common use in multiple networks. its overhead is considered too high for short-lived transactions
TCP is used to provide a connection-oriented, end-to-end [13].
reliable, securable connection service between pairs of [14] Surveyed the most important aspects of the IoT, he
processes, it is able to transfer a continuous stream of octets in address that TCP cannot be used efficiently for the end-to-end
each direction between its users by packaging some number of transmission control in the IoT due to (Connection setup,
octets into segments for transmission through the internet Congestion control and Data buffering) therefore, information
system. should be the focus of communication and networking
Transmission is made reliable via the use of sequence solutions.
numbers and acknowledgments, sequence numbers are used to In section II of this paper, we describe the principles of
correctly order segments that may be received out of order and congestion control mechanisms and procedures that is
to eliminate duplicates, and acknowledgments must be followed to handle congestion, timeout and retransmission.
received within a timeout interval, otherwise the data is Section III presents a detailed description of the network
retransmitted, to govern the flow of data between TCP hosts, a model. In section IV we analyse simulations result and
flow control mechanism is employed [15]. discuss cwnd impact in the different simulations scenarios, and
TCP implements four congestion control algorithms: slow Section V concludes the paper.
start, congestion avoidance, fast retransmit, and fast recovery,
developed in [1] and [10]. TCP sender to control the amount II. OVERVIEW OF TCP CONGESTION CONTROL
of outstanding data being injected into the network use the MECHANISMS
slow start and congestion avoidance algorithms and add the
congestion window (cwnd) to the a sender-side to limit amount A. Congestion Control Algorithm
of transmit data before receiving an ACK, in receiver-side add1) 1) TCP Tahoe: TCP Tahoe based on TCP congestion
receiver's advertised window (rwnd) to limit the amount of control algorithm which was suggested by Van Jacobson in his
paper [1]. The flow on a TCP connection obey a ‘conservation
174 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 16, No. 11, November 2018
of packets’ principle, the protocol is ‘self-clocking’, new RTT, when the actual rate falls below the expected rate by a
packet isn’t put into the network until an old packet leaves. the certain amount, it changes from slow-start mode to linear
sender uses ACKs as a ‘clock’ to strobe new packets into the increase/decrease mode.
network, self-clocking systems automatically adjust to
bandwidth and delay variations and have a wide dynamic B. TCP Congestion Control Procedures
range, to start the ‘clock’, the a slow-start algorithm it Fig. 1 shows the TCP congestion control procedures that
developed to gradually increase the amount of data in-transit. must be followed when congestion occur, the retransmission is
2) TCP Reno: TCP Reno in [10] retains implementation needed to recover a missing packet, in slow start phase the
of the basic principle of Tahoe, such as slow starts, but add cwnd grow exponentially until it reach the threshold, after that
modification to the congestion avoidance algorithm, The Reno the congestion avoidance phase start and the value of threshold
algorithm prevents the pipe from going empty after a loss, and is set to half of the current window size, and cwnd is set to the
the packet loss is used as a signal that the pipe is congested value of threshold, then the cwnd size increase
can be detected by: a retransmit timeout slow-start must be linearly(additive increase) until three ACKs arrive to the
start, or three duplicate ACKs re-transmit the segment sender or time-out event occur, when three ACKs happen TCP
immediately and enter Fast Recovery and reduces its start fast transmission and fast recovery phase and
congestion window by one half and set SSthresh to the same multiplicative decrease procedure take over, and the value of
value, for each dup ACK received represents a single packet threshold is set to the half of current window size and the
have left the pipe and cwnd incremented by one. value of cwnd is set to the threshold value and congestion
3) TCP NewReno: modified Fast Recovery algorithm in avoidance phase start, in the second case if time-out occur at
RFC 2581, the TCP data sender responds to a partial this moment the multiplicative decrease start and reduce the
acknowledgment(the acknowledgement for the retransmitted threshold value to half of the current window size and cwnd it
packet will acknowledge some but not all of the packets set to one segment, TCP enter slow start phase again[16][17].
transmitted before the Fast Retransmit) by inferring that the
next in-sequence packet has been lost, and retransmitting that
packet [7], NewReno includes a small change to the Reno
algorithm at the sender that eliminates Reno's wait for a
retransmit timer when multiple packets are lost from a
window.
4) TCP Sack: With selective acknowledgments, the data
receiver can inform the sender about all segments that have
arrived successfully, so the sender need retransmit only the
segments that have actually been lost, The SACK option
follows the format in [4], the SACK option field contains a
number of SACK blocks The first block in a SACK option is
required to report the data receiver's most recently received
segment, and the additional SACK blocks repeat the most
recently reported SACK blocks, The main difference between
SACK and Reno is the behavior in the event of multiple
segment losses, During Fast Recovery , SACK maintains a
variable called pipe that represents the estimated number of
packets outstanding in the path[5][6].
5) TCP Vegas: TCP Vegas [2] is a modification of Reno
implementation, which introduced to provide some new
insights into congestion control, and to propose modifications
to the implementation of TCP that exploit these insights. It
employs three techniques to increase throughput and decrease
losses. New Retransmission Mechanism: its uses more
accurate RTT estimate to decide to retransmit also reads and
records the system clock each time a segment is sent. Vegas
treats the receipt of certain ACKs as a trigger to check if a Fig. 1 TCP congestion control procedures.
timeout should happen. Congestion A voidance Mechanism: it
determines congestion by a decrease in sending rate as C. Timeout and Retransmission
compared to the expected rate does not use the loss of segment TCP provides reliability when data segments and
to signal that there is congestion, it apply approaches in Wang acknowledgments can get lost, it handles this by setting a
and Crowcroft’s Tri-S scheme [3]. Modified Slow-Start timeout when it sends data, and if the data isn't acknowledged
Mechanism: it allows exponential growth only every other when the timeout expires, it retransmits the data.
175 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 16, No. 11, November 2018
Round-Trip Time (RTT) Measurement: 1) Throughput: is the link utilization or flow rate in bytes
TCP must measure the RTT between sending a byte and per second, the clear goal of most congestion control
receiving an acknowledgment, we use the following equations mechanisms to maximize throughput, throughput is important
that are applied to each RTT measurement M. in a wide range of environments, from highly-congested
networks to under-utilized ones, and from long-lived flows to
R = αR + (1 - α)M (1) very short ones.
2) Delay: can be measured as a flow-based metric in
Where α is a smoothing factor terms of per-packet transfer times, Per-packet delay can also
The initial retransmission timeout is calculated using the include delay at the sender waiting for the transport protocol to
formula: send the packet.
3) Packet Loss Rates: can be measured as a network-
RTO = A + 2D. (2) based or as a flow-based metric, a congestion event or loss
event consists of one or more lost or marked packets in one
The factor 2Dis used only for this initial calculation. After this round-trip time.
4D is added to A to calculate RTO. 4) Deployability: Metrics related to deployability include
the ease of failure diagnosis and the overhead in terms of
Err = M – A (3) packet header size or added complexity at end-nodes or
A = A + gErr (4) routers.
D = D + h(|Err| - D) (5)
RTO = A + 4D (6)
III. NETWORK MODEL AND SIMULATIONS
Where A is the smoothed RTT (an estimator of the average) We used NS2-Simulator to simulate the different network
D is the smoothed mean deviation. scenarios, NS-2 is a discrete event simulator targeted at
Err is the difference between the measured value just obtained networking researches hence it provides a substantial support
and the current RTT estimator. for the simulation of these TCP variants [12]. Fig. 3 shows the
Both A and D are used to calculate the next retransmission simulation topology, the sender TCP source and the receiver
timeout (RTO). TCP sink communicate throw bottleneck link 500 kbit/s and
The gain g is for the average and the larger gain for the 100ms propagation delay.
deviation makes the RTO go up faster when the RTT changes
[8].
Fig. 2 is provide a visual description of round trip time TCP
congestion control mechanism.
176 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 16, No. 11, November 2018
TABLE I
NUMBERS OF PACKETS SENT, RECEIVED AND LOST Fig. 5 depicts the number of lost packet versus time for
the different TCP congestion control techniques, during
Congestion Number of
Control Number of packets
Number of initialization period from 0 to 5 seconds there were multiple
packets lost packets dropped, after that the ratio is vary according to the
Mechanisms packets sent received
Tahoe 35550 35520 30 TCP technique that is implemented, TABLE I shows total
numbers of the lost packets.
Reno 33694 33668 26
TABLE II
Throughput, Packet Delivery Ratio, and Average delay
Congestion
Average Fig. 5 Number of lost packet vs. time
Control Throughput Packet delivery ratio
delay
Mechanisms
Tahoe 0.18456 420.71 99.75 In the Fig. 6 from the start time 0 to approximately time
equal to 50 second Sack shows the highest throughput in
Reno 0.17465 398.70 99.77
contrast to the other congestion control mechanism after 50
Newreno 0.18642 451.36 99.73 second Vegas shows the highest throughput after it reach the
steady state, Sack has highest throughput than Tahoe, Reno
Sack 0.18859 463.62 99.77 and Newreno because it has ability to send only segments that
Vegas 0.12057 473.83 100.00 are lost and use the list of duplicate segments, and use the
SACK option, however SACK option can only be used for
TCP connections when both TCP end-nodes support the
Fig. 4 plots sequence numbers versus time for the SACK option. The Reno show the worst performance because
congestion control mechanism and it represent the differences when the number of the lost segments in the RTT more than
between them, the Reno and Tahoe has small curve in their one it handle the first segment and wait for time-out and start
lines due to the to the operations procedures that is used to slow-start phase.
handle the lost packets in the network.
Fig. 4 sequence numbers vs. time Fig. 6 Comparison of throughput vs. time.
177 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 16, No. 11, November 2018
178 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 16, No. 11, November 2018
sustain in congestion avoidance and the value of the window segment follow ACK has been lost, SACK use selective ACK
increase linearly until congestion occurs again. to enhance network performance it shows better performance
than Newreno, but the receiver must also support the selective
ACK, Vegas with the proactive measurement shows the best
performance to encounter congestion.
REFERENCES
[1] V.Jacobson, “Congestion Avoidance and Control,” SIGCOMM
Symposium on Communications Architectures and Protocols, pages
314–329, 1988.
[2] L.Brakmo, S. O'Malley, and L.Peterson. TCP vegas: Newtechniques for
congestion detection and avoidance. In Proceedings of the
ACMSIGCOMM, pages 24-35, August1994.
[3] Z. Wang and J. Crowcroft. A New Congestion Control Scheme: Slow
Start and Search (Tri-S). ACM Computer Communication Review,
21(1):32–43, Jan 1991.
[4] Matthew Mathis, Jamshid Mahdavi, Sally Floyd, and Allyn Romanow.
“TCP Selective Acknowledgment Options,” (Internet draft, work in
progress), 1996.
[5] K. Fall and S. Floyd. Simulation-based comparisons of Tahoe, Reno,
and SACK TCP. In ACM Computer Communication Review, volume
Fig. 11 Congestion window behavior and threshold values of SACK 26, pages 5-21, July 1996.
congestion algorithms. [6] M.Mathis,J .Mahdavi, S.Floyd, and A.Romanow. TCP selective
acknowledgement options. RFC2018, October1996.
[7] S. Floyd, A. Gurtov and T. Henderson “The NewReno Modification to
Fig. 12 shows the effect of the cwnd and the value of TCP's Fast Recovery Algorithm,” RFC 3782, April 2004.
ssthresh in Vegas, it used α and β thresholds to control the [8] W. Richard Stevens, “TCP/IP Illustrated,” Vol 1, the Protocols. Addison
size of the congestion window. The congestion window has Wesley, 1994.
fixed size due to the performance techniques that is applied to [9] M. Allman, V. Paxson, E. Blanton, “TCP Congestion Control,”
RFC2581, September 2009.
increase throughput and decrease losses of the packet. [10] Jacobson, V., "Modified TCP Congestion Avoidance Algorithm", April
30, 1990.
[11] S. Floyd, Ed, “Metrics for the Evaluation of Congestion Control
Mechanisms”, RFC 5166, March 2008.
[12] “NS-2 Network Simulator,” [Online]. Available.
http://www.isi.edu/nsnam/ns/, 2000.
[13] O. Vermesan and P .Friess, “Internet of Things – From Research and
Innovation to Market Deployment”, 2014.
[14] L.Atzori A.Iera G.Morabito “The Internet of Things: A survey,”
Computer Networks 54, 2010.
[15] M. Del, “Transmission Control Protocol,” RFC 793 September 1981.
[16] B.Fourzan, “TCP/IP Protocol Suite,” Vol 4, McGraw-Hill, 2010.
[17] B.Fourzan, “Data communication and Networking,” Vol 4, McGraw-
Hill, 2007.
V. CONCLUSION
In this paper, we have presented TCP congestion control
mechanisms, our studies evaluate flow and congestion
mechanisms for different TCP variants, Tahoe show poor
performance when packets loss, it’s complete timeout interval,
Reno unable to control the congestion when recovering from
dropped packet it perform like Tahoe when network encounter
extremely packet loss, Newreno more powerful it overcome
the problem faced by Reno it can detect multiple packet loss
per sending window, it’s use partial ACK to indicate that the
179 https://sites.google.com/site/ijcsis/
ISSN 1947-5500