Introduction
The Data Link Layer in OSI Model is the Second Layer from the bottom. In the TCP/IP Model, it is combined with the Physical Layer to form a combined layer called the Network Interface Layer. Let us discuss the Data Link Layer and all its related functionalities in detail but before that let's briefly recap the OSI Layered Model.
OSI Layered Model
OSI stands for Open System Interconnections. OSI model describes seven layers the computer system uses to communicate over a network. OSI Layered model was the first standard model for network communications in the early 1980s.
Each layer of the OSI (Open System Interconnections) model performs a specific function and communicates with its adjacent layers, i.e., layers above and below.
The seven layers of the OSI model are as follows:
- Physical Layer
- Data Link layer
- Network Layer
- Transport Layer
- Session Layer
- Presentation Layer
- Application Layer
This blog focuses on the second layer of the OSI (Open System Interconnections) model, the Data Link Layer.
Now, we will learn about the Data Link layer in detail.
Data Link Layer
As discussed above, Data Link Layer is the second layer of the OSI (Open System Interconnections) model, which the computer system uses to communicate over a network. The Data link layer is sometimes known as layer 2. The Data link layer is the protocol layer used to transfer data between nodes on a network segment across the physical layer.
The physical layer is the first layer (from the bottom) in the OSI (Open System Interconnections) model. The physical layer is most closely associated with the physical connection between devices. The physical layer also provides a mechanical, electrical, and procedural interface to the transmission medium.
The Adjacent nodes are connected by the communication channel known as links. To move the datagram from the source to the destination, the datagram must be moved across an individual link.
A datagram is an independent, self-contained message sent over the network whose arrival, arrival time, and content are not guaranteed.
The purpose of the Data Link layer is the delivery of frames between nodes on the same level of the network, or we can say that its primary responsibility is to transfer the datagram across an individual link.
Some examples of the Data link layers are Ethernet, token ring, PPP (Point to Point Protocol), HDLC, and ADCCP.
The Data link layer has two sub-layers that are:
-
Logical link control
This layer deals with flow control, protocols, and error controls. -
Media access control
This layer deals with actual control of media.
Must Read HDLC Protocol and Basic Networking Commands
Functionalities of Data Link Layer
The following are the major functionalities provided by the data link layer:
Framing and link access
Framing means the creation of frames, and frames are the streams of bits received from the layers of the network into manageable data units. This process of division of streams of bits (also called framing) is performed by the Data link layer.
Flow Control
The data link layer provides a mechanism for flow control that prevents the sending node on one side of the link from overwhelming the receiving node on another side of the link.
The receiver's buffer can overflow without flow control, which leads to frame loss. Flow control prevents the traffic jam created at the receiver side.
Reliable Delivery
Reliable delivery service is provided by the Data link layer, which means it transmits the network layer datagram without any error. It is accomplished with transmissions and acknowledgments.
Half Duplex and Full Duplex
Data can be transmitted by only one node simultaneously in Half-duplex mode, while data can be transmitted by both the nodes simultaneously in Full-duplex mode. In a half-duplex mode, data can be transmitted in both ways. Both devices can send or receive data in both directions but not at the same time.
In a full-duplex mode, data is transmitted in both directions at the same time. The sender and receiver can send data at the same time in the full-duplex mode.
Error detection
The data link layer provides a mechanism for the detection of errors. In a Computer Network, errors can be introduced by noise and signal attenuation. The error detection is achieved by adding bits for error detection, and then an error check is performed by the receiving node.
Error correction
It is pretty similar to error detection, except that the receiving node detects the error and determines where it occurred in the frame. Error correction mechanism finds out the bits that are corrupted and their location also and uses various mechanisms to prevent duplication of frames.
You can also read about the network models in computer network.
Also see, Message Switching in Computer Networks.