In this tutorial, you will learn different protocols of the data link layer, such as the stop and wait protocol and sliding window protocol in computer networks with the help of suitable examples and diagrams.
Let’s Get Started, Happy learning!
Protocols of Data Link Layer
The data link layer combines framing, flow control, and error control to achieve the delivery of data from one node to another. Noiseless channels are error-free and the noisy are error creating channels.
The noiseless channel protocols can not be used in the real-life, but they serve as a basis for understanding the protocols of noisy channels.
For the noiseless channel, the following two protocols are used:
- Simplest Protocol
- Stop and Wait Protocol
The sliding window protocols are used for noisy channels. The sliding window protocol in computer networks is further divided into three parts, as follows:
- Stop and Wait for ARQ
- Go-back ARQ
- Selective Repeat ARQ
In the simplest protocol, no flow or no error control. It is a unidirectional protocol in which data frames travels in only one direction i.e. from sender to receiver. The following is the flow diagram of the simplest protocol, with no flow and error control.
Stop and Wait Protocol
In the stop and wait protocol, the sender sends one frame and stops until it receives confirmation from the receiver. And after receiving confirmation it sends the next frame.
It also has a unidirectional communication for data frames, but the auxiliary ACK frame (for acknowledgement) travels from the other direction. Stop and wait protocol have flow control but no error control. The following is the flow diagram of the stop and wait protocol.
Sliding Window Protocol in Computer Networks
Sliding window protocol in computer networks is used for noisy channels. In this mechanism, a frame is sent with a sequence number. At the destination end, the sequence number is used to find the missing frames.
Using these protocols, we can send multiple frames at a time. The sliding window protocols in computer networks is further divided into three categories as follows:
Stop and Wait ARQ Protocol
It stands for stop and wait automatic repeat request. Stop and wait ARQ, adds a simple error control mechanism to the stop and wait protocol.
To detect and correct corrupted frames, we need to add redundancy bits to our data frame. When the frame arrives at the receiver site, it is checked and if it is corrupted, then discarded.
Lost frames are needed to be resent in this protocol. Error correction in stop and wait ARQ is done by keeping a copy of the sent frame and retransmitting the frame when the time expires.
Drawback: It is a very inefficient mechanism because at one moment only one frame is transmitted.
Go-Back NARQ Protocol
Go-Back NARQ protocol is also known as Go-back N-automatic repeat request. In this protocol, we can send several frames before receiving an acknowledgement. We keep a copy of the frames until the acknowledgement receives.
Selective Repeat ARQ Protocol
In this protocol, only the specified, damaged, or lost frame is retransmitted. In a selective repeat ARQ system, the transmitter does not wait for an ACK signal for the transmission of the next codeword.
It transmits the codewords continuously until it receives the NAK signal from the receiver. The receiver sends the NAK signal back to the transmitter as soon as it detects an error.
Have you enjoyed this tutorial on protocols of the data link layer? Also, try the following notes on computer networks.