Flow control in data link layer vs flow control in transport layer

Chill3er picture Chill3er · Jul 25, 2017 · Viewed 13.3k times · Source

I'm trying to understand the OSI layer model.
I often read that flow control in mainly handelt in Data Link Layer (L2) and Transport Layer (L4). But I cant find what methods thay use.
Does the Transport layer uses flow control by TCP by useing window mechanism?
But what/how does the data link layer does flow control?

Answer

Trishant Pahwa picture Trishant Pahwa · Jul 25, 2017

Before knowing how the layers are actually controlling the flow via various algorithms, you must know the reason why is it actually necessary.

Flow control in transport layer ensures the delivery of the message globally, as the two points of connection over this protocol are logically connected.

Whereas in data-link layer, the concern is to deliver message locally, as the two points of connection over this protocol are physically connected.

Now, coming upon the algorithms that control flow of a network:

  1. Stop and Wait - This flow control mechanism forces the sender after transmitting a data frame to stop and wait until the acknowledgement of the data-frame sent is received.
  2. Sliding Window - In this flow control mechanism, both sender and receiver agree on the number of data-frames after which the acknowledgement should be sent. As we learnt, stop and wait flow control mechanism wastes resources, this protocol tries to make use of underlying resources as much as possible.

These are the 2 basic algorithms for flow control, whereas others are used for error control mechanism.

TCP uses the sliding window protocol for flow control, the size of which is dependent upon the bandwidth, RTT and errors in packets.