Computer Network
Computer Tutorial

Data Link Layer



Data Link Layer

The main task of the data link layer is to transform a raw transmission facility into a line that appears free of undetected transmission errors to the network layer. It accomplishes this task by having the sender break up the input data into data frames (typically a few hundred or a few thousand bytes) and transmit the frames sequentially. If the service is reliable, the receiver confirms correct receipt of each frame by sending back an acknowledgement frame.
Another issue that arises in the data link layer (and most of the higher layers as well) is how to keep a fast transmitter from drowning a slow receiver in data. Some traffic regulation mechanism is often needed to let the transmitter know that how much buffer space the receiver has at .the moment. Frequently, this flow regulation and the error handling are integrated.
Broadcast networks have an additional issue in the data link layer: how to control access to the shared channel. A special sublayer of the data link layer, the medium access control sublayer, deals with this problem.

Addressing

Headers and trailers are added, containing the physical addresses of the adjacent nodes, and removed upon a successful delivery.

Flow Control

This avoids overwriting on the receiver's buffer by regulating the amount of data that can be sent.

Media Access Control (MAC)

In LANs it decides who can send data, when and how much.

Synchronization

Headers have bits, which tell the receiver when a frame is arriving. It also contains bits to synchronize its timing to know the bit interval to recognize the bit correctly. Trailers mark the end of a frame, apart from containing the error control bits.

Error control

It checks the CRC to ensure the correctness of the frame. If incorrect, it asks for retransmission. Again, here there are multiple schemes (positive acknowledgement, negative acknowledgement, go-back-n, sliding window, etc.).

Node-to-node delivery

Finally, it is responsible for error free delivery of the entire frame/ packet to the next adjacent node (node to node delivery).