Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Suppose a TCP connection, with window size 1, loses every other packet. Those that do arrive have RTT \(=1\) second. What happens? What happens to TimeOut? Do this for two cases: (a) After a packet is eventually received, we pick up where we left off, resuming with EstimatedRTT initialized to its pretimeout value and TimeOut double that. (b) After a packet is eventually received, we resume with TimeOut initialized to the last exponentially backed-off value used for the timeout interval. In the following four exercises, the calculations involved are straightforward with a spreadsheet.

Short Answer

Expert verified
Case (a): TimeOut doubles after loss and returns to EstimatedRTT, Case (b): TimeOut retains the double value after loss and doesn't reset.

Step by step solution

01

Title - Understand the Problem

Identify the problem context: A TCP connection with window size 1 where every other packet is lost. Given RTT is 1 second. We need to analyze the situations for two cases: resuming with either estimatedRTT or the backed-off TimeOut value.
02

Title - Case (a): Calculating EstimatedRTT and TimeOut

In case (a), after a packet is eventually received, the connection resumes with the EstimatedRTT set to its pre-timeout value and TimeOut doubled each time a packet is lost. For each cycle of loss and receipt, plot the TimeOut values. Initially, EstimatedRTT = 1 second. If a packet is lost, TimeOut doubles: 2 seconds, then 4 seconds, then 8 seconds, etc. When a packet is eventually received, EstimatedRTT stays at 1 second and TimeOut doubles.
03

Title - Case (b): Track Exponential Back-Off

In case (b), after a packet is eventually received, the resumption occurs with the TimeOut value initialized to the last exponentially backed-off value. This means to track the current TimeOut value which continues doubling until a packet is received. Post reception, TimeOut remains doubled and carries forward. For each cycle of loss and receipt, the TimeOut values will: 2 seconds, 4 seconds, 8 seconds, etc., and then continue to stay at that last value post packet receipt.
04

Title - Analyzing TimeOut and RTT

For both cases, calculate the patterns of TimeOut and RTT: For case (a) after each reception, TimeOut resets to the EstimatedRTT and gets doubled only if there's a subsequent loss. In case (b), TimeOut doubles but does not reset on reception and maintains the backed-off value.

Key Concepts

These are the key concepts you need to understand to accurately answer the question.

TCP window size
In a TCP connection, the window size determines how many packets can be sent before waiting for an acknowledgment. Think of it as a buffer space for unacknowledged packets. In our exercise, the window size is 1, which means only one packet is sent at a time and the sender waits for its acknowledgment before sending the next packet.
A small window size, like 1, can slow down the transmission rate since the sender must wait for the acknowledgment after every single packet. This is especially impactful if there are delays, as seen in our scenario where packets are lost every other transmission.
Packet loss
Packet loss occurs when data packets traveling across a network fail to reach their destination. Packet loss can cause transmission delays because lost packets need to be resent. In our exercise, every other packet is lost, causing significant disruption.
The impact of packet loss is pronounced with a small TCP window size. Since only one packet is sent at a time, losing every other packet means frequent resending and waiting, which can drastically reduce effective throughput and increase the overall transmission time.
RTT calculation
Round-Trip Time (RTT) is the time it takes for a signal to go from the sender to the receiver and back again. In our problem, the RTT is given as 1 second. This means, under ideal conditions without packet loss, each packet acknowledgment should return within 1 second.
In the context of our scenario, lost packets will increase the effective RTT as the packets need to be resent, and each subsequent retry causes a delay.
Timeout calculation
Timeout is the duration a sender waits for an acknowledgment before assuming a packet is lost and resending it. Determining the timeout value is crucial and is usually based on RTT and its variations.
In case (a), after a packet is eventually received, the timeout doubles each time a packet is lost, which follows an exponential pattern: 2 seconds, 4 seconds, 8 seconds, and so forth. When a packet is finally received, the timeout resets, but still considers the EstimatedRTT.
In case (b), after a packet is received, the timeout resumes from the last exponentially backed-off value. This means it continuously doubles with each packet loss and carries this timeout value forward post-reception.
Exponential backoff
Exponential backoff is a strategy employed to manage network congestion by exponentially increasing the waiting time between subsequent attempts following packet loss. This is crucial to prevent overwhelming the network with retries.
In case (a), the exponential backoff is demonstrated through doubling the timeout period after each packet loss. Additionally, the EstimatedRTT is recalibrated to its pre-timeout value upon successful reception.
In case (b), the exponential backoff continues without resetting. This means if the timeout period was 8 seconds after a series of losses and then a packet was successfully received, the timeout retains the 8 seconds and continues to double if packet loss persists.

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Suppose an idle TCP connection exists between sockets A and B. A third party has eavesdropped and knows the current sequence number at both ends. (a) Suppose the third party sends A a forged packet ostensibly from B and with 100 bytes of new data. What happens? Hint: Look up in Request for Comments 793 what TCP does when it receives an ACK that is not an "acceptable ACK." (b) Suppose the third party sends each end such a forged 100-byte data packet ostensibly from the other end. What happens now? What would happen if \(\mathrm{A}\) later sent 200 bytes of data to B?

Suppose that, when a TCP segment is sent more than once, we take SampleRTT to be the time between the most recent transmission and the ACK, as in Figure \(5.10\) (b). Assume, for definiteness, that TimeOut \(=2 \times\) EstimatedRTT. Sketch a scenario in which no packets are lost but EstimatedRTT converges to a third of the true RTT, and give a diagram illustrating the final steady state. Hint: Begin with a sudden jump in the true RTT to just over the established TimeOut.

Suppose TCP operates over a 1-Gbps link. (a) Assuming TCP could utilize the full bandwidth continuously, how long would it take the sequence numbers to wrap around completely? (b) Suppose an added 32-bit timestamp field increments 1000 times during the wraparound time you found above. How long would it take for the timestamp to wrap around?

One of the purposes of TIME_WAIT is to handle the case of a data packet from a first incarnation of a connection arriving very late and being accepted as data for the second incarnation. (a) Explain why, for this to happen (in the absence of TIME_WAIT), the hosts involved would have to exchange several packets in sequence after the delayed packet was sent but before it was delivered. (b) Propose a network scenario that might account for such a late delivery.

When closing a TCP connection, why is the two-segment-lifetime timeout not necessary on the transition from LAST_ACK to CLOSED?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free