DATA COMMUNICATION Lecture-38
Recap of Lecture 37 Line Discipline ENQ/ACK POLL/SELECT Flow Control
Overview of Lecture 38 Flow Control -Stop-and-Wait -Sliding Window Error Control
Flow Control A set of procedures used to restrict the amount of data the sender can send before waiting for acknowledgment Each receiving device has a buffer
Flow Control
Stop-and-Wait Sender sends one frame and waits for an acknowledgment before sending the next frame Simple, but inefficient
Stop-and-Wait
Sliding Window Sliding window is an imaginary box At both sender and the receiver Frames are numbered modulo-n, window size is n-1 An ACK includes the number of next frame it expects
Sliding Window The sender can transmit several frames before needing an acknowledgment
Sender Window Sliding window of the sender Shrink from the left when frames are sent Expands to the right when ACKs are received
Sender Window
Receiver Window Sliding window of the receiver Shrink from the left when frames are received Expands to the right when ACKs are sent
Receiver Window
Error Control Error control in the data link layer is based on ARQ (Automatic Repeat Request) Retransmission in three cases Damaged frame, lost frame, and lost ACK
Error Control
Stop-and-Wait ARQ: Damaged Frame
Stop-and-Wait ARQ: Lost Frame
Stop-and-Wait ARQ: Lost ACK
Summary Flow Control -Stop-and-Wait- -Sliding Window Error Control
Suggested Reading Section 10.2,10.3 “Data Communications and Networking” 2nd Edition by Behrouz A. Forouzan