CS455 Syllabus

### Correctness proof of the Sliding Window protocol (using infinite sequence numbers)

• Reliable guarantee of the Sliding Window protocol

• Claim:

The Sliding Window protocol using infinite set of sequence numbers can guarantee that:

 The receiver will deliver each frame exactly once,     and          The frames are will be delivered in the order that were transmitted

Proof: by showing the following 3 claims:

 Each frame will be received at least once by the receiver. A received frame will be delivered exactly once Received frames are delivered in the transmitted order

• Claim 1: Each frame will be received at least once by the receiver

• Claim 1:

 A data frame (say: frame x) will be received at least once by the receiver.

Proof:

• Fact 1:

• As long as data frame x is outstanding (= unacknowledged), the sender will keep transmitting the data frame x.

(Sender can timeout on an outstanding frame and re-transmit)

• Rephrased: as long as x is inside the sender window:

the sender will keep sending the data frame

Therefore:

• As long as data frame x is inside the sender window:

the receiver will have the opportunity to receive the data frame x

• Fact 2:

• A data frame x that was not received by the receiver will be inside the receiver window or pass the receiver window:

• Therefore, the receiver will not receive a frame x   if:

1. The receiver has not received the frame x yet:

2. And the sender will not transmit the frame x any more:

I.e.: frame x must not be inside the send window

In other words:

And this situation is impossible because we have shown that:

 The receive window will always be lined up or ahead the send window !!! See: click here

• Claim 2: A received frame will be delivered exactly once

• Claim 2:

 A frame x will be delivered exactly once

Proof:

• While the frame x is inside the receiver window:

the receiver can receive duplicate frame x

• Because each frame has a unique sequence number:

 The receiver can remove the duplicates !!!

• When the receiver delivers the data frame x, the receiver window will:

also slide the receiver window pass the value x !!!

• In this state:

Retransmission of data frame x are discard !!!

• Therefore:

 A data frame x will be delivered exactly once !!!

• Claim 3: Received frames are delivered in the transmitted order

• This cliam is obvious:

• Data frames are transmitted in increasing order by the sender

• Data frames are delivered in increasing order by the receiver

 There is only one ordering possible with a set of integer values that is increasing order (Namely: x, x+1, x+2, ....)

• Therefore:

 Received frames are delivered in the transmitted order