views:

13

answers:

2

in selective repeat protocol in the window size must be less than or equal to half the size of the sequence number space for SR protocol.why is so?? and how???

A: 

This is to avoid packets being recognized incorrectly.

If the windows size is greater than half the sequence number space, then if an ACK is lost, the sender may send new packets that the receiver believes are retransmissions.

For example, if our sequence number range is 0-3 and the window size is 3, this situation can occur.

A -> 0 -> B A -> 1 -> B A -> 2 -> B A <- 2ack <- B (this is lost) A -> 0 -> B A -> 1 -> B A -> 2 -> B

After the lost packet, B now expects the next packets to have sequence numbers 3, 0, and 1.

But, the 0 and 1 that A is sending are actually retransmissions, so B receives them out of order.

By limiting the window size to 2 in this example, we avoid this problem because B will be expecting 2 and 3, and only 0 and 1 can be retransmissions.

Alan Geleynse
A: 

The sequence space wraps to zero after max number is reached. Consider the corner case where all ACKs are lost - sender does not move its window, but receiver does (since it's unaware the sender is not getting the ACKs). If we don't limit the window size to half the sequence space, we end up with overlapping sender "send but not acknowledged" and receiver "valid new" sequence spaces. This would result in retransmissions being interpreted as new packets.

Nikolai N Fetissov