250 likes | 527 Views
Data Link Control. Flow control Coordinates the amount of data that can be sent before having to stop sending and wait for the acknowledgement. Error control
E N D
Data Link Control • Flow control • Coordinates the amount of data that can be sent before having to stop sending and wait for the acknowledgement. • Error control • Allows the receiver to inform the sender of any frames lost or damaged (error detection) and coordinates the retransmission of those frames (error correction). • Achieved by means of an automatic repeat request (ARQ). Data Link Layer
ARQ Mechanism • Stop-and-wait ARQ • The sending device keeps a copy of the last frame transmitted until an acknowledgement (ACK) for that frame is received. • Both data frames and ACK frame are numbered alternately 0 and 1 for identification purpose. • A damaged or lost frame is equally by the receiver. • The sender has a control variable called S that holds the number of the recently sent frame (0 or 1). Data Link Layer
ARQ Mechanism (continued…) • The receiver has a control variable called R that holds the number of the next frame expected (0 or 1). • The sender starts a timer when it sends a frame. • The receiver sends only positive ACK for frames received safe and sound; it is silent about the damaged or lost frames. Data Link Layer
Note: In Stop-and-Wait ARQ, numbering frames prevents the retaining of duplicate frames. Data Link Layer
Note: Numbered acknowledgments are needed if an acknowledgment is delayed and the next frame is lost. Data Link Layer
ARQ Mechanism (continued…) • Stop-and-wait ARQ disadvantage • Inefficient use of the transmission medium because at any one time for a sender, there is only one frame that is sent and waiting for acknowledgement. Data Link Layer
ARQ Mechanism (continued…) • Go-back-N ARQ • Up to W frames can be sent before having to worry about the acknowledgement (ACK). • A copy of these frames will still be kept until the ACK arrives. • To achieve this, the following are required: • Sequence numbers • Sender and receiver sliding windows • Control variables Data Link Layer
Note: In Go-Back-N ARQ, the size of the sender window must be less than 2m; the size of the receiver window is always 1. Data Link Layer
ARQ Mechanism (Continued…) • Selective repeat ARQ • Similar to Go-back-N ARQ except that when a frame is damaged, only the damaged frame will be retransmitted • For this, the following are needed: • Sender and receiver sliding windows • Control variables • Negative acknowledgement Data Link Layer
Note: In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of 2m. Data Link Layer