Normally, two types of error control are used in protocols: Go-Back-N and Selective Repeat. Additionally for flow control purposes, sender and receiver maintain a window of acceptable sequence numbers. Let us now have a look at the maximum window size in Go-Back-N and Selective Repeat protocols. In the scenario, a 2-bit sequence number is used with the numbers 0, 1, 2 and 3 (in general, a n-bit number ranging from 0…2n-1).
What is the maximum window size? The receiver must be able to distinguish a retransmission of an already received packet from the original transmission of a new packet. Thus the maximum window size is:
2n-1 in the case of Go-Back-N. Here the receiver accepts only the next expected packet and discards all out-of-order packets. In the example, with a 2-bit sequence number the maximum window size is 3
2n/2 in Selective Repeat. Since the receiver accepts out-of-order packets, two consecutive windows should not overlap. Otherwise it is not able to distinguish duplicates from new transmissions. Hence, in the example the maximum window size is 2
Now try the application and see what happens if the window size is too high or adequate for both protocol types!