1 Chapter 11 Chapter 11 Link-Level Flow Link-Level Flow and Error Control and Error Control
Jan 21, 2016
1
Chapter 11Chapter 11
Link-Level Flow and Link-Level Flow and Error ControlError Control
Chapter 11: Link Level Flow and Error Controls2
Introduction Introduction
The need for flow and error The need for flow and error controlcontrol
Link control mechanismsLink control mechanismsPerformance of ARQ (Automatic Performance of ARQ (Automatic
Repeat Request)Repeat Request)
Chapter 11: Link Level Flow and Error Controls3
Flow Control and Error Flow Control and Error ControlControl Motivation: these are fundamental Motivation: these are fundamental
mechanisms that determine mechanisms that determine performanceperformance Can be implemented at different levels: Can be implemented at different levels:
link, network, transport, or applicationlink, network, transport, or application Difficult to model flow/error control end-Difficult to model flow/error control end-
to-endto-end Simplest case: point-to-point linkSimplest case: point-to-point link
– Constant propagationConstant propagation– Constant data rateConstant data rate– Probabilistic error rateProbabilistic error rate– Traffic characteristicsTraffic characteristics
Chapter 11: Link Level Flow and Error Controls4
Flow ControlFlow Control A mechanism whereby the destination A mechanism whereby the destination
node imposes limits on the amount or node imposes limits on the amount or rate of data that is rate of data that is sentsent, or is en route to , or is en route to the receiverthe receiver
Reasons destination may need to limit Reasons destination may need to limit flow:flow:– Source may send PDUs faster than Source may send PDUs faster than
destination can process informationdestination can process information– Higher-level protocol at destination may be Higher-level protocol at destination may be
slow in retrieving dataslow in retrieving data– Destination may need to limit incoming flow Destination may need to limit incoming flow
to match outgoing flow for retransmission to match outgoing flow for retransmission (bridging/forwarding)(bridging/forwarding)
Chapter 11: Link Level Flow and Error Controls6
Flow Control Flow Control Layering/ScopeLayering/Scope
Chapter 11: Link Level Flow and Error Controls8
Flow Control ScopeFlow Control Scope Hop Scope:• directly connected
intermediate systems• managed at link-layer• e.g., X.25 LAPB flow
control, or HDLC • simplest to model
Network Entry to Exit Scope:• internetwork flows, such as
virtual circuits• managed by network• prevents overflow of buffers
at network exit (egress) nodes
Network Interface Scope:• between end user and
network interface (UNI)• limit total flow of packets
from an end-system into the network
End-to-End Scope:• exercised on logical
connections between end systems
• managed by end systems• e.g. TCP, FR LAPF Control
Chapter 11: Link Level Flow and Error Controls9
Error/loss ControlError/loss Control
Used to recover Used to recover lost or damagedlost or damaged PDUsPDUs
Involves Involves error detectionerror detection (via some (via some type of FCS), and PDU type of FCS), and PDU retransmissionretransmission
Typically implemented together Typically implemented together with flow control in a single with flow control in a single mechanismmechanism
Performed at various protocol levelsPerformed at various protocol levels
Chapter 11: Link Level Flow and Error Controls10
Link Control MechanismsLink Control Mechanisms Three techniques for flow and error Three techniques for flow and error
control at the link level:control at the link level:– Stop-and-waitStop-and-wait– Go-back-NGo-back-N– Selective-reject (a.k.a. selective repeat)Selective-reject (a.k.a. selective repeat)
Latter two are special cases of Latter two are special cases of sliding-sliding-window ARQwindow ARQ (Automatic Repeat (Automatic Repeat reQuest)reQuest)
Simplifying assumption: end systems Simplifying assumption: end systems are connected by direct linkare connected by direct link
Chapter 11: Link Level Flow and Error Controls11
ARQARQ
AAutomatic utomatic RRepeat reepeat reQQuestuestA flow and error control A flow and error control
mechanism which uses:mechanism which uses:– Error detectionError detection– TimersTimers– AcknowledgementsAcknowledgements– RetransmissionsRetransmissions
Chapter 11: Link Level Flow and Error Controls13
Stop and WaitStop and WaitSource Source transmitstransmits a frame a frameAfter reception, destination indicates After reception, destination indicates
willingness to accept another frame willingness to accept another frame in in ACKACKnowledgementnowledgement
Source must Source must waitwait for ACK before for ACK before sending another framesending another frame
2 kinds of errors:2 kinds of errors:– Damaged frameDamaged frame received at destination received at destination– Damaged ACKDamaged ACK received at source received at source
Chapter 11: Link Level Flow and Error Controls14
Stop-and-Wait ARQStop-and-Wait ARQ
Chapter 11: Link Level Flow and Error Controls15
Stop-and-Wait Link Stop-and-Wait Link UtilizationUtilization
Chapter 11: Link Level Flow and Error Controls16
Stop-and-Wait Link Stop-and-Wait Link UtilizationUtilization If If TTprop prop is largeis large relative to T relative to Tframe frame (a.k.a. (a.k.a.
TTtranstrans) then throughput is reduced) then throughput is reduced– i.e., if propagation delay is long i.e., if propagation delay is long
relative to transmission time, link is relative to transmission time, link is mostly idlemostly idle
Problem is only one frame in transit Problem is only one frame in transit at a timeat a time
Stop-and-Wait rarely used because Stop-and-Wait rarely used because of inefficiencyof inefficiency
Chapter 11: Link Level Flow and Error Controls17
Sliding Window (Pipelined) Sliding Window (Pipelined) TechniquesTechniquesAllow Allow multiple framesmultiple frames to be to be in transitin transit
at the same timeat the same timeSource can send Source can send n n frames (a frames (a
““windowwindow”) without waiting for ”) without waiting for acknowledgementsacknowledgements
Destination can accept Destination can accept nn frames frames (credit)(credit)
Destination acknowledges a frame Destination acknowledges a frame by sending acknowledgement with by sending acknowledgement with sequence number of next frame sequence number of next frame expectedexpected (and implicitly ready for (and implicitly ready for next next nn frames) frames)
Chapter 11: Link Level Flow and Error Controls19
Sliding Window ExampleSliding Window Example
RR = Receive Ready
window size = 7 segments
Chapter 11: Link Level Flow and Error Controls20
Go-back-N ARQGo-back-N ARQ
Most common formMost common form of error control of error control based on sliding windowbased on sliding window
Number of un-acknowledged frames Number of un-acknowledged frames determined by window sizedetermined by window size
Upon receiving a frame in error, Upon receiving a frame in error, destination discards that frame and all destination discards that frame and all subsequent framessubsequent frames until damaged frame until damaged frame received correctlyreceived correctly
Sender Sender resends frame (and all resends frame (and all subsequent frames)subsequent frames) either when it either when it receives a Reject message or timer receives a Reject message or timer expiresexpires
Chapter 11: Link Level Flow and Error Controls21
Selective Reject ARQSelective Reject ARQ
Error control based on sliding windowError control based on sliding window Number of un-acknowledged frames Number of un-acknowledged frames
determined by window sizedetermined by window size Upon receiving a good frame, Upon receiving a good frame,
destination stores that frame and destination stores that frame and sends reject (SREJ) for lowest sequence sends reject (SREJ) for lowest sequence number frame that it still expects number frame that it still expects
Sender Sender resends each frame for which it resends each frame for which it receives a receives a SREJ message or timer SREJ message or timer expiresexpires
Chapter 11: Link Level Flow and Error Controls22
Sliding Window ProtocolsSliding Window Protocols
Go-back-NGo-back-N
SelectiveSelectiveReject/Reject/RepeatRepeat
Chapter 11: Link Level Flow and Error Controls23
Link Utilization - EfficiencyLink Utilization - Efficiency
The ratio between the use of The ratio between the use of a link for sending user data to a link for sending user data to the available bandwidth on the available bandwidth on the link… orthe link… or
User data that is sentUser data that is sentMaximum capacity of link for sending user Maximum capacity of link for sending user
datadata
Chapter 11: Link Level Flow and Error Controls24
Stop-and-Wait Link Stop-and-Wait Link UtilizationUtilization
Chapter 11: Link Level Flow and Error Controls25
ARQ Performance:ARQ Performance:Error-Free Stop-and-WaitError-Free Stop-and-Wait
T = T = TTframeframe + + TTprop prop ++ TTproc proc ++ TTack ack ++ TTprop prop + T+ Tprocproc
TTframe frame = time to transmit frame (T= time to transmit frame (Ttranstrans))
TTprop prop = propagation time= propagation time
TTproc proc = processing time at station= processing time at station
TTack ack = time to transmit ack= time to transmit ack
Assume TAssume Tproc proc andand TTackack relatively small relatively small
Chapter 11: Link Level Flow and Error Controls26
T T ≈ ≈ TTframeframe + 2T + 2Tprop prop (time required to send a (time required to send a frame)frame)
ThroughputThroughput = 1/T = 1/(T = 1/T = 1/(Tframeframe + 2T + 2Tpropprop) frames/sec) frames/sec
Normalize to link data rate: 1/ TNormalize to link data rate: 1/ Tframeframe frames/sec frames/sec
SS = 1/(T = 1/(Tframeframe + 2T + 2Tpropprop) = T) = Tframe frame = = 11
1/ T1/ Tframe frame T Tframeframe + 2T + 2Tprop prop 1 + 2a1 + 2a
where where a = a = TTprop prop / T/ Tframeframe
Error-Free Stop and WaitError-Free Stop and Wait
Chapter 11: Link Level Flow and Error Controls27
The Parameter aThe Parameter a
a = propagation time = d/V = Rda = propagation time = d/V = Rd transmission time L/R VLtransmission time L/R VL
wherewhered = distance between stationsd = distance between stationsV = velocity of signal propagation V = velocity of signal propagation
(“s”)(“s”)L = length of frame in bitsL = length of frame in bitsR = data rate on link in bits per secR = data rate on link in bits per sec
Chapter 11: Link Level Flow and Error Controls28
Stop-and-Wait TimingStop-and-Wait Timing
tframe = 1, tprop = a
Chapter 11: Link Level Flow and Error Controls29
Stop-and-Wait Stop-and-Wait PerformancePerformance
a = Rd/VL
Chapter 11: Link Level Flow and Error Controls30
Example Values of a:Example Values of a:
e.g., ISDNe.g., ISDN
e.g., FRe.g., FR
e.g., LANe.g., LAN
100BaseT, 1250 bytes
BRI, 1250 bytes
FR via satellite, 1250 bytes
Chapter 11: Link Level Flow and Error Controls31
Stop-and-Wait ARQ with Stop-and-Wait ARQ with ErrorsErrorsP = probability a single frame is in errorP = probability a single frame is in error
NNxx = 1 = 1 1 - P1 - P = average number of times each = average number of times each
frame must be transmitted due to frame must be transmitted due to errorserrors
SS = 1 = = 1 = 1 – P 1 – P
NNxx (1 + 2a) (1 + 2a) 1 + 2a1 + 2a
Chapter 11: Link Level Flow and Error Controls32
Error-Free Sliding Window ARQError-Free Sliding Window ARQ
Case 1: W Case 1: W ≥≥ 2a + 1 2a + 1Ack for frame 1 reaches A before A Ack for frame 1 reaches A before A
has exhausted its windowhas exhausted its windowCase 2: W Case 2: W 2a +1 2a +1
A exhausts its window at t = W and A exhausts its window at t = W and cannot send additional frames until t cannot send additional frames until t = 2a + 1= 2a + 1
Chapter 11: Link Level Flow and Error Controls33
Sliding Window Sliding Window TimingTiming
Case 1
Case 2
Chapter 11: Link Level Flow and Error Controls34
Normalized Throughput Normalized Throughput Error-Free Sliding Window ARQError-Free Sliding Window ARQ 1 W 1 W ≥≥ 2a 2a
+ 1+ 1 S =S = W W W W 2a 2a
+1+1 1 + 2a1 + 2a
or, W times stop-and-or, W times stop-and-wait throughputwait throughput
Chapter 11: Link Level Flow and Error Controls35
Selective Reject ARQSelective Reject ARQ
1 - P W 1 - P W ≥≥ 2a 2a + 1+ 1
S =S = W(1 - P) W(1 - P) WW 2a 2a
+1+1 2a + 12a + 1
or, W times stop-and-or, W times stop-and-wait throughputwait throughput
Chapter 11: Link Level Flow and Error Controls36
Go-Back-N ARQGo-Back-N ARQ
1 - P W 1 - P W ≥≥ 2a 2a + 1+ 1
1 + 2aP1 + 2aPS =S = W(1 - P) W(1 - P) W W 2a 2a
+1+1 (2a + 1)(1 – P + WP)(2a + 1)(1 – P + WP)
Chapter 11: Link Level Flow and Error Controls37
Sliding Window UtilizationSliding Window Utilization
Chapter 11: Link Level Flow and Error Controls38
ARQ Utilization (P = 10ARQ Utilization (P = 10-3-3))
Chapter 11: Link Level Flow and Error Controls39
ARQ Throughput (P = 10ARQ Throughput (P = 10-3-3))