CN Unit 2
CN Unit 2
Types of Errors
Errors can be of three types, namely single bit errors, multiple bit errors, and burst errors.
Single bit error − In the received frame, only one bit has been corrupted, i.e. either changed
from 0 to 1 or from 1 to 0.
Multiple bits error − In the received frame, more than one bits are corrupted.
Burst error − In the received frame, more than one consecutive bits are corrupted.
Checksum
In this error detection scheme, the following procedure is applied
Data is divided into fixed sized frames or segments.
The sender adds the segments using 1’s complement arithmetic to get the sum. It then
complements the sum to get the checksum and sends it along with the data frames.
The receiver adds the incoming segments along with the checksum using 1’s complement
arithmetic to get the sum and then complements it.
If the result is zero, the received frames are accepted; otherwise, they are discarded.
Flow Control
Flow control is a technique that allows two stations working at different speeds to communicate with
each other. It is a set of measures taken to regulate the amount of data that a sender sends so that a
fast sender does not overwhelm a slow receiver. In data link layer, flow control restricts the number of
frames the sender can send before it waits for an acknowledgment from the receiver.
Feedback based Flow Control - In these protocols, the sender sends frames after it has
received acknowledgments from the user. This is used in the data link layer.
Rate based Flow Control - These protocols have built in mechanisms to restrict the rate of
transmission of data without requiring acknowledgment from the receiver. This is used in the
network layer and the transport layer.
Flow Control Techniques in Data Link Layer
Data link layer uses feedback based flow control mechanisms. There are two main techniques
–
Go-Back-N ARQ
The working principle of this protocol is:
The sender has buffers called sending window.
The sender sends multiple frames based upon the sending-window size, without
receiving the acknowledgment of the previous ones.
The receiver receives frames one by one. It keeps track of incoming frame’s
sequence number and sends the corresponding acknowledgment frames.
After the sender has sent all the frames in window, it checks up to what sequence
number it has received positive acknowledgment.
If the sender has received positive acknowledgment for all the frames, it sends
next set of frames.
If sender receives NACK or has not receive any ACK for a particular frame, it
retransmits all the frames after which it does not receive any positive ACK.
Sliding Window
This protocol improves the efficiency of stop and wait protocol by allowing multiple
frames to be transmitted before receiving an acknowledgment.
The working principle of this protocol can be described as follows −
Both the sender and the receiver has finite sized buffers called windows. The
sender and the receiver agrees upon the number of frames to be sent based upon
the buffer size.
The sender sends multiple frames in a sequence, without waiting for
acknowledgment. When its sending window is filled, it waits for acknowledgment.
On receiving acknowledgment, it advances the window and transmits the next
frames, according to the number of acknowledgments received.