IJRIT International Journal of Research in Information Technology, Volume 1, Issue 11, November, 2013, Pg. 505-513
International Journal of Research in Information Technology (IJRIT)
www.ijrit.com
ISSN 2001-5569
Comparative Study of Congestion Control Mechanism of Tcp Variants Using Ns2 Prabhjot Kaur, Guneet Singh, Sukhmeet Singh, Sunpreet Kaur Guide- Mr. Puneet Singh Student ,Guru Tegh Bahadur Institute of Technology Guru Gobind Singh Indraprastha University Sector-16C, Dwarka, New Delhi, India Abstract Tcp (transmission control protocol) is a standard internet communication protocol that allows digital computers to communicate over long distance. Tcp is responsible for verifying the correct delivery of data from client to the server. Today most internet applications rely on tcp to deliver data reliably .Although it was not in its initial design the most essential element of tcp is congestion control; it defines tcp performance characteristics. Data can be lost in the intermediate network. Tcp adds support to detect errors and to trigger re transmission until the data is correctly and completely received. In this paper we present the review and comparison of tcp variants-Tahoe and Reno on the basis of parameters such as throughput, end to end delay, average transmission delay., packet drop, packet received and packet retransmitted using simulator (Network simulator 2). This analysis is necessary to be aware of which tcp implementation is better for a specific scenario, where from an appropriate one will be selected. This paper covers all he variants and its algorithms to observe their nature regarding to their features.
KEYWORDS- Acknowledgement, Congestion, Reno, Tcp Tahoe, Slow start, Threshold, Retransmission.
I. INTRODUCTION TCP (Transmission Control Protocol) is a set of dominations used along with the Internet Protocol (IP) to transmit data in the form of message units between system devices over the Internet. TCP keeps itself informed of the individual units of data (called packets) that a message is divided into for efficient routing through the Internet. TCP, Prabhjot Kaur, IJRIT
505
a transport layer protocol, is known as a connection-oriented protocol, which means that a connection is established and maintained until such time as the message or messages to be exchanged by the application programs at each end have been exchanged. It is a sliding window protocol that provides handling for both timeouts and retransmissions and is used by applications that require guaranteed delivery. TCP establishes a full duplex virtual connection between two endpoints. Each endpoint is defined by an IP address and a TCP port number. The information is sub-divided into byte streams which are transferred in segments. The window size at the transmitting end determines the number of bytes of data that can be sent before an acknowledgment from the receiver is obtained. 1.1 SLOW START MECHANISM: It remarks that the rate at which new packets should be introduced into the network is same as the rate at which the acknowledgments are returned by the other end. It delimits a “congestion window” (cwnd) for a new connection with size one segment. Every time an ACK (acknowledgement) is received this window is increased by one window. Sender can send data up to cwnd or advertised window. ALGORITHM: • • •
•
The sender onsets by diffusing one segment in the network and waiting for its ACK. When that ACK is received, the congestion window is incremented from one to two, and two segments can be sent. After each of those two segments is acknowledged, the congestion window is increased to four. This procedure is unceasing and an exponential growth is obtained. At times the ACKs may be delayed by the receiver, sending one ACK for every two segments that it receives. At some point the scope of the internet can be reached, and an intermediate router will start shedding packets signifying the sender that its congestion window has exceeded its capacity.
II. CRITIQUE OF TCP VARIANTS 2.1 TAHOE Tahoe, as suggested by Van Jacobson, refers to the TCP congestion control algorithm. An acknowledgement connotes delivery of the packet to the receiver. TCP uses these acknowledgements to time the retiring packets implementing the principle of ‘conservation of packets’, i.e. if the connection is running at the available bandwidth capacity then a packet is not inserted into the network unless a packet is taken out as well. It also maintains a congestion window CWD to exhibit the network capacity. 2.1.1 CONCEPT OF CONGESTION AVOIDANCE: Packets are sent taking into account the minimum of cwnd and the receiver's advertised i.e one-half of the current window size but at least two segments. Congestion is indicated by a timeout or the reception of duplicate ACKs. When congestion occurs, one-half of the current window size is saved in ssthresh (slow start threshold) and cwnd is set to one segment (i.e., slow start). When new data is acknowledged by the other end, increases the cwnd depending on whether TCP is performing slow start or congestion avoidance. ALGORITHM:
Prabhjot Kaur, IJRIT
506
• •
TCP is performing congestion avoidance except the case when cwnd is less than or equal to ssthresh as operating in slow start. Up until TCP is halfway to where it was when congestion occurred, slow start persists and then congestion avoidance reinstates.
Fig 1. Tcp slow start and congestion avoidance phase 2.1.2 LIMITATIONS: To detect a packet loss TCP takes a complete timeout interval and as a matter of fact, in most enactments it takes even longer because of the coarse grain timeout and since it doesn’t send immediate ACK’s, it sends cumulative acknowledgements; therefore it follows a ‘go back N’ approach. Thus every time a packet is lost it waits for a timeout and the pipeline is emptied. This offers a major cost in high band-width delay product links and hence poses a major drawback.
2.2 TCP Reno TCP Reno is the most widely adopted Internet TCP protocol. Four transmission phases: slow start, congestion avoidance, fast retransmit, and fast recovery are deployed. The sender receives three duplicate acknowledgments or the sender’s retransmission timeout (RTO) timer expires on encountering a packet loss in a congested link owing to buffer overflow in the intermediate routers. TCP fast retransmit and recovery algorithms are activated by the sender and its congestion window size is reduced to half when three duplicate ACKs are received. Then congestion window increases linearly, similar to the case of congestion avoidance. This boost in transmission rate is slower than in the case of slow start and helps dismisses congestion. TCP Reno fast recovery algorithm improves TCP performance in case of a single packet loss within a window of data. However, performance of TCP Reno suffers in case of multiple packet losses within a window of data. 2.2.1 FAST RETRANSMIT and RECOVERY MECHANISM: A duplicate ACK is generated by TCP when an out- of-order segment is received. This immediate duplicate ACK briefs the other end that a segment was received out of order, and what sequence number is expected. It is assumed that if there is just a reordering of the segments, there will be only one or two duplicate ACKs before the reordered Prabhjot Kaur, IJRIT
507
segment is processed, which will then generate a new ACK. If three or more duplicate ACKs are received in a row, it is a strong indication that a segment has been lost. TCP then performs a retransmission of what appears to be the missing segment, without waiting for a retransmission timer to expire.The fast retransmit and fast recovery algorithms are usually implemented together as follows. (a) When the third duplicate ACK in a row is received –
set ssthresh to one-half the current cwnd, but no less than two segments and Retransmit the missing segment.
(b) Each time another duplicate ACK arrives, –
increment cwnd by the segment size and Transmit a packet, if allowed by the new value of cwnd.
(c) When the next ACK arrives that acknowledges new data – – –
set cwnd to ssthresh. This ACK should acknowledge all the intermediate segments sent between the lost packet and the receipt of the first duplicate ACK. This step is congestion avoidance, since TCP is down to one-half the rate it was at when the packet was lost.
LIMITATIONS: Reno’s congestion detection and control mechanisms use the loss of segments as a signal that there is congestion in the network. TCP Reno has therefore no mechanism to detect the developing stages of congestion before losses occur and cannot prevent such losses. Further it can only detect a single packet loss and hence its performance is almost the same as Tahoe under conditions of multiple packet loss. In the case of multiple packet drop the information about the first packet loss comes when the duplicate ACK’s are received, but about the second lost packet will come only after the ACK for the first retransmitted segment reaches the sender after one RTT. Also the CWD sometimes is reduced twice for packet losses which occurred in one window. Also if the widow is very small when the loss occurs then we would never receive enough duplicate acknowledgements for a fast retransmit and we would have to wait for a coarse grained timeout. Thus it cannot effectively detect multiple packet losses.
III. COMPARISON OF TCP VARIANTS USING NS2 3.1 SIMULATED NETWORK:
Prabhjot Kaur, IJRIT
508
Fig 2: Network Simulation A small size network with 4 nodes (Node 0, Node 1, Node3, Node4) is generated and a TCP connection between Node 0- Node 3 and Node1- Node 3 is created, and FTP application that generates constant packets through the TCP connection is also attached. FTP packet size is chosen to be 1040 bytes long. Duration of the simulation scenarios is 10 seconds and the FTP connections started at time equals to 1.0 seconds and continue until the end of the simulation, in a 700x500 meter flat space. 3.2
EVALUATION OF SIMULATION:
In the given network there are two TCP connection, having 2 sources i.e. Node 0 and Node 1,while destination for both connection is same i.e. Node 3 there is common link that receives traffic from two connections simultaneously .So ,the link between Node 2 and Node 3 is called bottleneck link. Fig 3 and Fig 4 shows the size of congestion window and length of the queue at Node 2 i.e. bottleneck link for the two variants of TCP i.e. Tahoe and Reno in given network. From Fig 3 and Fig 4 it is shown clearly that size of the congestion window is decreasing as length of the at bottleneck link increases, causing increase in delay leading to the round trip delay to exceed. Throughput is being calculated by examining the number of packets being sent over simulation time for both variants.
Fig 3: Showing the queue length and congestion window in TCP Tahoe.
Prabhjot Kaur, IJRIT
509
Fig 4: Showing the queue length and congestion window in TCP Reno
Fig 5: Showing the Bandwidth in TCP Tahoe
Prabhjot Kaur, IJRIT
510
Fig 6: Showing the Bandwidth in TCP Reno
Fig 7: Showing Packet Drop in TCP Tahoe
Prabhjot Kaur, IJRIT
511
Fig 7: Showing Packet Drop in TCP Reno
Type
Packet received
Throughput
Average transmission delay
End to end delay
Packet retransmit
Packet loss
Tahoe
258
238506.67
0.05028
0.03047
10
24
Reno
876
809813.33
0.04790
0.02751
15
25
IV. CONCLUSION AND FUTURE SCOPE: Hence, from the table and the graph shown above, it can be clearly interpreted that TCP Reno works more efficiently than TCP Tahoe in terms of packet received, throughput, average transmission delay, end to end delay, packet retransmit and packet loss. Next we would like to compare the above mentioned variants in wireless and heterogeneous environment and will evaluate how effective these variants are as losses in these environments are not only because of congestion but various other factors like interference, error.
V. REFRENCES [1] Kai Shi, Yantai Shu, Oliver Yang, and Jiarong Luo “Receiver-Assisted Congestion Control to Achieve High Throughput in Lossy Wireless Networks” IEEE TRANSACTIONS ON NUCLEAR SCIENCE, VOL. 57, NO. 2, pp.491-496 APRIL 2010. [2] YE TIAN, KAI XU, AND NIRWAN ANSARI “TCP in Wireless Environments: Problems and Solutions” IEEE Radio Communications March 2005, 0163-6804/05. [3] Alexander Afanasyev, Neil Tilley, Peter Reiher, and Leonard Kleinrock “ Host-to-Host Congestion Control for TCP” IEEE COMMUNICATIONS SURVEYS & TUTORIALS, VOL. 12, NO. 3, pp.304-341, THIRD QUARTER 2010.
Prabhjot Kaur, IJRIT
512
[4] Zheng Wang, Jon Crowcroft “Eliminating Periodic Packet Losses in the 4.3-Tahoe BSD TCP Congestion Control Algorithm” ACM Computer Communication Review, vol. 22, no. 2, pp. 9–13, 1992. [5] M. Allman, V. Paxson, and W. Stevens, “RFC2581—TCP congestion control,” RFC, 1999.
[6] Kolawole I. Oyeyinka, Ayodeji O. Oluwatope, Adio. T. Akinwale, Olusegun Folorunso, Ganiyu A. Aderounmu, Olatunde O. Abiona “TCP Window Based Congestion Control Slow-Start Approach” Communications and Network, 2011, 3, pp.85-98. [7] Luigi A. Grieco and Saverio Mascolo, “Performance Evaluation and Comparison of Westwood+, New Reno, and Vegas TCP Congestion Control” ACM Computer Communication Review, vol. 342, April 2004. [8] L. Brakmo and L. Peterson, “TCP Vegas: end to end congestion avoidance on a global Internet,” IEEE J. Sel. Areas Commun., vol. 13, no. 8, pp. 1465–1480, October 1995. [9] Saverio Mascolo, Claudio Casetti, Mario Gerla, M. Y. Sanadidi, and Ren Wang, “TCP Westwood: Bandwidth Estimation for Enhanced Transport over Wireless Links” ACM SIGMOBILE 7/01 Rome, Italy © 2001 ACM ISBN 1-58113-422-3/01/07. [10] Ahmed Khurshid, Md. Humayun Kabir, and Md. Anindya Tahsin Prodhan, “An Improved TCP Congestion Control Algorithm for Wireless Networks” Communications, Computers and Signal Processing (PacRim), 2011 IEEE Pacific Rim Conference, pp- 382 – 387.
[11] David Q. LIU, Williana Jean BAPTISTE, “ On Approaches to Congestion Control over Wireless Networks”, Int. J. Communications, Network and System Sciences, 2009, 3, pp.169-247.
[12] Ren Wang, Massimo Vidla, M.Y. Sanadidi, and Mario Gerla, “Adaptive Bandwidth Share Estimation in TCP Westwood”, Global Telecommunications Conference, 2002. GLOBECOM '02. IEEE , Issue Date: 17-21 Nov. 2002 , Volume: 3. [13] R. Wang, M. Valla, M. Sanadidi, B. Ng, and M. Gerla, “Efficiency friendliness tradeoffs in TCP Westwood,” Proc. Seventh International Symposium on Computers and Communications, pp. 304–311, 2002. [14] Ghassan A. Abed, Mahamod Ismail and Kasmiran Jumari, “A Survey on Performance of Congestion Control Mechanisms for Standard TCP Versions” Australian Journal of Basic and Applied Sciences, 5(12): pp. 1345-1352, 2011, ISSN 1991-8178. [15] Mandakini Tayade, Sanjeev Sharma, “Review of Different TCP Variants in AD-HOC Networks”, International Journal of Engineering Science and Technology (IJEST), Vol. 3 No. 3 March 2011, pp.1906-1913, ISSN : 09755462. [16] Behrouz A. Forouzan, “TCP/IP Protocol Suite”, 3rd edition,Tata McGraw Hill, ISBN-13:978-0-07-060004-1.
Prabhjot Kaur, IJRIT
513