Flow Control and
Error Control
Automatic Repeat Requests on
Data Link Layer
Presentation on
OSI Model Layers
Responsible for Flow and Error Control
Team DataClub 2
Flow Control
Sender Receiver
Data
When the receiver is
receiving some data from
the sender, it has to
mention it’s receiving limit
and ACK. If it doesn’t, the
sender may send some
enormous amount of data
which will cause overflow.
will send
10 bytes
limit: 5
bytes
sending
5B
no ACK
overflow
Data
sending
5B
Team DataClub 3
Flow Control
Sender Receiver
ACK
Data
Data
ACK
So, a set of procedure to
restrict the amount of
data the sender can
send before waiting for
acknowledgement is
introduced.
This is flow control.
will send
10 bytes
limit: 5
bytes
sending
5B
received
5B
sending
5B
received
5B
Team DataClub 4
Error Control
Sender Receiver
Frame 0
Similar to Flow Control, if a
sender is sending a frame
and does not receive any
acknowledgement, it will
re-send the frame
automatically.
will send
10 bytes
limit: 5
bytes
sending
5B
no ACK
error
Frame 0
sending
5B
Team DataClub 5
Error Control
Sender Receiver
ACK 0
Frame 0
Frame 1
ACK 1
But when a frame is sent
successfully and
receiver sends an
acknowledgement of it,
the sender can send the
next frame.
This is error control.
will send
10 bytes
limit: 5
bytes
sending
5B
received
5B
sending
5B
received
5B
Team DataClub 6
Protocols
By combining the Flow Control and Error Control, we get 2
different protocols to resolve error. As-
Noiseless Channel
Simplest
Stop-and-Wait
Noisy Channel
Stop-and-Wait
Go-Back-N
Selective Repeat
Team DataClub 7
Noisy Channel Protocols
Our discussion will be based on these 3 noisy channel
protocols-
Noisy Channel
Stop-and-Wait
Go-Back-N
Selective Repeat
Team DataClub 8
1. Stop and Wait Auto Repeat Req.
Team DataClub 9
Sender Receiver
Sends one frame at a time Receives one frame at a time
Send the next packet only after
receiving acknowledgement for
the previous
Send acknowledgement after
receiving and consuming a data
packet
1 (S) + 1 (R) = 2 Sequence Number
1. Stop and Wait Auto Repeat Req.
Team DataClub 10
Sender Receiver
i. Sent and Acknowledged
Frame 0
ACK 1
0 1 0 1 0 1
0 1 0 1 0 1
Start
Stop
Successful
0 1 0 1 0 1
1. Stop and Wait Auto Repeat Req.
Team DataClub 11
Sender Receiver
ii. Frame lost on sender side
Frame 1
ACK 0
0 1 0 1 0 1
Start
Stop
0 1 0 1 0 1 Frame 1 (R)
0 1 0 1 0 1
0 1 0 1 0 1
Timed
Out,
Resent
1. Stop and Wait Auto Repeat Req.
Team DataClub 12
Sender Receiver
iii. Acknowledge lost on receiver side
Frame 0
ACK 1
0 1 0 1 0 1
Start
Stop
0 1 0 1 0 1 Frame 0 (R)
0 1 0 1 0 1
0 1 0 1 0 1
Timed
Out,
Resent
0 1 0 1 0 1
ACK 1
2. Go-Back-N Auto Repeat Req.
Team DataClub 13
Sender Receiver
Sender Window 2m - 1 Receiver Window 1
Send one or more packet only after
receiving acknowledgement
in order
Send acknowledgement after
receiving and consuming a data
packet
( 2m – 1 ) + 1 Sequence Number [( 2m – 1 ) = N]
2. Go-Back-N Auto Repeat Req.
Team DataClub 14
Sender Receiver
i. Sent
Data: 2m = 23 = 8 (01234567)
Window: 23 – 1 = 7
0
1
2
3
4
5
6
1 0 7 6 5 4 3 2 1 0
Window
2. Go-Back-N Auto Repeat Req.
Team DataClub 15
Sender Receiver
ii. Receiving ACK
0
1
2
3
4
5
6
7
0
1 0 7 6 5 4 3 2 1 0
Window
2. Go-Back-N Auto Repeat Req.
Team DataClub 16
Sender Receiver
iii. ACK lost
0
1
2
3
4
5
6
1 0 7 6 5 4 3 2 1 0
Window
7
0
1
Timed
Out,
Resent
2. Go-Back-N Auto Repeat Req.
Team DataClub 17
Sender Receiver
iv. Resend
0
1
1 0 7 6 5 4 3 2 1 0
Window
7
0
1
…
1
2
3
4
5
6
…
2. Go-Back-N Auto Repeat Req.
Team DataClub 18
Sender Receiver
iv. Resend
0
1
7
0
1
…
1
2
3
4
5
6
…
Discard (Out of Sync)
1 0 7 6 5 4 3 2 1 0
Window
2. Go-Back-N Auto Repeat Req.
Team DataClub 19
Sender Receiver
iv. Resend
0
1
1 0 7 6 5 4 3 2 1 0
Window
7
0
1
…
1
2
3
4
5
6
…
Discard (Out of Sync)
1
3. Selective Repeat Auto Repeat Req.
Sender Receiver
Sender Window 2m - 1 Receiver Window 2m - 1
Sends the packets with error or
packets with no ACK when timed
out
Send acknowledgement after
receiving and consuming a data
packet
2 x (2m - 1) Sequence Number [( 2m – 1 ) = N]
3. Selective Repeat Auto Repeat Req.
1 0 7 6 5 4 3 2 1 0
Window
Data: 2m = 23 = 8 (01234567)
Window: 23-1 = 4
Sender Receiver
0
1
2
3
3. Selective Repeat Auto Repeat Req.
1 0 7 6 5 4 3 2 1 0
Window
Sender Receiver
0
1
2
3
0
1
4
5
2
2
3
6
Comparison
Stop-and-Wait ARQ Go-Back-N ARQ Selective Repeat ARQ
Single Frame Flow Control Window Flow Control Window Flow Control
For Lower Error Rate For Higher Error Rate For Higher Error Rate
Less Efficient Moderate Efficient Most Efficient
Comparison
Stop-and-Wait ARQ Go-Back-N ARQ Selective Repeat ARQ
Resent Only Single Lost
Packet
Resent The Lost Packet
Window
Resent The Lost Packets
Small Size Buffer Large Size Buffer Moderate Size Buffer
Conclusion
Stop-and-Wait ARQ is simple to implement and useful for low-
bandwidth connections, but its efficiency is very low for high-
bandwidth connections. Go-Back-N ARQ is more efficient than Stop-
and-Wait ARQ for high-bandwidth connections, but it can result in a
higher number of retransmissions and increased delay due to the use
of a sliding window. Selective-Repeat ARQ provides the best efficiency
and reduced retransmissions by allowing the receiver to accept out-of-
order packets.
Got Any Question?
Thank You! 

Flow Control and Error Control

  • 1.
    Flow Control and ErrorControl Automatic Repeat Requests on Data Link Layer Presentation on
  • 2.
    OSI Model Layers Responsiblefor Flow and Error Control Team DataClub 2
  • 3.
    Flow Control Sender Receiver Data Whenthe receiver is receiving some data from the sender, it has to mention it’s receiving limit and ACK. If it doesn’t, the sender may send some enormous amount of data which will cause overflow. will send 10 bytes limit: 5 bytes sending 5B no ACK overflow Data sending 5B Team DataClub 3
  • 4.
    Flow Control Sender Receiver ACK Data Data ACK So,a set of procedure to restrict the amount of data the sender can send before waiting for acknowledgement is introduced. This is flow control. will send 10 bytes limit: 5 bytes sending 5B received 5B sending 5B received 5B Team DataClub 4
  • 5.
    Error Control Sender Receiver Frame0 Similar to Flow Control, if a sender is sending a frame and does not receive any acknowledgement, it will re-send the frame automatically. will send 10 bytes limit: 5 bytes sending 5B no ACK error Frame 0 sending 5B Team DataClub 5
  • 6.
    Error Control Sender Receiver ACK0 Frame 0 Frame 1 ACK 1 But when a frame is sent successfully and receiver sends an acknowledgement of it, the sender can send the next frame. This is error control. will send 10 bytes limit: 5 bytes sending 5B received 5B sending 5B received 5B Team DataClub 6
  • 7.
    Protocols By combining theFlow Control and Error Control, we get 2 different protocols to resolve error. As- Noiseless Channel Simplest Stop-and-Wait Noisy Channel Stop-and-Wait Go-Back-N Selective Repeat Team DataClub 7
  • 8.
    Noisy Channel Protocols Ourdiscussion will be based on these 3 noisy channel protocols- Noisy Channel Stop-and-Wait Go-Back-N Selective Repeat Team DataClub 8
  • 9.
    1. Stop andWait Auto Repeat Req. Team DataClub 9 Sender Receiver Sends one frame at a time Receives one frame at a time Send the next packet only after receiving acknowledgement for the previous Send acknowledgement after receiving and consuming a data packet 1 (S) + 1 (R) = 2 Sequence Number
  • 10.
    1. Stop andWait Auto Repeat Req. Team DataClub 10 Sender Receiver i. Sent and Acknowledged Frame 0 ACK 1 0 1 0 1 0 1 0 1 0 1 0 1 Start Stop Successful 0 1 0 1 0 1
  • 11.
    1. Stop andWait Auto Repeat Req. Team DataClub 11 Sender Receiver ii. Frame lost on sender side Frame 1 ACK 0 0 1 0 1 0 1 Start Stop 0 1 0 1 0 1 Frame 1 (R) 0 1 0 1 0 1 0 1 0 1 0 1 Timed Out, Resent
  • 12.
    1. Stop andWait Auto Repeat Req. Team DataClub 12 Sender Receiver iii. Acknowledge lost on receiver side Frame 0 ACK 1 0 1 0 1 0 1 Start Stop 0 1 0 1 0 1 Frame 0 (R) 0 1 0 1 0 1 0 1 0 1 0 1 Timed Out, Resent 0 1 0 1 0 1 ACK 1
  • 13.
    2. Go-Back-N AutoRepeat Req. Team DataClub 13 Sender Receiver Sender Window 2m - 1 Receiver Window 1 Send one or more packet only after receiving acknowledgement in order Send acknowledgement after receiving and consuming a data packet ( 2m – 1 ) + 1 Sequence Number [( 2m – 1 ) = N]
  • 14.
    2. Go-Back-N AutoRepeat Req. Team DataClub 14 Sender Receiver i. Sent Data: 2m = 23 = 8 (01234567) Window: 23 – 1 = 7 0 1 2 3 4 5 6 1 0 7 6 5 4 3 2 1 0 Window
  • 15.
    2. Go-Back-N AutoRepeat Req. Team DataClub 15 Sender Receiver ii. Receiving ACK 0 1 2 3 4 5 6 7 0 1 0 7 6 5 4 3 2 1 0 Window
  • 16.
    2. Go-Back-N AutoRepeat Req. Team DataClub 16 Sender Receiver iii. ACK lost 0 1 2 3 4 5 6 1 0 7 6 5 4 3 2 1 0 Window 7 0 1 Timed Out, Resent
  • 17.
    2. Go-Back-N AutoRepeat Req. Team DataClub 17 Sender Receiver iv. Resend 0 1 1 0 7 6 5 4 3 2 1 0 Window 7 0 1 … 1 2 3 4 5 6 …
  • 18.
    2. Go-Back-N AutoRepeat Req. Team DataClub 18 Sender Receiver iv. Resend 0 1 7 0 1 … 1 2 3 4 5 6 … Discard (Out of Sync) 1 0 7 6 5 4 3 2 1 0 Window
  • 19.
    2. Go-Back-N AutoRepeat Req. Team DataClub 19 Sender Receiver iv. Resend 0 1 1 0 7 6 5 4 3 2 1 0 Window 7 0 1 … 1 2 3 4 5 6 … Discard (Out of Sync) 1
  • 20.
    3. Selective RepeatAuto Repeat Req. Sender Receiver Sender Window 2m - 1 Receiver Window 2m - 1 Sends the packets with error or packets with no ACK when timed out Send acknowledgement after receiving and consuming a data packet 2 x (2m - 1) Sequence Number [( 2m – 1 ) = N]
  • 21.
    3. Selective RepeatAuto Repeat Req. 1 0 7 6 5 4 3 2 1 0 Window Data: 2m = 23 = 8 (01234567) Window: 23-1 = 4 Sender Receiver 0 1 2 3
  • 22.
    3. Selective RepeatAuto Repeat Req. 1 0 7 6 5 4 3 2 1 0 Window Sender Receiver 0 1 2 3 0 1 4 5 2 2 3 6
  • 23.
    Comparison Stop-and-Wait ARQ Go-Back-NARQ Selective Repeat ARQ Single Frame Flow Control Window Flow Control Window Flow Control For Lower Error Rate For Higher Error Rate For Higher Error Rate Less Efficient Moderate Efficient Most Efficient
  • 24.
    Comparison Stop-and-Wait ARQ Go-Back-NARQ Selective Repeat ARQ Resent Only Single Lost Packet Resent The Lost Packet Window Resent The Lost Packets Small Size Buffer Large Size Buffer Moderate Size Buffer
  • 25.
    Conclusion Stop-and-Wait ARQ issimple to implement and useful for low- bandwidth connections, but its efficiency is very low for high- bandwidth connections. Go-Back-N ARQ is more efficient than Stop- and-Wait ARQ for high-bandwidth connections, but it can result in a higher number of retransmissions and increased delay due to the use of a sliding window. Selective-Repeat ARQ provides the best efficiency and reduced retransmissions by allowing the receiver to accept out-of- order packets.
  • 26.
  • 27.