SlideShare a Scribd company logo
1 of 24
FLOW AND ERROR CONTROL
FLOW AND ERROR CONTROL
The most important responsibilities of the data link
layer are flow control and error control. Collectively,
these functions are known as data link control.
Flow Control
Error Control
Topics discussed in this section:
Flow control refers to a set of procedures
used to restrict the amount of data
that the sender can send before
waiting for acknowledgment.
Note
Error control in the data link layer is
based on automatic repeat request,
which is the retransmission of data.
Note
PROTOCOLS
Now let us see how the data link layer can combine
framing, flow control, and error control to achieve the
delivery of data from one node to another. The
protocols are normally implemented in software by
using one of the common programming languages. To
make our discussions language-free, we have written
in pseudocode a version of each protocol that
concentrates mostly on the procedure instead of
delving into the details of language rules.
Taxonomy of Flow and error control protocols
NOISELESS CHANNELS
Let us first assume we have an ideal channel in which
no frames are lost, duplicated, or corrupted. We
introduce two protocols for this type of channel.
Simplest Protocol
Stop-and-Wait Protocol
Topics discussed in this section:
It is very simple. The sender sends a sequence of frames
without even thinking about the receiver. To send three
frames, three events occur at the sender site and three
events at the receiver site. Note that the data frames are
shown by tilted boxes; the height of the box defines the
transmission time difference between
the first bit and the last bit in the frame.
Simplest Protocol
Figure 1 Flow diagram for Simplest Protocol
Algorithm Sender-site algorithm for the simplest protocol
Algorithm Receiver-site algorithm for the simplest protocol
It is still very simple. The sender sends one frame and
waits for feedback from the receiver. When the ACK
arrives, the sender sends the next frame.
Stop-and-wait protocol works under the assumption
that the communication channel is noiseless and
transmissions are error-free.
Working:
•The sender sends data to the receiver.
•The sender stops and waits for the acknowledgment.
•The receiver receives the data and processes it.
•The receiver sends an acknowledgment for the above
data to the sender.
•The sender sends data to the receiver after receiving
the acknowledgment of previously sent data.
•The process is unidirectional and continues until the
sender sends the End of Transmission (EoT) frame
Stop and Wait Protocol
Figure 2 Flow diagram for Example 11.2
Note that in figure 2,sending two frames in
the protocol involves the sender in four events
and the receiver in two events.
Algorithm Sender-site algorithm for Stop-and-Wait Protocol
Algorithm Receiver-site algorithm for Stop-and-Wait Protocol
NOISY CHANNELS
Although the Stop-and-Wait Protocol gives us an idea
of how to add flow control to its predecessor, noiseless
channels are nonexistent. We discuss three protocols
in this section that use error control.
Stop-and-Wait Automatic Repeat Request
Go-Back-N Automatic Repeat Request
Selective Repeat Automatic Repeat Request
Topics discussed in this section:
Error correction in Stop-and-Wait ARQ is
done by keeping a copy of the sent
frame and retransmitting of the frame
when the timer expires.
Note
In Stop-and-Wait ARQ, we use sequence
numbers to number the frames.
The sequence numbers are based on
modulo-2 arithmetic.
Note
In Stop-and-Wait ARQ, the
acknowledgment number always
announces in modulo-2 arithmetic the
sequence number of the next frame
expected.
Note
Stop-and-Wait ARQ
1. It provides both error control and flow control
2. Error control in stop and wait ARQ is done by keeping a
copy of frame until it receives a acknowledgement
3. Sender start a timer when it send a frame. If ACK is not
received within the allocated time period , the sender
assume that the frame was lost or damage and resent
it.
4. Receiver send an ACK to sender if it receives a frame
correctly.
5. ACK number always define the number of the next
expected frame.
Stop and wait ARQ = Stop and wait + Time out + Sequence
Number (Data) + sequence number (ACK))
Stop-and-Wait ARQ
For identification, both data frames and
acknowledgements (ACK) frames are numbered
alternatively 0 and 1.
 Sender has a control variable (S) that holds
the number of the recently sent frame. (0 or
1)
 Receiver has a control variable ® that holds
the number of the next frame expected (0 or
1).
Figure3 shows an example of Stop-and-Wait ARQ.
Frame 0 is sent and acknowledged. Frame 1 is lost and
resent after the time-out. The resent frame 1 is
acknowledged and the timer stops. Frame 0 is sent and
acknowledged, but the acknowledgment is lost. The
sender has no idea if the frame or the acknowledgment
is lost, so after the time-out, it resends frame 0, which is
acknowledged.
Stop-and-Wait ARQ
Figure 3 Flow diagram for Example 11.3
Disadvantage of Stop-and-Wait
• In stop-and-wait, at any point in time, there is only one frame that is sent
and waiting to be acknowledged.
• This is not a good use of transmission medium.
• To improve efficiency, multiple frames should be in transition while
waiting for ACK.
• Two protocol use the above concept,
– Go-Back-N ARQ
– Selective Repeat ARQ

More Related Content

What's hot

Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link controlVishal kakade
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)k33a
 
Token Ring : 802.5
Token Ring : 802.5Token Ring : 802.5
Token Ring : 802.5Pnkj_Sharma
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layerswarna sudha
 
Controlled Access Protocols
Controlled Access ProtocolsControlled Access Protocols
Controlled Access ProtocolsPruthviraj Konu
 
Token ring protocol
Token ring protocolToken ring protocol
Token ring protocolpriyabogra1
 
Switching
Switching Switching
Switching Abid Ali
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)Ramola Dhande
 
HDLC(High level Data Link Control)
HDLC(High level Data Link Control)HDLC(High level Data Link Control)
HDLC(High level Data Link Control)sonangrai
 

What's hot (20)

Csma cd and csma-ca
Csma cd and csma-caCsma cd and csma-ca
Csma cd and csma-ca
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Token Ring : 802.5
Token Ring : 802.5Token Ring : 802.5
Token Ring : 802.5
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
 
Controlled Access Protocols
Controlled Access ProtocolsControlled Access Protocols
Controlled Access Protocols
 
Transport layer
Transport layerTransport layer
Transport layer
 
2.7 wlan ieee 802.11
2.7 wlan   ieee 802.112.7 wlan   ieee 802.11
2.7 wlan ieee 802.11
 
Token ring protocol
Token ring protocolToken ring protocol
Token ring protocol
 
Switching
Switching Switching
Switching
 
Token bus
Token busToken bus
Token bus
 
Multiple access protocol
Multiple access protocolMultiple access protocol
Multiple access protocol
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
User datagram protocol (udp)
User datagram protocol (udp)User datagram protocol (udp)
User datagram protocol (udp)
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
Unit 4 UDP
Unit 4 UDPUnit 4 UDP
Unit 4 UDP
 
Transport layer protocols : TCP and UDP
Transport layer protocols  : TCP and UDPTransport layer protocols  : TCP and UDP
Transport layer protocols : TCP and UDP
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
HDLC(High level Data Link Control)
HDLC(High level Data Link Control)HDLC(High level Data Link Control)
HDLC(High level Data Link Control)
 

Similar to stop and wait

09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.pptShaliniKumariGupta1
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.pptMaddalaSeshu
 
Flow Control (1).ppt
Flow Control (1).pptFlow Control (1).ppt
Flow Control (1).pptsarthakgithub
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer kavish dani
 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptxTejasRao8
 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol conceptsRaji Lakshmi
 
Chapter 11: Data Link Control
Chapter 11: Data Link ControlChapter 11: Data Link Control
Chapter 11: Data Link ControlJeoffnaRuth
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control ProtocolsTechiNerd
 
CN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptxCN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptxSrinuM21
 
Chapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eChapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eadpeer
 

Similar to stop and wait (20)

09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt09 Data Link LayerFlow Control.ppt
09 Data Link LayerFlow Control.ppt
 
DataLinkControl.ppt
DataLinkControl.pptDataLinkControl.ppt
DataLinkControl.ppt
 
Flow Control (1).ppt
Flow Control (1).pptFlow Control (1).ppt
Flow Control (1).ppt
 
3a data link layer
3a data link layer 3a data link layer
3a data link layer
 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol concepts
 
5 DLL-LLC- Book
5 DLL-LLC- Book5 DLL-LLC- Book
5 DLL-LLC- Book
 
Chapter 11: Data Link Control
Chapter 11: Data Link ControlChapter 11: Data Link Control
Chapter 11: Data Link Control
 
Data Link Control Protocols
Data Link Control ProtocolsData Link Control Protocols
Data Link Control Protocols
 
Data link layer (Unit 2).pdf
Data link layer (Unit 2).pdfData link layer (Unit 2).pdf
Data link layer (Unit 2).pdf
 
CN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptxCN UNIT-3 PPT R20 computer networks .pptx
CN UNIT-3 PPT R20 computer networks .pptx
 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
 
Error control
Error controlError control
Error control
 
Chapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9eChapter 7 - Data Link Control Protocols 9e
Chapter 7 - Data Link Control Protocols 9e
 
Transport layer
Transport layerTransport layer
Transport layer
 
DLL
DLLDLL
DLL
 
Unit 2
Unit 2Unit 2
Unit 2
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
 
DATA LINK LAYER.pdf
DATA LINK LAYER.pdfDATA LINK LAYER.pdf
DATA LINK LAYER.pdf
 

Recently uploaded

UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 

Recently uploaded (20)

UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 

stop and wait

  • 1. FLOW AND ERROR CONTROL
  • 2. FLOW AND ERROR CONTROL The most important responsibilities of the data link layer are flow control and error control. Collectively, these functions are known as data link control. Flow Control Error Control Topics discussed in this section:
  • 3. Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment. Note
  • 4. Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Note
  • 5. PROTOCOLS Now let us see how the data link layer can combine framing, flow control, and error control to achieve the delivery of data from one node to another. The protocols are normally implemented in software by using one of the common programming languages. To make our discussions language-free, we have written in pseudocode a version of each protocol that concentrates mostly on the procedure instead of delving into the details of language rules.
  • 6. Taxonomy of Flow and error control protocols
  • 7. NOISELESS CHANNELS Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. Simplest Protocol Stop-and-Wait Protocol Topics discussed in this section:
  • 8. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the height of the box defines the transmission time difference between the first bit and the last bit in the frame. Simplest Protocol
  • 9. Figure 1 Flow diagram for Simplest Protocol
  • 10. Algorithm Sender-site algorithm for the simplest protocol
  • 11. Algorithm Receiver-site algorithm for the simplest protocol
  • 12. It is still very simple. The sender sends one frame and waits for feedback from the receiver. When the ACK arrives, the sender sends the next frame. Stop-and-wait protocol works under the assumption that the communication channel is noiseless and transmissions are error-free. Working: •The sender sends data to the receiver. •The sender stops and waits for the acknowledgment. •The receiver receives the data and processes it. •The receiver sends an acknowledgment for the above data to the sender. •The sender sends data to the receiver after receiving the acknowledgment of previously sent data. •The process is unidirectional and continues until the sender sends the End of Transmission (EoT) frame Stop and Wait Protocol
  • 13. Figure 2 Flow diagram for Example 11.2 Note that in figure 2,sending two frames in the protocol involves the sender in four events and the receiver in two events.
  • 14. Algorithm Sender-site algorithm for Stop-and-Wait Protocol
  • 15. Algorithm Receiver-site algorithm for Stop-and-Wait Protocol
  • 16. NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols in this section that use error control. Stop-and-Wait Automatic Repeat Request Go-Back-N Automatic Repeat Request Selective Repeat Automatic Repeat Request Topics discussed in this section:
  • 17. Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires. Note
  • 18. In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic. Note
  • 19. In Stop-and-Wait ARQ, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected. Note
  • 20. Stop-and-Wait ARQ 1. It provides both error control and flow control 2. Error control in stop and wait ARQ is done by keeping a copy of frame until it receives a acknowledgement 3. Sender start a timer when it send a frame. If ACK is not received within the allocated time period , the sender assume that the frame was lost or damage and resent it. 4. Receiver send an ACK to sender if it receives a frame correctly. 5. ACK number always define the number of the next expected frame. Stop and wait ARQ = Stop and wait + Time out + Sequence Number (Data) + sequence number (ACK))
  • 21. Stop-and-Wait ARQ For identification, both data frames and acknowledgements (ACK) frames are numbered alternatively 0 and 1.  Sender has a control variable (S) that holds the number of the recently sent frame. (0 or 1)  Receiver has a control variable ® that holds the number of the next frame expected (0 or 1).
  • 22. Figure3 shows an example of Stop-and-Wait ARQ. Frame 0 is sent and acknowledged. Frame 1 is lost and resent after the time-out. The resent frame 1 is acknowledged and the timer stops. Frame 0 is sent and acknowledged, but the acknowledgment is lost. The sender has no idea if the frame or the acknowledgment is lost, so after the time-out, it resends frame 0, which is acknowledged. Stop-and-Wait ARQ
  • 23. Figure 3 Flow diagram for Example 11.3
  • 24. Disadvantage of Stop-and-Wait • In stop-and-wait, at any point in time, there is only one frame that is sent and waiting to be acknowledged. • This is not a good use of transmission medium. • To improve efficiency, multiple frames should be in transition while waiting for ACK. • Two protocol use the above concept, – Go-Back-N ARQ – Selective Repeat ARQ