Presentation is loading. Please wait.

Presentation is loading. Please wait.

Selective repeat Protocol

Similar presentations


Presentation on theme: "Selective repeat Protocol"— Presentation transcript:

1 Selective repeat Protocol
Reference: TCP/IP Protocol Suite, Fourth Edition by Behrouz A. Forouzan

2 Go Back N issues There is no need to buffer out-of-order packets; they are simply discarded (As window size is 1). However, this protocol is inefficient if the underlying network protocol loses a lot of packets. Each time a single packet is lost or corrupted, the sender resends all outstanding packets although some of these packets may have been received safe and sound, but out of order. If the network layer is losing many packets because of congestion in the network, the resending of all of these outstanding packets makes the congestion worse

3 Selective Repeat (SR) Protocol
Only lost packets are resent Accepts out of order packets Window size is greater than 1

4 Send Window Receive Window Window size = 2m-1
Sender window size=receiver window size <= 2m-1

5 Timer Acknowledgments
Theoretically, Separate timer for each outstanding segment in sender window However, most transport layer protocol that implement SR use only one single timer. For this reason, we use only one timer. If a time-out occurs, the sender resends all unacknowledged packets in the window and restarts the timer. Acknowledgments An ack no. defines the sequence number of the error-free packet received.

6

7 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.

8

9 Explanation Packet 1 is lost. Packets 2 and 3 arrive out of order
At receiver packet 2, 3 arrives and is stored and marked (shaded slot), but it cannot be delivered because packet 1 is missing ACKs are sent for 3 and 4 When the timer times out, packet 1 (the only unacknowledged packet) is resent When ack is received for 1, the send window slides.

10 SR window size the size of the sender and receiver window can be at most one-half of 2m.

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 received in order and acknowledged, one by one. Packet 3 is delayed and received after packet 4.


Download ppt "Selective repeat Protocol"

Similar presentations


Ads by Google