Fast Recovery Technique For Loss Recovery in TCP


Introduction

Transmission Control Protocol (TCP) is a widely used protocol for data transmission over internet. However, data transmission over TCP is not always error-free. transmission can be disrupted due to several reasons such as network congestion, packet loss, or failure of intermediate devices. In such cases, TCP uses a loss recovery technique to recover lost data and retransmit it. This technique is crucial in ensuring reliability of data transmission over internet. In this article, we will discuss fast recovery technique for loss recovery in TCP.

Understanding TCP loss recovery technique

TCP uses a three-way handshake mechanism to establish a connection between two devices. Once connection is established, data transmission begins. TCP divides data into segments and sends them over network. receiver acknowledges receipt of each segment. If sender does not receive acknowledgment of a segment, it assumes that segment has been lost and retransmits it.

TCP uses a congestion control mechanism to avoid congestion in network. If a sender receives three duplicate acknowledgments for same segment, it assumes that segment has been lost and reduces its sending rate to avoid congestion in network. This mechanism is known as slow start. Slow start reduces sending rate to half of previous sending rate, and sender gradually increases sending rate as it receives acknowledgments for transmitted segments.

Fast recovery technique

Fast recovery is a mechanism that allows sender to recover quickly from packet loss without going into slow start. In fast recovery mechanism, sender increases its sending rate by one segment for every duplicate acknowledgment it receives. It continues to increase sending rate until it receives a non-duplicate acknowledgment. This mechanism allows sender to recover quickly from packet loss without going into slow start, which can significantly reduce transmission rate.

The fast recovery technique uses a threshold value to determine when to switch from fast recovery mechanism to slow start. When sender receives three duplicate acknowledgments, it enters fast recovery mechanism and sets threshold value to half of current window size. sender continues to increase its sending rate by one segment for every duplicate acknowledgment until it reaches threshold value. Once it reaches threshold value, sender switches back to slow start.

Benefits of fast recovery

The fast recovery technique has several benefits over slow start. It allows sender to recover quickly from packet loss and resume normal transmission without significant delay. This mechanism also avoids unnecessary congestion in network, which can affect overall performance of network. fast recovery technique is particularly useful in high-speed networks where delay and congestion can significantly impact performance of network.

Examples of fast recovery technique

Let's consider an example to understand fast recovery technique better. Suppose a sender sends 20 segments to receiver, and receiver acknowledges receipt of first 15 segments. However, receiver does not acknowledge receipt of 16th segment, and sender assumes that segment has been lost. sender retransmits 16th segment, but receiver does not acknowledge receipt of retransmitted segment. sender receives three duplicate acknowledgments for 16th segment, indicating that segment has been lost.

In this scenario, sender enters fast recovery mechanism and sets threshold value to half of current window size. Suppose current window size is 10 segments. In that case, threshold value will be five segments. sender increases its sending rate by one segment for every duplicate acknowledgment it receives. Suppose sender receives four duplicate acknowledgments for 16th segment. In that case, sender increases its sending rate to 16 segments and continues to send 16 segments until it receives a non-duplicate acknowledgment.

While fast recovery technique has many benefits, it is not without its limitations. One of major limitations of fast recovery mechanism is that it assumes that packet loss is due to congestion in network. However, there could be other reasons for packet loss, such as hardware failure, which fast recovery mechanism may not be able to handle. In such cases, slow start mechanism may be more effective.

Another limitation of fast recovery mechanism is that it can cause unnecessary congestion in network if sender continues to increase its sending rate too quickly. This can affect overall performance of network and cause other devices to experience delays or timeouts. To mitigate this, TCP uses congestion control algorithms to ensure that network is not overloaded with traffic.

Despite these limitations, fast recovery mechanism remains an essential component of TCP. It helps to ensure that data transmission over internet is fast, reliable, and efficient. It is particularly useful in high-speed networks, where delay and congestion can significantly impact performance of network.

To further understand fast recovery technique for loss recovery in TCP, let's take a look at how it works in practice.

Assuming a sender is transmitting data to a receiver and a packet loss occurs, sender will receive three duplicate acknowledgments from receiver indicating loss of a packet. At this point, sender knows that next packet after lost packet has been successfully received, and it can send new data from that point forward.

The sender enters fast recovery mode and sets its congestion window to half of number of unacknowledged packets, plus three segments. three additional segments account for duplicate acknowledgments received by sender.

The sender then retransmits lost packet and waits for a new acknowledgment from receiver. If sender receives a new acknowledgment, it means that packet loss was due to congestion in network. sender then resumes normal transmission at a higher rate, increasing its congestion window size accordingly.

However, if sender receives duplicate acknowledgments again, it means that there is still congestion in network, and sender should not increase its transmission rate any further. sender retransmits lost packet again and waits for a new acknowledgment. This process continues until sender receives a new acknowledgment or reaches a predefined maximum number of retransmissions.

Overall, fast recovery technique is an efficient way to recover from packet loss in TCP. It helps to ensure that data transmission over internet is fast, reliable, and efficient, making it an essential mechanism for modern networking applications.

Conclusion

The fast recovery technique is a critical mechanism in ensuring reliability of data transmission over TCP. It allows sender to recover quickly from packet loss and resume normal transmission without significant delay. fast recovery mechanism also avoids unnecessary congestion in network, which can impact performance of network.

In summary, fast recovery technique is an important mechanism that helps to ensure reliability of data transmission over internet. It allows sender to recover quickly from packet loss and resume normal transmission without significant delay. fast recovery mechanism is particularly useful in high-speed networks, where delay and congestion can significantly impact performance of network. As such, it is an essential technique for ensuring that data transmission over internet is fast, reliable, and efficient.

Updated on: 29-Sep-2023

310 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements