Data Link Control Protocols
Data Link Control Protocols
Chapter 2 – TRANSMISSION
FUNDAMENTAL
(Data Link Control Protocols)
l/b + d
(l+ack)/b + 2d + tp Ack l/b + d + tp
(l+ack)/b + 2d + 2tp
Data
EDR = /(( +ack)/b + 2d + 2tp)
Time Time
l/b + d
Ack l/b + d + tp
(l+ack)/b + 2d + tp
(l+ack)/b + 2d + 2tp Data
Assuming:
LU improvement: Piggyback
•Problem: “Ack” bits (only few bits) need a
whole frame to carry them
•Idea: Send data with ack
Improve on the LU
B Tx 270
Time
Rx 310 (ms)
Pipeline protocols
Both channels carry frames from here
560
Tx A1 A2 Aw-1 Aw
A Time (ms)
Rx 0 20 B1 B2
580
310
B Tx 270 B1 B2 B3 B4 B5 B6
Time (ms)
Rx A1 A2 A3 A4 A5 A6 A7
Pipeline example
• =1000 bits, b= 50 kbps, d=270 ms:
w = 2x(270x10‐3x50x103/103 + 1)
= 29 frames
Line utilization = 100 %!
Both channels are full of data after the
transition time (2d+ l/b = 560 ms)
Note: Line needs to be full‐duplex!
Sender window
• List of frame numbers that are sent and for which the
sending station is awaiting for acknowledgement
• Can be empty (no frames sent)
• Can grow up to a maximum specified by Max_Seq (Frame
numbers start from 0 up to Max_Seq),
• Sending a frame advances the upper edge of the window by
one unit,
Receiving ack‐n means that the receiver is acknowledging all
frames up‐to (n‐1) and expecting frame number (n).
Receiver window
•List of frame numbers that the receiver is
ready to accept
•Any frame number outside this list is rejected
Example: Ws = 3; Wr = 1
Sw Rw
3 0 3 0
2 1 2 1
Frame 0
3 0 3 0
2 1 2 1
Frame 1
3 0 3 0
2 1 2 1
Frame 2
3 0 3 0
2 1 2 1
Stops sending until ack received Waits for Frame 3
Ack 3
Error control refers to mechanisms to detect and
correct errors that occur in the transmission of
Error Control frames. The model that we will use, which covers
the typical case, was illustrated earlier in Figure
•detection and correction of errors such as:
7.1b. As before, data are sent as a sequence of
• lost frames
• damaged frames frames; frames arrive in the same order in which
•common techniques use: they are sent; and each transmitted frame suffers an
• error detection arbitrary and potentially variable amount of delay
• positive acknowledgment before reception. In addition, we admit the
• retransmission after timeout possibility of two types of errors:
• negative acknowledgement & retransmission •Lost frame: frame fails to arrive at the other side,
eg. because a noise burst damaged a frame so badly
it is not recognized
•Damaged frame: A recognizable frame does
arrive, but some of the bits are in error (have been
altered during transmission).
The most common techniques for error control are
based on some or all of the following ingredients:
•Error detection: As discussed in the Chapter 6.
•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 acknowledgment and retransmission:
The destination returns a negative acknowledgment
to frames in which an error is detected. The source
retransmits such frames.
Collectively, these mechanisms are all referred to as
automatic repeat request (ARQ); the effect of
Automatic Repeat Request (ARQ) ARQ is to turn an unreliable data link into a reliable
one. Three versions of ARQ have been standardized:
•collective name for such error control
mechanisms, including:
•Stop-and-wait ARQ
•Go-back-N ARQ
•stop and wait
•Selective-reject ARQ
•go back N
All of these forms are based on the use of the flow
•selective reject (selective retransmission)
control techniques discussed in Section 7.1. We
examine each in turn.
Go Back N ‐ Handling
• Damaged Acknowledgement
• receiver gets frame i, sends ack (i+1) which is lost
• acks 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
• Damaged Rejection
• reject for damaged frame is lost
• handled as for lost frame when transmitter times out
i. Go Back N ‐ Damaged Frame
• Receiver detects error in frame i
• Receiver sends rejection‐i
• Transmitter gets rejection‐i
• Transmitter retransmits frame i
and all subsequent
Go Back N ‐
Diagram
With selective-reject ARQ, the only frames
retransmitted are those that receive a negative
Selective Reject acknowledgment, in this case called SREJ, or those
• also called selective retransmission
that time out. Selective reject would appear to be
• only rejected frames are retransmitted more efficient than go-back-N, because it minimizes
• subsequent frames are accepted by the receiver the amount of retransmission. On the other hand, the
and buffered receiver must maintain a buffer large enough to save
• minimizes retransmission
post-SREJ frames until the frame in error is
• receiver must maintain large enough buffer
• more complex logic in transmitter retransmitted and must contain logic for reinserting
• hence less widely used that frame in the proper sequence. The transmitter,
• useful for satellite links with long propagation too, requires more complex logic to be able to send a
delays frame out of sequence. Because of such
complications, select-reject ARQ is much less
widely used than go-back-N ARQ. Selective reject is
a useful choice for a satellite link because of the
long propagation delay involved.
Selective Reject ‐
Diagram
Review Questions
•List and briefly define some of the requirements
for effective communications over a data link.
•Define flow control.
•Describe stop‐and‐wait flow control.
•What are reasons for breaking a long data
transmission up into a number of frames?
•Describe sliding‐window flow control.
•What is the advantage of sliding‐window flow
control compared to stop‐and‐wait flow control?
•What is piggybacking?
Review Questions
•Define error control.
•List common ingredients for error control for a link
control protocol.
•Describe automatic repeat request (ARQ).
•List and briefly define three versions of ARQ.
•What are the station types supported by HDLC?
Describe each.
•What are the transfer modes supported by HDLC?
Describe each.
•What are the three frame types supported by HDLC?
Describe each.