Networking / Beginners

The Data Link Layer

Sometimes called the MAC layer or media access layer or layer 2, this layer takes the physical medium and decides how to use it to provide a channel where there are no undetected errors of transmission. We can use a physical layer that is prone to errors (e.g., radio) as long as we can detect those errors and then we can do something about them.

Typically this is achieved by breaking the input data into data frames, and transmitting each frame individually. A frame is just a chunk of bytes which might be tens or thousands of bytes long. Some standards specify that acknowledgement frames should be returned from the receiver to the sender indicating successful receipt. If a frame is corrupted (lost or damaged), the data link layer could retransmit it or inform the next layer of the problem. A popular choice is to do nothing at all and let a higher layer figure out a remedy.

Another problem that can be addressed at this layer is flow control. Perhaps the sender is pumping out data faster than the receiver can currently cope with: some means of telling the sender to slow down must be employed. Similarly, when the receiver has caught up, it can inform the sender to speed up again.

[Previous] [Contents] [Next]