350 likes | 532 Views
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). Flow Control and Error Control. Motivation: these are fundamental mechanisms that determine performance
E N D
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) Chapter 11: Link Level Flow and Error Controls
Flow Control and Error Control • Motivation: these are fundamental mechanisms that determine performance • Can be implemented at different levels: link, network, transport, or application • Difficult to model flow/error control end-to-end • Simplest case: point-to-point link • Constant propagation • Constant data rate • Probabilistic error rate • Traffic characteristics Chapter 11: Link Level Flow and Error Controls
Flow Control • A mechanism whereby the destination node imposes limits on the amount or rate of data that is sent, or is en route to the receiver • Reasons destination may need to limit flow: • Source may send PDUs faster than destination can process information • Higher-level protocol at destination may be slow in retrieving data • Destination may need to limit incoming flow to match outgoing flow for retransmission (bridging/forwarding) Chapter 11: Link Level Flow and Error Controls
Flow Control Layering/Scope Chapter 11: Link Level Flow and Error Controls
Hop Scope: • directly connected intermediate systems • managed at link-layer • e.g., X.25 LAPB flow control, or HDLC • simplest to model • End-to-End Scope: • exercised on logical connections between end systems • managed by end systems • e.g. TCP, FR LAPF Control • Network Interface Scope: • between end user and network interface (UNI) • limit total flow of packets from an end-system into the network • Network Entry to Exit Scope: • internetwork flows, such as virtual circuits • managed by network • prevents overflow of buffers at network exit (egress) nodes Flow Control Scope Chapter 11: Link Level Flow and Error Controls
Error/loss Control • Used to recover lost or damaged PDUs • Involves error detection (via some type of FCS), and PDU retransmission • Typically implemented together with flow control in a single mechanism • Performed at various protocol levels Chapter 11: Link Level Flow and Error Controls
Link Control Mechanisms • Three techniques for flow and error control at the link level: • Stop-and-wait • Go-back-N • Selective-reject (a.k.a. selective repeat) • Latter two are special cases of sliding-window ARQ (Automatic Repeat reQuest) • Simplifying assumption: end systems are connected by direct link Chapter 11: Link Level Flow and Error Controls
ARQ • Automatic Repeat reQuest • A flow and error control mechanism which uses: • Error detection • Timers • Acknowledgements • Retransmissions Chapter 11: Link Level Flow and Error Controls
Stop and Wait • Source transmits a frame • After reception, destination indicates willingness to accept another frame in ACKnowledgement • Source must wait for ACK before sending another frame • 2 kinds of errors: • Damaged frame received at destination • Damaged ACK received at source Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait ARQ Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait Link Utilization Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait Link Utilization • If Tprop is large relative to Tframe (a.k.a. Ttrans) then throughput is reduced • i.e., if propagation delay is long relative to transmission time, link is mostly idle • Problem is only one frame in transit at a time • Stop-and-Wait rarely used because of inefficiency Chapter 11: Link Level Flow and Error Controls
Sliding Window (Pipelined) Techniques • Allow multiple frames to be in transit at the same time • Source can send n frames (a “window”) without waiting for acknowledgements • Destination can accept n frames (credit) • Destination acknowledges a frame by sending acknowledgement with sequence number of next frame expected (and implicitly ready for next n frames) Chapter 11: Link Level Flow and Error Controls
Sliding Window Example RR = Receive Ready window size = 7 segments Chapter 11: Link Level Flow and Error Controls
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 Chapter 11: Link Level Flow and Error Controls
Selective Reject ARQ • Error control based on sliding window • Number of un-acknowledged frames determined by window size • Upon receiving a good frame, destination stores that frame and sends reject (SREJ) for lowest sequence number frame that it still expects • Sender resends each frame for which it receives a SREJ message or timer expires Chapter 11: Link Level Flow and Error Controls
Go-back-N Selective Reject/ Repeat Sliding Window Protocols Chapter 11: Link Level Flow and Error Controls
Link Utilization - Efficiency The ratio between the use of a link for sending user data to the available bandwidth on the link… or User data that is sent Maximum capacity of link for sending user data Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait Link Utilization Chapter 11: Link Level Flow and Error Controls
ARQ Performance:Error-Free Stop-and-Wait T = Tframe + Tprop +Tproc +Tack +Tprop + Tproc Tframe = time to transmit frame (Ttrans) Tprop = propagation time Tproc = processing time at station Tack = time to transmit ack Assume Tproc andTack relatively small Chapter 11: Link Level Flow and Error Controls
Error-Free Stop and Wait T ≈ Tframe + 2Tprop (time required to send a frame) Throughput = 1/T = 1/(Tframe + 2Tprop) frames/sec Normalize to link data rate: 1/ Tframe frames/sec S = 1/(Tframe + 2Tprop) = Tframe = 1 1/ Tframe Tframe + 2Tprop 1 + 2a where a = Tprop / Tframe Chapter 11: Link Level Flow and Error Controls
The Parameter a a = propagation time = d/V = Rd transmission time L/R VL where d = distance between stations V = velocity of signal propagation (“s”) L = length of frame in bits R = data rate on link in bits per sec Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait Timing tframe = 1, tprop = a Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait Performance a = Rd/VL Chapter 11: Link Level Flow and Error Controls
Example Values of a: e.g., ISDN BRI, 1250 bytes e.g., FR FR via satellite, 1250 bytes e.g., LAN 100BaseT, 1250 bytes Chapter 11: Link Level Flow and Error Controls
Stop-and-Wait ARQ with Errors P = probability a single frame is in error Nx = 1 1 - P = average number of times each frame must be transmitted due to errors S = 1 = 1 – P Nx (1 + 2a) 1 + 2a Chapter 11: Link Level Flow and Error Controls
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 Chapter 11: Link Level Flow and Error Controls
Sliding Window Timing Case 1 Case 2 Chapter 11: Link Level Flow and Error Controls
or, W times stop-and-wait throughput Normalized Throughput Error-Free Sliding Window ARQ 1 W ≥ 2a + 1 S = W W 2a +1 1 + 2a Chapter 11: Link Level Flow and Error Controls
or, W times stop-and-wait throughput Selective Reject ARQ 1 - P W ≥ 2a + 1 S = W(1 - P) W 2a +1 2a + 1 Chapter 11: Link Level Flow and Error Controls
Go-Back-N ARQ 1 - P W ≥ 2a + 1 1 + 2aP S = W(1 - P) W 2a +1 (2a + 1)(1 – P + WP) Chapter 11: Link Level Flow and Error Controls
Sliding Window Utilization Chapter 11: Link Level Flow and Error Controls
ARQ Utilization (P = 10-3) Chapter 11: Link Level Flow and Error Controls
ARQ Throughput (P = 10-3) Chapter 11: Link Level Flow and Error Controls