Upload
sehrish-rafiq
View
97
Download
0
Tags:
Embed Size (px)
Citation preview
DATA COMMUNICATIONS & NETWORKING
LECTURE-24
Course Instructor : Sehrish Rafiq
Department Of Computer Science
University Of Peshawar
LECTURE OVERVIEW
Go-Back N-ARQ Selective Repeat ARQ
GO-BACK-N ARQ &
SELECTIVE- REPEAT-ARQ
To improve the efficiency, multiple frames should be in-transition while waiting for acknowledgement.
Go-Back N-ARQ Selective Repeat ARQ
GO-BACK N-ARQ
In Go-Back N-ARQ ,we can send W frames before worrying about acknowledgements.
We keep a copy of these frames until an acknowledgement arrive.
SEQUENCE NUMBERS
Frames from a sending station are numbered sequentially.
sequence number is included in the header ,we need to set a limit.
If the header of the frame allows m bits for the sequence number the sequence number range from 0 to 2m -1.
E.g. For m=3 the sequence numbers would be 0 to 7. However we can repeat the sequence.
SENDER SLIDING WINDOW
At the sender site to hold the outstanding frames until they are acknowledged we use the concept of a window.
We imagine that all frames are stored in a buffer.
The outstanding frames are enclosed in a window.
The frames to the left of the window are those that have already being acknowledged.
SENDER SLIDING WINDOW
Those to the right of the window cannot be sent before the window slides over them.
The size of the window is at most 2m -1. The size of this window is fixed. The window slides to include new unsent frames
when correct acknowledgements are received.
SENDER SLIDING WINDOW
RECEIVER SLIDING WINDOW
The size of the window at the receiver site in this protocol is 1.
The receiver is always looking for a specific frame to arrive in a specific order.
Any frame arriving out of order is discarded and needs to be resent.
The receiver window also slides .
RECEIVER WINDOW
CONTROL VARIABLES
The sender has three variables , S, SF and SL. The S variable holds the sequence number of the
recently sent frame. SF holds the sequence number of the first frame of
the window. SL holds the sequence number of the last frame of
the window. The size of the window is W= SL - SF +1. The receiver only has one variable R holding the
sequence number of the frame it expects to receive.
CONTROL VARIABLES CONT…
If the sequence number of the received frame is the same as the value of R, the frame is accepted, if not it is rejected.
TIMERS
The sender sets a timer for each frame sent. The receiver has no timers.
ACKNOWLEDGEMENT
The receiver sends positive acknowledgements if a frame has arrived safe and sound and in order.
If a frame is damaged or is received out of order ,the receiver is silent and will discard all subsequent frames until it receives the one it is expecting .
The silence of the receiver causes the timer of the unacknowledged frame to expire.
This in turn causes the sender to go back and resend all frames beginning one with the expired timer.
GO-BACK-N-ARQ NORMAL OPERATION
DAMAGED OR LOST FRAME
DAMAGED OR LOST ACKNOWLEDGEMENT
If an acknowledgement is damaged or lost we can have two situations.
If the next acknowledgement arrives before the expiration of any timer there is no need for retransmission of frames because acknowledgements are cumulative in this protocol.
However if the next ACK arrives after the timeout, the frame and all the frames after that are resent.
The receiver never resends an ACK.
SELECTIVE REPEAT ARQ
Go-Back-N-ARQ protocol is very inefficient for a noisy link.
In a noisy link a frame has a high probability of damage, which means the resending of multiple frames.
This resending uses up the bandwidth and slows down the transmission.
For noisy links there is another mechanism that does not resend N frames when just one frame is damaged, only the damaged frame is resent.
This mechanism is called Selective-Repeat-ARQ.
SENDER AND RECEIVER WINDOWS
The configuration of the sender and its control variables for Selective-Repeat ARQ are the same as for Go-Back-N ARQ.
However, the size of the window should be at most one half of the value 2m.
The receiver window must have the same size. This window however specifies the range of the
accepted received frame. In selective –Repeat ARQ the receiver is looking
for a range of sequence numbers.
CONTROL VARIABLES
The receiver has two control variables RF and RL to define the boundaries of the window.
SELECTIVE REPEAT ARQ, LOST FRAME
THANKS!!!