Understanding Data Link Layer and its Usage

Photo of author

By Vijay Singh Khatri

We all use the Internet to get the information we require, but have you ever thought, how is this information sent from one side of the globe to the other? How does a network work? And how the Internet connects you with the rest of the computers and servers? Well, the answer to all these questions can be found at once when you study the OSI (Open Systems Interconnection) model. It is a conceptual framework that is used to educate people about the functions of networking systems. It also characterizes the computing functions in a set of rules and requirements.

So the OSI model can support the interoperability between the different products and software. The OSI model has different layers to it, and each one of them is defined to provide a particular set of features. One of the OSI layers is called the data link layer, and that’s what we are going to elaborate on today. With the help of this article, we are going to show you the components of the data link layer, what type of service the data link layer provides, examples of data link layer protocol, and more. So let’s get it started.

What is a Data Link Layer?

The Data Link Layer in the OSI model and our network is used to provide the secure node to node delivery of the data. It converts packets into frames that it receives from the network layer and then sends them to the physical layer. In addition to this, with the help of a data link layer, the information gets synchronized before its transmission over the network. Likewise, it also helps in error controlling and encoding the data so it can pass to the physical layer.

One of the essential workings of a data link layer is finding the error detection bits and correcting the errors as they are found. This layer assembles the messages into the frame. After that, the system will wait to receive the data transmission acknowledgment. Once the acknowledgment is received, the network becomes reliable to send the data over.

In addition, it is also used to transform the raw transmission facility into a line that will be free of any undetected transmission errors. This line will be sent to the network layer. To achieve this, the data link layer breaks up the data into small frames. These frames are of a few hundred to a few thousand bytes. After the break-up, it will send the frames in sequential order. If the service is reliable, the receiver will provide the confirmation receipt for each frame by sending the acknowledgment frame to the sender.

Services Provided by Data Link Layer

Given below are the function and the services that the data link layer provides in the working of a network.

Framing: These are your streams of bits that are received from the network layer into manageable data units. The data link layer is responsible for the division of streams into smaller bits for transmission.

Physical addressing: When the frame is being sent to the physical layer, the data link layer will provide the header with the frame. This addition of a header is required so that the physical layer will be able to know the sender and the receiver of the frame. This becomes extremely important when the frames need to be distributed into different systems or a network.

Flow control: Data link layer provides a flow control mechanism that keeps the fast transmitter running a slow receiver with the use of a buffer. The buffer will add an extra bit to maintain the flow control. As a result, there is no traffic jam from the receiver side.

Error control: This service is achieved by the data link layer by adding the trailer at the very end of the frame. With the use of this mechanism, the network also avoids the duplication of frames.

Access control: Access control is used when more than one device is connected to the same link. This case will decide which of the devices will get control over the link.

Acknowledgement connectionless service: With the use of the stop and wait protocol used by the data link layer, the delivery of the packet is acknowledged. Here, no logical connection is established. As a result, each frame that is sent over will be acknowledged individually. In addition to this, this mode will allow users to send or transfer data to the other system and ask for the return of the data from the receiver simultaneously.

Acknowledged Connection-Oriented Service: The connection is first established between the sender and the receiver. After that, data will be sent over the established connection. The frames are provided with individual numbers. So that each frame will be received on the other end only once. This also ensures that the frames received are in a proper sequence.

Unacknowledged Connectionless Service: This provides the datagram-style delivery system that is error-free and should be without any issue or even without flow control. Here, the sender’s machine will transmit the independent frames to the receiver’s system without asking for the acknowledgment of the frames. It is called connectionless because there is no connection established in the first place. The working example of this type of mode is Ethernet.

Examples of Data Link Layer Protocols

The primary use of data link layer protocols is to make sure that the bits and bytes that are sent and received are identical to each other. They are a set of specifications that are used for the implementation of the data link layer. The data link layer is present just above the physical layer. There are tons of data link protocols that are required by the Wide Area Network (WAN). But, given below, we have defined some of the most commonly used data link layer protocols for your ease.

Synchronous Data Link Protocol (SDLC)

It is a communication protocol, and it comes with the support of multipoint links and error recovery as well. The primary use of SDLC is to carry the System Network Architecture’s traffic. Also, it is a precursor to the HDLC. During the initial days of the Internet, this protocol was used to connect all the remote devices to the mainframe computers, which are present in the central location. The connection was built like point-to-point or point-to-multipoint depending on the requirement.

High-Level Data Link Protocol (HDLC)

In recent years HDLC has become more like an umbrella under which you can find many Wide Area protocols lurking. This protocol is also used in the x.25 network and was developed by the ISO in 1979. It is loosely based on SDLC and provides both reliable and best-effort unreliable service. The HDLC is a bit-oriented protocol that works fine with both point-to-point and multipoint communication.

Serial Line Interface Protocol (SLIP)

This one is more of an old network protocol, and it was used to add up the framing byte at the end of the IP packet. It is more like a data link control facility which is essential for the transfer of IP packets among Internet Service Providers (ISP). If we look at it in another way, it becomes an encapsulation of TCP/IP that is designed to work with serial ports and several other router connections for communication.

Point to Point Protocol (PPP)

It is used to provide additional functionality to the SLIP. Furthermore, PPP is also considered the most robust protocol used to transport all types of data packets along with the IP packets. Some dial-up Internet connections also require it. In addition to this, it also provides a framing method that describes the frames. Likewise, it is a character-oriented protocol that can be used for finding the errors in frames. Lastly, it can be used to provide the two protocols to the network, NCP and LCP.

Link Control Protocol (LCP)

LCP was created by IEEE 802.2, and in earlier times, it was used as an HDLC service in LAN. LCP is quite like a PPP that is used for establishing, configuring, testing, maintenance, and ending or terminating links when the data frames are being transferred.

Network Control Protocol (NCP)

ARPANET was the one that came up with NCP. It makes it possible for the users to access computers and some other devices from a remote location. Moreover, it can be used to transfer files among two or more computers over the network. It is a protocol that is always available for reach, along with every other higher-layer protocol that PPP can support. Unfortunately, NCP was replaced by TCP/IP in the 1980s.

Link Access Procedure (LAP)

It is the one protocol that is responsible for framing and transferring data across point-to-point links. In addition to this, you are also getting some reliable service features. There are three types of LAP protocols. LAP Balanced, LAP D-channel, and LAP Frame-mode bearer services. LAP was created from IBM SDLC, which IBM is submitting for standardization.

Data Link Layer, and its Usage in Error Detection

There are three different types of errors, and the data link layer uses various error control techniques. To make sure that the frames or streams of data are transmitted from source to destination without any problem or error.

  • Single bit error: In this, only one bit has been corrupted, which means it has changed from its original state from 0 to 1 or vice versa.
  • Multiple bits error: Here, more than one bit is corrupted in the frame.
  • Burst error: With the burst error, more than one consecutive bit is in the corrupt form.

Data Link Layer Taking Control of Errors

There are two methods to deal with errors. First is error detection, where the data link layer checks whether the error has occurred or not. In the detection of the error, the number of error bits and their type don’t matter. Then comes the error correction that requires the knowledge of the exact number of bits that are corrupted along with their location in the data stream. For both these processes, a sender needs to send some additional bits along with the data bits. Once the extra bits are sent, the receiver will perform the necessary checks based on the additional redundant bits. If the receiver finds out that there are no errors present in the frame, it will remove the redundant bits and will transfer the message to the upper layers.

Ways to Find the Location of Error Bits

Backward error correction: If the receiver is facing an error in the incoming frame, it will request the sender to resend the previous frame. It is pretty simple to do, but it is pretty efficient from the start and requires no extra cost. On the other hand, the retransmission of data is relatively low for the requirements of the application.

Forward error correction: If the receiver finds some error in the incoming frame, it will start executing the error-correcting code that will generate the actual frame. This will save a lot of bandwidth that goes for the transmission to take place. It happens all the time when the errors are minor. But if there are too many errors, the frames have to be transmitted again.

Problems in Data Link Layers

The data link layer has its fair share of problems that need to be resolved. Some of these are. With the data link layer, the sender does not drown a slow receiver. What it means is that a sender is sending frames at a very high speed. A slow receiver, on the other hand, might not be able to handle it properly. This results in frame loss even when the transmission is error-free. Besides, the data link layer is also responsible for error-free links for data transmission. But when this happens, it needs to deal with transmission errors, retransmitting the lost frames, and finding a way to control the access for the shared channels when it comes to broadcasting.

Conclusion

So this was all about the various components of the data link layer, the types of services the data link layer provides, and examples of data link layer protocol. Hope now you would have got a better idea about Data Link Layer and its usage.

Leave a Comment