Data Link
Data Link
Protocols
a>1 the propagation time is less than the transmission time. In this case, the frame is sufficiently long that the
first bits of the frame have arrived at the destination before the source has completed the transmission of the
frame. When a <1, the propagation time is greater than the transmission time. In this case, the sender
completes transmission of the entire frame before the leading bits of that frame arrive at the receiver.
Sliding Windows Flow Control
The problems described so far is that only one frame at a time can
be in transit. And in situations where the bit length of the link is
greater than the frame length (a>1) serious inefficiencies result.
Efficiency can be greatly improved by allowing multiple frames to
be in transit at the same time
allows multiple numbered frames to be in transit
receiver has buffer W long
transmitter sends up to W frames without ACK
ACK includes number of next frame expected
receiver can ack frames without permitting further transmission
(Receive Not Ready)
must send a normal acknowledge to resume
Sliding Window Diagram
3-bit seq. #, Win size = 7
Sliding Window Example
Sliding Window Utilization
Window size W, transmission time = 1, propagation
time = a
Case 1: W >= 2a + 1
– Sender A can transmit continuously with no
pause and normalized throughput is 1.0
Case 2: W < 2a + 1
– Sender A exhausts its window at t = W and
cannot send additional frames until t = 2a + 1.
– Normalized throughput is W / (2a+1)
Error Control
Is the mechanism of detection and correction of errors that occur in
the transmission of frames. Errors such as:
– lost frames; frames fail to arrive to the other side
– damaged frames; a recognizable frame arrives, but some of the bits in the
frame are in error or have been altered during transmission
Techniques for error control are based on the use of the following :
– error detection
– positive acknowledgment; The destination returns a positive
acknowledgment to successfully received, error-free frames
– retransmission after timeout; The source retransmits a frame that has not
been acknowledged after a predetermined amount of time
– negative acknowledgement & retransmission; The destination returns a
negative acknowledgment to frames in which an error is detected. The
source retransmits such frames.
Note: collectively all these mechanisms are all referred to as automatic
repeat request (ARQ)
Automatic Repeat Request (ARQ)
Versions of ARQ include
– stop and wait
– go back N
– selective reject (selective retransmission)
Stop and Wait
It is based on the stop-and wait flow control technique
Source transmits a single frame and then must await an ACK
two sorts of error could occur
1. Received frame damaged, receiver detects this by using an error detection
technique and discards it
• transmitter has timeout
• if no ACK within timeout, retransmit
2. A damaged ACK, transmitter will not recognize it
• transmitter will retransmit
• receive gets two copies of frame
• use alternate numbering and ACK0 / ACK1
Stop and Wait
see example with both
types of errors
pros and cons
– simple
– inefficient
Go Back N
based on sliding window
if no error, ACK as usual
use window to control number of outstanding
frames
if error, reply with rejection
– discard that frame and all future frames until error
frame received correctly
– transmitter must go back and retransmit that frame
and all subsequent frames
Go Back N - Handling
The go-back-N technique takes into account of the
following incidents;
1. Damaged Frame
– error in frame i so receiver rejects frame i
– transmitter retransmits frames from i
2. Lost Frame
– frame i lost and either
• transmitter sends i+1 and receiver gets frame i+1 out of seq
and rejects frame i
• or transmitter times out and send ACK with P bit set which
receiver responds to with ACK i
– transmitter then retransmits frames from i
Go Back N - Handling
3. Damaged Acknowledgement
– receiver gets frame i, sends ACK (i+1) which is lost
– ACK are cumulative, so next ACK (i+n) may arrive before
transmitter times out on frame i
– if transmitter times out, it sends ACK with P bit set
– can be repeated a number of times before a reset
procedure is initiated
4. Damaged Rejection
– reject for damaged frame is lost
– handled as for lost frame when transmitter times out
Selective Reject