Realizability between window size and serial number

The question arises:

We have a transport protocol that uses pipelining and uses an 8-bit long sequence number (from 0 to 255)

What could be the maximum sender of window size? (How many packets sent by the sender on the network before it appears, wait for the ACK?)

Go-Back-N maximum window size: w = 2 ^ m -1 w = 255.

Custom Repeat the maximize window size: w = (2 ^ m) / 2 w = 128.

I do not know what is right and what formula I will use.

thanks for the help

+6
source share
1 answer

These two are different protocols that have different problems.

In the case of Go-Back-N, you are right. The window size can be up to 255. (2 ^ 8-1 is the last number of packets to send, starting from 0. And this is also the maximum window size for the Go-Back-N protocol.)

However, the Selective Repeat protocol has a window size limit to half the maximum q, because the receiver cannot distinguish a retransmitted packet with the same number # with the packet already included, but it is lost and was never sent to the sender in the previous window. Therefore, the window size should be in the half-range of seq # so that successive windows cannot duplicate each other.

Go-Back-N does not have this problem, because the sender pushes n packets to the window size (which is at max: n-1) and never slides through the window until it accumulates to n. And these two protocols have different windows of maximum size.

Note. For Go-Back-N, the maximum window size is the maximum number of unique sequence numbers - 1. If the window is equal to the maximum number of unique sequence numbers, if all confirmations are lost, the receiver will receive all retransmitted messages as a separate set of messages and forward messages to extra time for the application. To avoid this inconsistency, the maximum window size = the maximum number of unique serial numbers is 1. This answer was updated in accordance with the fact presented in the comment from @noamgot.

+2
source

Source: https://habr.com/ru/post/908779/


All Articles