In the OSI model, the data link layer is the second lowest layer above the physical layer. It also corresponds to the link layer of the TCP/IP model. Most of the networking technologies work on this layer. One such example is the token ring, ethernet etc. Data Link Layer is primarily concerned with data transfer between different nodes.
The data in this layer is termed as frames. They mainly concentrate on local delivery as opposed to inter network routing. Imagine the case of your local cop who manages the traffic in your neighbourhood. He will concentrate on controlling the traffic on that particular area. His function is bounded to a specific region. Similarly, the data link layer has also local frame delivery function. The higher levels are concerned with global addressing.
Data Link Layer or DLL is further subdivided into two logical sublayers.
- MAC (Medium Access Control)
- LLC (Logical Link Control)
The unique hardware address is used in this layer for frame delivery. The header contains the details of the source machine sending the frame and destination machine that is supposed to access the frame and process it. Unlike the IP address, the address used in the Data Link Layer does not indicate the logical or geographical position of the target machine.
The data link layer works according to the protocol hierarchies. It serves the network layer above it and passes the data from that layer to the physical layer while sending. On receipt, the DLL passes the data from the physical layer to the network layer.
Functions of Data Link Layer
- The data link layer is responsible for creating frame boundaries as the physical layers gives no regard to the structure of the data it transmits. One way of doing this is by putting the data in between a specific bit pattern so that the receiver can separate out the actual data from the bit pattern. There is a small issue in doing so. If the bit pattern chosen for the delimiter appears in the data, then it could be misinterpreted by the receiver
- Managing flow control. Imagine you are throwing a ball and there is one person to catch it. If you throw 10 balls at a time and the catcher can catch only 2 balls at a time, you are wasting the other balls. Similarly, if you send 10 frames and the receiver is capable of receiving only 2 frames, then the remaining will be lost. The DLL will make sure that the sender and receiver are at a synchronized pace
- DLL is responsible for issues related to lost or damaged frames and duplicate frames
- Access control for shared channels is the responsibility of data link layer
