3

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?

Chill3er
  • 41
  • 1
  • 1
  • 5
  • 2
    Mostly, in real life, the Data-Link Layer has no flow control, and all flow control is handled in the Transport Layer. For example, there _is_ an ethernet flow control, but it is often not implemented, and it is poorly supported. It is an afterthought that was bolted onto ethernet. – Ron Maupin Jul 25 '17 at 15:08
  • Ron's right. Full-duplex ethernet was supposed to use the pause frame to implement flow control but it's often not done, poorly implemented or delivered with bad firmware default config that never gets updated. – Andy Brown Jul 26 '17 at 10:02

3 Answers3

2

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.

Trishant Pahwa
  • 2,559
  • 2
  • 14
  • 31
1

it has a different approaches in transport layer and data link layer ... because -> transport layer is an end to end communication that is communication between node to node (sender and receiver).. -> where as in data link layer there will be multiple intermediate nodes(routers) present hence flow control mechanism is with respect to adjacent nodes in path between sender and receiver here therefore they have different approaches

Community
  • 1
  • 1
Rishab
  • 67
  • 6
0

Both L2 (Data Link Layer) and L4 (Transport Layer) do flow control.

It's probably well known that TCP (L4) does flow control using sliding window protocol. Together with congestion control, TCP makes great effort to raise transmission efficiency.

There's a physical limit that the medium can transmit at most one frame at any given time, otherwise electrical signals (or other carriers) would interfere with each other, IOW, collides. Therefore, CSMA/CD and analogous come to solve this issue.

You should read those references to get yourself clear.

dastan
  • 1,006
  • 1
  • 16
  • 36
  • CSMA/CD for ethernet died years ago when everyone moved to full-duplex communication with direct connections to the switch. – Andy Brown Jul 26 '17 at 09:57
  • @AndyBrown It's said CSMA/CD as part of IEEE specification still exists in switches, only that it doesn't do anything when you're not using a hub and the switch is on full-duplex. – dastan Jul 26 '17 at 11:56
  • Hubs are almost extinct, so CSMA/CD is almost extinct. The latest ethernet standards do not even support CSMA/CD. It does not exist inside switches. – Ron Maupin May 05 '19 at 04:15