Flow & Error Control
Published in
3 min readFeb 16, 2020
Sender will send data packets to Receiver and Receiver will reply by sending Acknowledgement(Ack). Packets are lost during transmission due to errors . To overcome this errors there are Flow & Error control mechanism .
Flow and Error mechanism :-
- Stop and Wait Protocol
- Sliding Window Protocol :-
- 1. Go Back N Protocol
- 2. Selective Repeat Protocol
Stop and Wait :-
Sender will send one data packet at a time and Receiver will reply with sending acknowledgment after receiving & consuming of data packet . No other data packet can be send until the Receiver sends back a reply .
There are some problems in using Stop & Wait Protocol :-
- Lost Data :- Both sender and receiver will waits for infinite amount time .
- Lost Acknowledgement :- Sender waits for Acknowledgement for infinite amount of time .
For overcome this problem there are Stop & Wait ARQ(Automatic Repeat Request):-
- It performs both error control and flow control .
- It is a combination of four concepts :- Stop & Wait , Timeout [Loss Data], Sequence No. for data [Loss Ack], Sequence No. for Ack[delayed Ack] .
- Timeout:- Sender waits for few minutes after sending data , if the Acknowledgement will not come from Receiver side . Sender Thought that the data will lost . It will send same data packet and Receiver will send Acknowledgement .
- Sequence No. (data):- Sender will send data packet and Receiver will send Acknowledgement will lost then the sender will wait for a timeout and again send same data , because of sequence no. for data is attached with the data packet . Sender will check the sequence no. of data packet which sender will send .
- Delayed Acknowledgement:- This is resolved same as Sequence No. (data) by giving sequence no. to acknowledgement .
Advantages :-
- Noise Channels .
- Flow & Error Control mechanism .
- Timer Implementation .
Disadvantages :-
- Efficiency is very less .
- Only one frame is send at a time .
2. Go Back N :-
- Several data packets are send by sender before receiving acknowledgement by receiver .
- Receiver sends Negative acknowledgement along with data packet sequence no.
- After Negative acknowledgement receiver discarded all the data packets .
- If the data packets is lost then just checks the sequence of each data packet .
- If sender does not receive acknowledgement within a time , it re-sends all the data packets .
3. Selective Repeat :-
- It re-transmits only that data packet which is damaged and lost .
- The receiver is capable of sorting the data packets in proper sequence .
- The sender must be capable of searching the data packets for which Negative acknowledgement has been send by receiver .
- It requires less window size as compared to Go Back N protocol .