Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between TCP and Go Back N

I was reading Computer Networking from Kurose, and while reading in the TCP chapter about the differences between TCP and Go Back N I found something that I don't fully understand. The book says the following about some of the differences between the two protocols:

"many TCP implementations buffer correctly received but out-of-order segs rather than discard.

also, suppose a seqof segs 1, 2, …N, are received correctively in-order,ACK(n), n < N, gets lost, and remaining N-1 acks arrive at sender before their respective timeouts TCP retransmit most one seg, i.e., seg n, instead of pkts, n, n+1, …, N TCP wouldn’t even retransmit seg n if ACK(n+1) arrived before timeout for seg n"

I understand the buffering of out-of-order segments, but I don't understand the other behavior, and I think it is because I don't fully understand Go Back N. Following that example, if ACK(n+t) arrives before Go Back N timeout, the protocol would continue as if seg n was in fact received, which is the case, because of the accumulative ACKS... so, Go Back N wouldn't retransmit that segment either.... or am I missing something?

like image 476
Lucia Avatar asked Sep 27 '12 05:09

Lucia


People also ask

Is Go back N TCP or UDP?

This service department lies in the hands of TCP. Their major flow control protocols – Stop and Wait, Go Back N, and Selective Repeat. The sender sends the packet and waits for the ACK (acknowledgement) of the packet.

What is the difference between Go back N and Selective Repeat?

In Go-Back-N, if a sent frame is found suspected or damaged, then all the frames are retransmitted till the last packet. In Selective Repeat, only the suspected or damaged frames are retransmitted.

What is difference between TCP and UDP?

TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol. A key difference between TCP and UDP is speed, as TCP is comparatively slower than UDP. Overall, UDP is a much faster, simpler, and efficient protocol, however, retransmission of lost data packets is only possible with TCP.


2 Answers

The quote says that the ACK(n) got lost, not the nth segment got lost. In such case, nothing needs to be re-transmitted, because ACK(n + x) means that everything upto n + x was successfully received.

like image 183
Jan Wrobel Avatar answered Sep 21 '22 04:09

Jan Wrobel


I was confused by the statement from the book too, but I think I have found the answer:

Consider also what happens when the sender sends a sequence of segments 1, 2, . . . , N, and all of the segments arrive in order without error at the receiver. Further suppose that the acknowledgment for packet n < N gets lost, but the remaining N – 1 acknowledgments arrive at the sender before their respective timeouts. In this example, GBN would retransmit not only packet n, but also all of the subsequent packets n + 1, n + 2, . . . , N. TCP, on the other hand, would retransmit at most one segment, namely, segment n. Moreover, TCP would not even retransmit segment n if the acknowledgment for segment n + 1 arrived before the timeout for segment n.

Actually, in the above example, even though the ACK for packet n+1 arrives at the sender before its timeout, one has to be aware that the timer for packet n could have timed-out before that arrival. So, because packet n timeout and the GBN has not seen ACK(n+1) or ACK(n+2)... so far, it will trigger the re-transmission of all packets after n .

However, for TCP, the sender would only send packet n again at this specific moment.

P.S. this question has been very old. But, anyway, hopefully that might help anyone.

like image 26
walkerlala Avatar answered Sep 21 '22 04:09

walkerlala