Selective repeat protocol
-
Upload
manusha-dilan -
Category
Internet
-
view
27 -
download
0
Transcript of Selective repeat protocol
![Page 1: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/1.jpg)
Selective Repeat Protocol
Group 6
P.D.M.Dilan – 2010/ICT/94
K.M.D.Udayangani – 2010/ICT/89
![Page 2: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/2.jpg)
Why Selective Repeat Protocol
The go-back-n protocol works well if errors are rare, but if the line is poor it wastes a lot of bandwidth on retransmitted frames.
An alternative strategy, the selective repeat protocol, is to allow the receiver to accept and buffer the frames following a damaged or lost one.
2
![Page 3: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/3.jpg)
Selective Repeat Protocol
In this protocol, both sender and receiver maintain a window of outstanding and acceptable sequence numbers, respectively.
The sender’s window size starts out at 0 and grows to some predefined maximum.
The receiver’s window, in contrast, is always fixed in size and equal to the predetermined maximum.
The receiver has a buffer reserved for each sequence number within its fixed window.
3
![Page 4: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/4.jpg)
4
![Page 5: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/5.jpg)
Associated with each buffer is a bit (arrived ) telling whether the buffer is full or empty.
Whenever a frame arrives, its sequence number is checked by the function between to see if it falls within the window.
5
![Page 6: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/6.jpg)
If so and if it has not already been received, it is accepted and stored. This action is taken without regard to whether or not the frame contains the next packet expected by the network layer.
Of course, it must be kept within the data link layer and not passed to the network layer until all the lower-numbered frames have already been delivered to the network layer in the correct order.
6
![Page 7: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/7.jpg)
Note
In Selective Repeat ARQ, the size of the sender and receiver window must be at
most one-half of 2m.
7
![Page 8: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/8.jpg)
8
![Page 9: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/9.jpg)
Note
The sender only retransmits frames, for which a NAK is received.
This will increase the efficiency of the protocol.
9
![Page 10: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/10.jpg)
Advantage over Go-Back-N: Fewer Retransmissions.
Disadvantages:More complexity at sender and receiver
Each frame must be acknowledged individually (no cumulative acknowledgements)
Receiver may receive frames out of sequence
10
![Page 11: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/11.jpg)
Conclusion
Selective repeat is combination of advantages of GO back-N and Stop-N-Wait.
Selective repeat is somewhat superior to the other protocols
11
![Page 12: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/12.jpg)
Example of Selective-Repeat12
Receiver must keeptrack of holes’ inthe sequence ofdelivered frames.
Sender mustmaintain one timerper outstandingpacket
![Page 13: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/13.jpg)
Sender-side Selective Repeat algorithm
(Continued)
13
![Page 14: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/14.jpg)
(Continued)
14
![Page 15: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/15.jpg)
15
![Page 16: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/16.jpg)
Receiver-side Selective Repeat algorithm
(Continued)
16
![Page 17: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/17.jpg)
17
![Page 18: Selective repeat protocol](https://reader036.fdocuments.us/reader036/viewer/2022062320/55cbc478bb61ebb6648b45c2/html5/thumbnails/18.jpg)
Thank You.
18