Professional Documents
Culture Documents
Chapter 11 Link-Level Flow and Error Control 1
Chapter 11 Link-Level Flow and Error Control 1
1
Chapter 11 Link-Level Flow and Error Control
Introduction
The need for flow and error control
Link control mechanisms
Performance of ARQ (Automatic Repeat
Request)
2
Chapter 11 Link-Level Flow and Error Control
Flow Control and Error Control
Fundamental mechanisms that determine
performance
Can be implemented at different levels:
link, network, or application
Difficult to model performance
Simplest case: point-to-point link
– Constant propagation
– Constant data rate
– Probabilistic error rate
– Traffic characteristics
3
Chapter 11 Link-Level Flow and Error Control
Flow Control
Limits the amount or rate of data that is
sent
Reasons:
– Source may send PDUs faster than destination
can process headers
– Higher-level protocol user at destination may
be slow in retrieving data
– Destination may need to limit incoming flow
to match outgoing flow for retransmission
4
Chapter 11 Link-Level Flow and Error Control
Flow Control at Multiple Protocol
Layers
X.25 virtual circuits (level 3) multiplexed
over a data link using LAPB (X.25 level 2)
Multiple TCP connections over HDLC link
Flow control at higher level applied to
each logical connection independently
Flow control at lower level applied to total
traffic
5
Chapter 11 Link-Level Flow and Error Control
Figure 11.1
6
Chapter 11 Link-Level Flow and Error Control
Flow Control Scope
Hop Scope
– Between intermediate systems that are directly
connected
Network interface
– Between end system and network
Entry-to-exit
– Between entry to network and exit from network
End-to-end
– Between end user systems
7
Chapter 11 Link-Level Flow and Error Control
Figure 11.2
8
Chapter 11 Link-Level Flow and Error Control
Error Control
Used to recover lost or damaged PDUs
Involves error detection and PDU
retransmission
Implemented together with flow control in
a single mechanism
Performed at various protocol levels
9
Chapter 11 Link-Level Flow and Error Control
Link Control Mechanisms
3 techniques at link level:
Stop-and-wait
Go-back-N
Selective-reject
10
Chapter 11 Link-Level Flow and Error Control
Sequence of Frames
Source breaks up message into sequence of
frames
Buffer size of receiver may be limited
Longer transmission are more likely to
have an error
On a shared medium, avoids one station
monopolizing medium
11
Chapter 11 Link-Level Flow and Error Control
Stop and Wait
Source transmits frame
After reception, destination indicates
willingness to accept another frame in
acknowledgement
Source must wait for acknowledgement
before sending another frame
2 kinds of errors:
– Damaged frame at destination
– Damaged acknowledgement at source
12
Chapter 11 Link-Level Flow and Error Control
ARQ
Automatic Repeat Request
Uses:
– Error detection
– Timers
– Acknowledgements
– Retransmissions
13
Chapter 11 Link-Level Flow and Error Control
Figure 11.3
14
Chapter 11 Link-Level Flow and Error Control
Figure 11.4
15
Chapter 11 Link-Level Flow and Error Control
Stop-and-Wait Link Utilization
If Tprop large relative to Tframe then
throughput reduced
If propagation delay is long relative to
transmission time, line is mostly idle
Problem is only one frame in transit at a
time
Stop-and-Wait rarely used because of
inefficiency
16
Chapter 11 Link-Level Flow and Error Control
Sliding Window Techniques
Allow multiple frames to be in transit at
the same time
Source can send n frames without waiting
for acknowledgements
Destination can accept n frames
Destination acknowledges a frame by
sending acknowledgement with sequence
number of next frame expected (and
implicitly ready for next n frames)
17
Chapter 11 Link-Level Flow and Error Control
Figure 11.5
18
Chapter 11 Link-Level Flow and Error Control
Figure 11.6
19
Chapter 11 Link-Level Flow and Error Control
Go-back-N ARQ
Most common form of error control based on
sliding window
Number of un-acknowledged frames determined
by window size
Upon receiving a frame in error, destination
discards that frame and all subsequent frames
until damaged frame received correctly
Sender resends frame (and all subsequent
frames) either when it receives a Reject message
or timer expires
20
Chapter 11 Link-Level Flow and Error Control
Selective-Reject ARQ
The only frames retransmitted are those that
receive a negative acknowledgment, in this case
called SREJ, or those that time out.
The receiver must maintain a buffer large enough
to save post-SREJ frames untill the frame in
error is retransmitted and must contain logic for
reinserting that frame in the proper sequence.
21
Chapter 11 Link-Level Flow and Error Control
Figure 11.7
22
Chapter 11 Link-Level Flow and Error Control
Error-Free Stop and Wait
T = Tframe + Tprop + Tproc + Tack + Tprop + Tproc
Nx = 1
1-P
= average number of times each frame must be
transmitted due to errors
S= 1 = 1-P
Nx (1 + 2a) Nx (1 + 2a)
25
Chapter 11 Link-Level Flow and Error Control
The Parameter a
a = propagation time = d/V = Rd
transmission time L/R VL
where
d = distance between stations
V = velocity of signal propagation
L = length of frame in bits
R = data rate on link in bits per sec
26
Chapter 11 Link-Level Flow and Error Control
Figure 11.8
27
Chapter 11 Link-Level Flow and Error Control
Table 11.1
28
Chapter 11 Link-Level Flow and Error Control
Figure 11.9
29
Chapter 11 Link-Level Flow and Error Control
Error-Free Sliding Window ARQ
Case 1: W ≥ 2a + 1
Ack for frame 1 reaches A before A has
exhausted its window
Case 2: W < 2a +1
A exhausts its window at t = W and cannot send
additional frames until t = 2a + 1
30
Chapter 11 Link-Level Flow and Error Control
Figure 11.10
31
Chapter 11 Link-Level Flow and Error Control
Normalized Throughput
1 W ≥ 2a + 1
S=
W W < 2a +1
2a + 1
32
Chapter 11 Link-Level Flow and Error Control
Selective Reject ARQ
1-P W ≥ 2a + 1
S=
W(1 - P) W < 2a +1
2a + 1
33
Chapter 11 Link-Level Flow and Error Control
Go-Back-N ARQ
1-P W ≥ 2a + 1
S= 1 + 2aP
W(1 - P) W < 2a +1
(2a + 1)(1 – P + WP)
34
Chapter 11 Link-Level Flow and Error Control
Figure 11.11
35
Chapter 11 Link-Level Flow and Error Control
Figure 11.12
36
Chapter 11 Link-Level Flow and Error Control
Figure 11.13
37
Chapter 11 Link-Level Flow and Error Control
High-Level Data Link Control
HDLC is the most important data link
control protocol
Widely used which forms basis of other
data link control protocols
38
Chapter 11 Link-Level Flow and Error Control
Figure 11.15
39
Chapter 11 Link-Level Flow and Error Control
HDLC Operation
Initialization
Data transfer
Disconnect
40
Chapter 11 Link-Level Flow and Error Control
Figure 11.16
41
Chapter 11 Link-Level Flow and Error Control