Data Link Protocols
Have you ever sent data to a friend and wondered if it ever made it to him/her successfully? Well, data link protocols help make sure all the data you wanted to send was sent successfully. A data link protocol is one of the most important parts of information technology/networking.
“The data-link layer is the protocol layer in a program that handles the moving of data in and out across a physical link in a network. The data-link layer is layer two in the Open Systems Interconnect (OSI) model for a set of telecommunication protocols.” In the data-link layer there is two sublayers that are described in the LAN standards, which are: Media Access Control (MAC) and Logical Link Control (LLC). The uppermost sublayer is LLC. LLC provides acknowledgement, flow control and it also provides error notification. The LLC often provides control and addressing for the data link. Doing this helps specify which mechanisms should be used for addressing stations over the transmission medium and for controlling data, which must be exchanged between both the recipient and originator machines. The MAC sublayer helps determine who can access the media. The two types of media access control are centralized and distributed. MAC helps determine where the frame of data must end and where the nest one should start, this is called frame synchronization. There are four types of frame synchronization, they are: time based, character counting bit stuffing, and byte stuffing. Time based puts a specific amount of time in between frames. Character counting counts notes in the frame’s header. Byte stuffing gives the frame a unique byte sequence. Bit stuffing replaces starting and end marks with a unique bit pattern. The bottom layers are described in this quote:
In Ethernet and Wi-Fi networks, the data link layer is split into two sublayers. The logical Link Control (LLC) is an interface to the Media Access Control (MAC) layer. The MAC is also hardware, because the functions are embedded in the transceiver chips.
The data-link layer makes sure that a connection has been set up. After, it divides output date into data frames. Then, it receives acknowledgements that the data has arrived successfully. It also makes sure that the incoming data has been received successfully as well; it does this by analyzing the bit patterns during certain places in the frames. The data link protocol is responsible for making sure that the bits and bytes received are completely identical to the bits and bytes being sent. It helps transfer data between neighboring network nodes located in a wide area network, or between nodes, which are located on the same local area network. A frame’s header contains a source and destination; it indicates which devices originated from the frame and which device is supposed to process and receive it. Here is an example described in PC Magazine:
In a local network, if a message is split into 100 packet and a station receives 97, the data link protocol ensures those 97 are error free, but it is not aware of the three missing ones. TCP and other higher-layer protocols make sure all 100 are delivered. Following are major types: Asynchronous Transmission, Synchronous Transmission, and Local Area Networks (LANs).
Not only do data link protocols help make sure data has been sent successfully, but it also corrects problems on other layers as well. Since data link protocols provide the ability to transfer data across different networks, it should be able to correct issues and problems that might occur in the physical layer. Some examples of data link protocols are the point-to-point protocol (PPP), high level data link control (HDLC), advanced data communication control procedure (ADCCP), Ethernet and link access procedure (LAP).
All data link protocols work at different speeds. The speed of a data link protocol is described here:
When data frames (Layer-2 data) are sent from one host to another over a single medium, it is required that the sender and receiver should work on same speed. That is, sender sends at a speed on which the receiver can process and accept the data. What if the speed (hardware/software) of the sender or receiver differs? If sender is sending too fast the receiver may be overloaded (swamped) and data may loss.
There are two different types of flow control mechanisms when it comes to data link protocols. One is stop and wait, and the other is sliding window. The stop and wait flow control mechanism “forces the sender after transmitting a data frame to stop and wait until the acknowledgement of the data-frame sent is received.” The sliding window flow control mechanism is when both the receiver and sender agree on the amount of data-frames. Out of these two flow control mechanisms, the sliding window is the best because the stop and wait flow control mechanism tends to waste resources. In the sliding window control mechanism, it tries to make use all parts and resources as much as it can.
One big part of data link protocols mechanism is error control. When the data-frame transmits, there is a probability that the data-frame can be lost in the transit or it can be corrupted when it is received. In both scenarios, the receiver does not receive the correct data-frame and the sender is not aware about the loss. In this type of case, both the receiver and sender are supplied with some protocols that help them pick out the transit errors. In order to fix the problem, the sender has to retransmit the data or the person receiving the data can request for a repeat of the previous data-frame. There are also different requirements for error control mechanisms, such as: error detection, positive ACK, negative ACK and retransmission. Error detection is when the sender and receiver, both or one of the two, have to see if there has been some type of error on the transit. Positive ACK is when the receiver should acknowledge when it has the correct frame. Negative ACK is when a receiver receives a duplicate or damaged frame; when one of the two is received, a NACK is sent back to the sender, and the sender then has to retransmit the correct frame. Retransmission is when the sender keeps hold of a clock and has set aside a timeout period. If acknowledgement of a data-frame is transmitted but is not received within the timeout period, the sender has to retransmit the frame, because they have the belief or acknowledgement that it got lost during transit.
Although most of the time, data link protocols are very efficient and helpful, sometimes they may produce errors but are quickly fixed by automatic repeat requests (ARQ). There are three types of automatic repeat requests, they are: stop-and-wait ARQ, go-back-n ARQ, and selective repeat ARQ. During a stop-and-wait ARQ, some of these may occur: the sender may maintain a timeout counter, the sender starts the timeout counter when a frame is sent, the next frame is transmits by queue if acknowledgement comes on time, the sender has to assume the acknowledgement was lost during transit if the frame does not come on time, and the sender has to retransmit the frame if they receive a negative acknowledgment. The stop and wait ARQ mechanism does not use all of the resources the best that they can. When the acknowledgement is received, the sender is idle and does not do anything. For the go-back-n ARQ method, both the receiver and the sender have a window. The sending window size gives the sender the ability to send a few frames without having to receive acknowledgement for the previous frames. The receiving window gives the receiver the ability to receive frames and acknowledge them at the same time. And the receiver keeps track of the sequence number of incoming frames. When the sender sends the frames in a window, it has to check what the sequence number it received in positive ACK. If all of the frames are acknowledged and checked through, the sender has to send out the next batch of frames. If the sender finds out that the receiver has received NACK, or has not been able to receive any ACK for a frame, all the frames are retransmitted. For go-back-n ARQ, we assume that the receiver does not have any buffer space due to the window size, and has to process each frame as it comes in. Due to this, it helps enforce the sender to retransmit all of the frames, which went acknowledged. In the selective-repeat ARQ, the receiver keeps track of all the sequence numbers, has to buffer the frames and has to send NACK for frames, which are either damaged or missing. In this case, it only sends out packets when NACK is received.
Overall, data link protocols help makes networking easier, and without it, networking and information technology would not be the same. On a professional and non-professional level, it helps make sending data easy and somewhat fun. It catches its errors whenever it is wrong, and fixes it by itself. It is one of the most efficient networking strategies we use today.