0% found this document useful (0 votes)
74 views21 pages

Data Link Layer: Flow Control Protocols of Noisy Error Channel

This document discusses various protocols for flow control over noisy error-prone channels, including: 1. Stop-and-wait ARQ which resends frames if the acknowledgment is lost or corrupted. 2. Using sequence numbers to identify acknowledgments and allow them to be retransmitted if needed. 3. Sliding window protocols like Go-back-N ARQ which allow multiple frames to be sent before acknowledgment but require resending all frames from the lost/corrupted one. Selective repeat ARQ improves this by only resending the specific lost/corrupted frame. 4. Techniques like piggybacking to make the protocols bidirectional and improve efficiency.

Uploaded by

Esraa Samir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views21 pages

Data Link Layer: Flow Control Protocols of Noisy Error Channel

This document discusses various protocols for flow control over noisy error-prone channels, including: 1. Stop-and-wait ARQ which resends frames if the acknowledgment is lost or corrupted. 2. Using sequence numbers to identify acknowledgments and allow them to be retransmitted if needed. 3. Sliding window protocols like Go-back-N ARQ which allow multiple frames to be sent before acknowledgment but require resending all frames from the lost/corrupted one. Selective repeat ARQ improves this by only resending the specific lost/corrupted frame. 4. Techniques like piggybacking to make the protocols bidirectional and improve efficiency.

Uploaded by

Esraa Samir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

DATA LINK LAYER

Flow Control Protocols


of Noisy Error Channel
Noisy (error – channels) Protocols

Channel Error Control


(Noisy) Stop-and-Wait ARQ
Assume for noisy channel the sender sent frame:
Based on (definite time period) of timer
exist in sender We have 3 probabilities:
1.Frame arrives safe;
the receiver sends acknowledgment
within definite time to sender that frame
arrived safe. So, the sender send the
next frame.
2.Frame arrives safe; but time period is
expired before acknowledgment is
received at the sender. i.e the
acknowledgment is corrupted/lost. So,
The same frame need to resend again.
i.e. the frame sent duplicate.
(Noisy) Stop-and-Wait ARQ
3. The frame is corrupted or never arrives at the
receiver. So, the sender resends the same frame again
after the time-out of acknowledgment is expired.
i.e. the frame sent duplicate.

So:
We have the problem of
resending the frame
twice (duplicate)
Solution based on using Sequence No
Solution based on Using
one-bit sequence number
on the header

Acknowledgments that
have sequence numbers
represent the form of
the flow control
Stop-and-Wait Automatic Repeat Request
Stop-and-Wait ARQ
Error correction
- Error correction in Stop-and-Wait ARQ is done
by keeping a copy of sent frame and
retransmitting the frame when the time of the
timer expires without ACK .

- ACK frame can also be corrupted, lost.


So it too needs a sequence number to be used
when an ACK frame need to be retransmitted
when an ACK failure and ACK timer expired
(In)Efficiency of Stop-and-Wait
Example: Consider 1.5Mbps link, 45ms RTT
Amount of data carried by link = Delay x Bandwidth =

= ((1.5 *1024 /8) x 0.045) = 8.6 ≈≈ 8 KB


If frames are 1KB long then max rate
Only 1/8th of link’s capacity
Goal: keep the pipe full,
S0, we could have 8 frames to achieve maximum
efficiency OR send 4 frames such that the length of
each frame = 2 KB
(Efficiency) Automatic Repeat Request
in a Stop-and-Wait ARQ system, the bandwidth of the line is 1
Mbps, and 1 bit takes 20 ms to make a round trip. If the
system data frame are 1000 bits in length, what is the
utilization percentage of the link?
Solution
Amount of data carried by link obtained from The
bandwidth-delay product is

The system can send 20,000 bits during the time it takes for
the data to go from the sender to the receiver and then back
again. However, the system sends only 1000 bits.
So, the link utilization is only 1000/20,000 = 5 %.
Hence, for a link with a high bandwidth or long delay, the use
of Stop-and-Wait ARQ wastes the capacity of the link.
(Efficiency) Automatic Repeat Request
in a Stop-and-Wait ARQ system, the bandwidth of the
line is 1 Mbps, and 1 bit takes 20 ms to make a round trip
What is the utilization percentage of the link if we have a
protocol that can send up to 15 frames before stopping
and worrying about the acknowledgments?
Solution
The bandwidth-delay product is still 20,000 bits.
The system can send up to 15 frames or 15,000 bits before
acknowledgments
This means the utilization is 15,000/20,000 = 75 %.
Of course, if there are damaged frames, the utilization
percentage is much less because frames have to be resent.
pipelining : (mean new task start before the end of previous task)
Sliding Window Protocols
- In these protocols several frames can be sent before
receiving acknowledgments.
- Copy of transmitted frames are keep until the
acknowledgments arrive.
- They based on Sequence numbers, and sliding window
1- Sequence Numbers :
Sending Frames are numbered sequentially.
If the header of the frame allows m bits for the sequence
number, the sequence numbers range from 0 to 2m- 1.
For example, if m is 4, the only sequence numbers are 0
through 15 inclusive. So the sequence numbers are
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 0,1,2,3,……..
2- The Send Sliding Window
  first outstanding frame   next frames to send
0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13
Frames Frames sent, but Frames that can be Frames
already not acknowledged sent, but not received NOT
ACK (outstanding) from upper layer send

The send sliding window defined by three variables at any


time. These variables are:

  : The first outstanding frame.


  : The next frame to be sent.
  : send window size That must be less than or = 2m -1

The following 2 protocols are Based on the sliding Window


1- Go-back-N-ARQ Protocol
• Main idea: Similar to Stop-and-Wait ARQ;
The difference is: several frames can be sent before
receiving acknowledgments.
• Go-back-N-ARQ Protocol are based on 2 sliding
windows one for transmission and one for receiving.

Copy of
transmitted frames
are keep until the
acknowledgments
arrive.
Go-Back-N-ARQ send Sliding Window operations
- Send window can slide one or more slots to the right
when an acknowledgment arrives from the other end.
- As Figure shown, frames 0, 1, and 2 are acknowledged,
so the window has slid to the right three slots. Note that
the value of   is 3 because frame 3 is now the first
outstanding frame
Send window before sliding
   
0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13

Send window after sliding


   
0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13

Note: Stop-and-Wait-ARQ is a special case of Go-Back-NARQ in


which the size of the send window is 1.
Receiver Sliding Window operations
- The receive window makes sure the correct data frames are
received and the correct acknowledgments are sent.
-The receiver is always looking for the arrival of a specific
frame.
- Any frame arriving out of order is discarded and needs to be
resent
The receive window define an imaginary box of size 1 with one
single variable   •
when a correct frame has arrived: The window slides one slot
at a time  
Damage/Lost Frame - Go-Back-N-ARQ
If frame is damaged or received out of order, the
receiver will discard all next frames until it
receives the expecting one

The receiver causes


the timer of the
unacknowledged
frame at the sender
site to expire. This
causes the sender to
go back and resend
all frames beginning
with frame of
expired timer.
Example : Damaged/lost Frame - Go-Back-N-ARQ
Suppose the sender has already sent frame 5, but the timer for
frame 3 expires without receive an ACK. This means that
frame 3 has not been acknowledged; the sender goes back and
sends frames 3, 4, and 5 again. So, why the protocol is called
Go-Back-N ARQ.
2- Selective Repeat Automatic Repeat Request
- Noisy link a frame has a higher probability of
damage which means the resending of multiple
frames
- The resending process uses up the bandwidth
and slows down the transmission.
- So, another mechanism that resend the damaged
frame only is Required.
This mechanism is called Selective Repeat-ARQ.
- The Selective Repeat Protocol also uses
2-windows: a send window and a receive
window .
Window sizes in Selective Repeat Automatic Repeat Request
The receive window in Selective Repeat specified by 2 chs
First: the size of send/receive window are the same
Second: the size of the send/receive window is much
smaller than in Go-Back-N-ARQ
if m = 4, the sequence numbers go from 0 to 15, but the
size of the window is optimized at 8.
Send window for Selective Repeat ARQ

Frames already Frames sent, but Frames that Frames that


acknowledged not acknowledged can be sent cannot be sent
Selective Reject operation
- Based on Timer started for each frame sent.
- The arrival event may ACK or a NAK frame. If a valid NAK
frame arrives, sender just resend the corresponding frame
If a valid ACK
arrives:
-the buffers is
cleaned.
-stop the matching
timer.
- move the left wall
of the window.
- Only the frame
which times out is
resent
Window sizes in Selective Repeat Automatic Repeat Request
Because sizes of the send window and receive window are
the same, all the send frames can arrive out of order and
stored until they can be delivered to the network layer.
- the receiver never delivers packets out of order to the
network layer
Receive window for Selective Repeat ARQ
Rn
next frame expected
3 2 1 0 15 14 13 15 14 13 12 11 10 9 8 7 6 5 4
Frames already Frames that can be received Frames that cannot
received and stored for later delivery. be received.

- In Selective Repeat ARQ, the size of the sender and


receiver window must be at most one-half of 2m•
(why ……report)
Piggybacking
-The previous protocols are all unidirectional: data
frames flow in only one direction .
technique called piggybacking
- Used to achieve the bidirectional for a Go-Back-N ARQ.
- Each node has the same algorithm,
- Each node two windows: one send window and one
receive window. Both also need to use a timer.
- Each node has 3-types of events: request,
arrival, and time-out.
- when a frame arrives, the site needs to handle control
information as well as the frame itself.
- The request event uses only the send window at each
site; the arrival event needs to use both windows.

You might also like