Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sliding Window Protocol

Similar presentations


Presentation on theme: "Sliding Window Protocol"— Presentation transcript:

1 Sliding Window Protocol
Go Back N Sliding Window Protocol Reference: TCP/IP Protocol Suite, Fourth Edition by Behrouz A. Forouzan

2 Acknowledgment Number
Sequence Numbers the sequence numbers are modulo 2m, where m is the size of the sequence number field in bits. Acknowledgment Number the acknowledgment number is cumulative and defines the sequence number of the next packet expected to arrive. Send Window maximum size = 2m − 1

3 Receive Window Window size = 1

4 Timers Resending packets A single timer for window
The timer for the first outstanding packet always expires first. We resend all outstanding packets when this timer expires. Resending packets When the timer expires, the sender resends all outstanding packets

5

6 Sender Window size

7

8 Exercise Draw a timeline diagram for the following events:
Sender sends Packets 0, 1, 2, and 3. Packet 1 is lost. The receiver receives packets 2 and 3.

9

10 Explanantion The receiver receives packets 2 and 3, but they are discarded because they are received out of order (packet 1 is expected). When the receiver receives packets 2 and 3, it sends ACK1 to show that it expects to receive packet 1. However, these ACKs are not useful for the sender because the ackNo is equal Sf , not greater that Sf . So the sender discards them. When the time-out occurs, the sender resends packets 1, 2, and 3

11 Exercise Draw a time line diagram, if the sender sends 5 packets (0, 1, 2, 3, and 4). Packets 0, 1, and 2 are sent and acknowledged in one single ACK, which arrives at the sender site after all packets have been sent. Packet 3 is received and acknowledged in a single ACK. Packet 4 is lost and resent.


Download ppt "Sliding Window Protocol"

Similar presentations


Ads by Google