GATE | GATE CS 2018 | Question 32
Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is _______ .
Note – This was Numerical Type question.
(D) None of these
Explanation: As sequence number field of TCP is 32 bits, so there are total 232 unique sequence number are possible (from 0 to 232-1), which is limit of TCP data.
But if you want to send data more than 232 bytes in TCP, then you need to repeat this procedure after sending 232 bytes of data or unique sequence numbers. This concept is known as wrap around which allow sending unlimited data using TCP.
Therefore, question is asking for wrap around time which is equal to pass all unique sequences first, i.e., 232, TCP assigns 1 sequence number to each byte of data.
Twrap−around = (Total data) / (Bandwidth) = (232 bytes) / (109 bits per second) = (232 * 8 bits) / (109 bits per second) = 34.35 seconds = 34 (in seconds)
GATE’ answer is same as either ceiling value or floor value (i.e., 34 and 35 both are correct).
So, option (A) is correct.
Quiz of this Question