Data Link Layer of OSI Model - MetaTutorials

MetaTutorials

The Tutor is Yours!

Data Link Layer of OSI Model

Here, we will learn about the Data Link Layer of the OSI reference model in detail with its diagram and functions. We will also discuss the protocols used in the Data Link Layer of the OSI model.  

What is the Data Link Layer of the OSI model?

The Data Link Layer is the second layer from the bottom which provides complex functionalities and liabilities in the OSI reference model of computer networking. 
It delivers the message from one node to another node across the physical layer. It receives the packets from the network layer and divides them into frames according to the frame size of the NIC.

It also detects and corrects the errors which may occur in the lowest layer, i.e., the physical layer. The detection and correction of errors are done by the error detection bits. It also deals with the local transportation of frames between two nodes of the same level of the network. 
 
Data Link Layer consists of two sub-layers:
1. Logical Link Control: This layer is the upper sublayer of the data link layer in the OSI model which relates to flow control and error control. It also multiplexes the protocols over the MAC layer when the data is transmitted. 

2. Media Access Control: This layer acts as the interface between the data link layer and logical link control. It uses the MAC protocols which allocate the MAC address to the NIC (Network Interface Card) of the device. 

Following are the protocols used in the data link layer:
1. Ethernet
2. Token Ring
3. FDDI
4. PPP (Point-to-Point Protocol)
5. HDLC

Functions of Data Link Layer

The Data Link layer of the OSI model consists of various functions which play important roles in data transmission. Following are the various functions of the physical layer:
1. Framing: Framing is a point-to-point connection between two nodes in which data is moving in the stream of bits. 
It is a main function in which the data link layer accepts the data from the network layer and encapsulates that data into the frames. Then, this layer transfers each frame on hardware. And, on the receiver side, it accepts the signals from the hardware and assembles them into the frames.

2. Physical Addressing: The data link layer provides the unique (MAC) address to the sender and receiver in the header part of each frame after the creation of frame. 

3. Flow Control: This layer observes the proper flow of data between both the sender and receiver node. 
Suppose, the sender is a powerful and fast device as compared to the receiver, then the receiver gets overloaded by the frames and data may be lost. So, flow control mechanism is important in the data link layer. Flow control in the data link layer allows the sender node to wait until it receives the acknowledgement from the receiver node.    
Following are the three methods or protocols to control the flow of data in the data link layer:
1. Stop and Wait Protocol
2. Selective Repeat
3. Go-Back-N

4. Error Control: This mechanism is also important in data link layer. It checks and corrects one or more errors that occurred in the data during transmission. CRC, Checksum, and Parity bits are the methods used for finding and correcting errors. 

5. Access Control: When multiple networking devices share the same communication channel, then the chances of data collision are increased due to the simultaneous transmission of data. That's why this mechanism is used in data link layer to reduce the collision effect. ALOHA, CSMA, CSMA/CD are the three protocols of access control. 

Protocols of Data Link Layer

Following are the various protocols used in the data link layer:

SDLC (Synchronous Data Link Control Protocol)

The synchronous data link control protocol is a protocol introduced in the 1970s by IBM. It ensures that the data is moved from one network node to another network properly. 
This protocol is used in the data link layer for transmitting error-free data. It is also used to establish the connection between the remote device and mainframe computers. 

HDLC (High-Level Data Link Control Protocol)

High-Level Data Link Control Protocol is a bit-oriented protocol which is used in the data link layer for communication over point-to-point as well as multi-point connections. 
It offers reliable as well as unreliable services. It provides a high level of flexibility, reliability, and efficiency. 

SLIP (Serial Line Interface Protocol)

Serial Line Interface Protocol provides the facility in the data link layer for transmitting the IP packets from Internet Service provider to the home user through the dial-up link. 
The main disadvantage of this protocol is that it does not provide error detection and error correction techniques. 

PPP (Point - to - Point Protocol)

The Point-to-Point Protocol is a byte-oriented protocol in the data link layer which transmits multiprotocol data from one point to another point. The functionality of this protocol is similar to the Serial Line Interface Protocol. 
In the data link layer, it provides a framing technique to define the format of a frame. It is widely used for heavier and faster broadband communications. 

NCP (Network Control Protocol)

Network Control Protocol uses computers and various devices for communication at remote locations. 
This protocol is always applicable to each higher layer protocol which is supported by the Point-to-Point protocol. TCP/IP replaced the Network Control Protocol in the 1980s.