COMPUTER NETWORK AND SECURITY

Flow control mechanisms in the Data Link Layer are employed to manage the rate at which data is transmitted between two devices in a network. The primary goal of flow control is to prevent the sender from overwhelming the receiver with data, especially in situations where the sending and receiving devices operate at different speeds. 

Flow control mechanisms in the Data Link Layer:

  • Stop-and-Wait:
    • In the stop-and-wait flow control mechanism, the sender sends a frame and then waits for an acknowledgment (ACK) from the receiver before sending the next frame. This ensures that the receiver has successfully received and processed the previous frame.

  • Sliding Window:
    • Sliding window protocols allow multiple frames to be in transit between the sender and receiver simultaneously. The sender maintains a "window" of acceptable sequence numbers, and the receiver acknowledges frames within that window. The window slides as acknowledgments are received, allowing for efficient use of network bandwidth.
      • Go-Back-N: The sender can have multiple frames in transit, and the receiver acknowledges a continuous range of frames. If an error occurs, the sender retransmits all frames from the damaged frame onwards.

  • Selective Repeat: The sender can have multiple frames in transit, and the receiver acknowledges individual frames. If an error occurs, only the damaged frame needs to be retransmitted.