The Data Link Layer protects the higher layers from the characteristics of the physical transmission medium, and takes the raw transmission facility and transforms it into a line that appears error free to the network layer. Moreover, included amongst its functions is the synchronisation of data and flow control - ensuring a fast transmitter does not send to a slow receiver.
Another of the principal functions of this layer is to ensure that transmission errors are detected and to provide mechanisms from recovery from these - error control.
It achieves its tasks by having the sender break the input data up into data frames, transmit the frames sequentially, and process the acknowledgment frames sent back by the receiver. Obviously, since the Physical Layer merely accepts and transmits a stream of bits without any regard for meaning, it is up to this layer to create and recognise frame boundaries. In fact, at this level there are two forms of structure - byte-orientated protocols and bit-orientated protocols.
A noise burst on the line can corrupt a frame completely and in this instance the data link layer software on the source machine must retransmit the frame. However, multiple transmissions of the same frame introduce the possibility of duplicate frames. For example, a duplicate frame could be sent if the acknowledgment frame from the receiver was destroyed. It is the responsibility of the Data Link Layer to resolve the problems caused by damaged, lost and duplicate frames.
Another issue that occurs in this layer, and also higher in the hierarchy, is how to avoid a fast transmitter from overloading a slow receiver in data. Generally, this flow regulation and the error control are integrated.
Lastly, if the line is used to transmit data in both directions the problem of acknowledgment and data frames competing for use of the line arises piggybacking has been developed to avoid lessen this.
Services provided to the network layer
Below are some of the functions performed by the Data Link Layer:
In conclusion, the second layer of the OSI Reference Model is where blocks of data are reliably transmitted over a transmission link.