Prerequisite – TCP/IP Model
TCP protocol has methods for finding out corrupted segments, missing segments, out-of-order segments and duplicated segments.
Error control in TCP is mainly done through use of three simple techniques :
- Checksum – Every segment contains a checksum field which is used to find corrupted segment. If the segment is corrupted, then that segment is discarded by the destination TCP and is considered as lost.
- Acknowledgement – TCP has another mechanism called acknowledgement to affirm that the data segments have been delivered. Control segments that contain no data but has sequence number will be acknowledged as well but ACK segments are not acknowledged.
- Retransmission – When a segment is missing, delayed to deliver to receiver, corrupted when it is checked by receiver then that segment is retransmitted again. Segments are retransmitted only during two events: when the sender receives three duplicate acknowledgements (ACK) or when a retransmission timer expires.
- Retransmission after RTO : TCP always preserve one retransmission time-out (RTO) timer for all sent but not acknowledged segments. When the timer runs out of time, the earliest segment is retransmitted. Here no timer is set for acknowledgement. In TCP, RTO value is dynamic in nature and it is updated using round trip time (RTT) of segments. RTT is the time duration needed for a segment to reach receiver and an acknowledgement to be received to the sender.
- Retransmission after Three duplicate ACK segments : RTO method works well when the value of RTO is small. If it is large, more time is needed to get confirmation about whether a segment has delivered or not. Sometimes one segment is lost and the receiver receives so many out-of-order segments that they cannot be saved. In order to solve this situation, three duplicate acknowledgement method is used and missing segment is retransmitted immediately instead of retransmitting already delivered segment. This is a fast retransmission because it makes it possible to quickly retransmit lost segments instead of waiting for timer to end.
This article is contributed by Swasthik. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between Flow Control and Congestion Control
- Error Handling in Compiler Design
- Error Detection in Computer Networks
- Error detection and Recovery in Compiler
- Bit Stuffing error detection technique using Java
- Forward Error Correction in Computer Networks
- TCP Congestion Control
- Concurrency Control Techniques
- Congestion Control in Computer Networks
- Timestamp based Concurrency Control
- Role-based Access Control
- Access Control in Computer Network
- Introduction of Control Unit and its Design
- Machine Control Instructions in Microprocessor
- Access Control Tactics in Computer Networks
- Difference between Hardwired and Microprogrammed Control Unit
- Thread Control Block in Operating System
- Congestion Control techniques in Computer Networks
- Two Phase Locking (2-PL) Concurrency Control Protocol | Set 3
- Context based Access Control (CBAC)