0% found this document useful (0 votes)
263 views

Implementation of Stop and Wait Protocol

This document discusses the stop and wait protocol and its implementation. It begins by introducing flow control protocols and the stop and wait protocol. It then outlines the workings of simple stop and wait, noting it provides flow control but no error control. Problems with simple stop and wait are described when data or ACKs are lost. The document concludes by explaining how stop and wait ARQ adds timeouts, sequence numbers, and retransmissions to address these problems, providing both flow and error control.

Uploaded by

alwyn rajiv
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
263 views

Implementation of Stop and Wait Protocol

This document discusses the stop and wait protocol and its implementation. It begins by introducing flow control protocols and the stop and wait protocol. It then outlines the workings of simple stop and wait, noting it provides flow control but no error control. Problems with simple stop and wait are described when data or ACKs are lost. The document concludes by explaining how stop and wait ARQ adds timeouts, sequence numbers, and retransmissions to address these problems, providing both flow and error control.

Uploaded by

alwyn rajiv
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Implementation of Stop and Wait

Protocol

Department of Electronics and


Communication Engineering
FLOW CONTROL
Protocols

Noiseless Noisy
Channels Channels

Stop and Stop and Go Back N Selective


Simplest
Wait Wait ARQ ARQ Repeat ARQ

Department of Electronics and Communication Engineering


7/29/2021 2
OUTCOMES
Upon the completion of this session, will be able to

• Understand the working of simple stop and wait protocol

• Understand the problems with simple stop and wait protocol

• Understand the working of simple stop and wait ARQ protocol

Department of Electronics and Communication Engineering


7/29/2021 3
STOP – AND – WAIT PROTOCOL

• Stop – and - Wait protocol is data link layer protocol for


transmission of frames over noiseless channels.
• It provides unidirectional data transmission with flow control
facilities but without error control facilities.
• The idea of stop – and – wait protocol is straightforward.
• After transmitting one frame, the sender waits for an
acknowledgement before transmitting the next frame.

Department of Electronics and Communication Engineering


7/29/2021 4
PRIMITIVES STOP – AND – WAIT PROTOCOL

Sender Side
Rule 1 : Send one data packet at a time.
Rule 2 : Send the next packet only after receiving ACK for the previous.
Receiver Side
Rule 1 : Receive and consume data packet.
Rule 2 : After consuming packet, ACK Needs to be sent (Flow Control)

Department of Electronics and Communication Engineering


7/29/2021 5
STOP – AND – WAIT PROTOCOL

Sender Receiver

Department of Electronics and Communication Engineering


7/29/2021 6
PROBLEMS STOP – AND – WAIT PROTOCOL

1. Problems due to lost data

• Sender waits for ACK for an infinite amount of time.

• Receiver waits for data an infinite amount of time.

Sender Receiver

Department of Electronics and Communication Engineering


7/29/2021 7
PROBLEMS STOP – AND – WAIT PROTOCOL

2. Problems due to lost ACK

• Sender waits for an infinite amount of time for ACK.

Sender Receiver

Department of Electronics and Communication Engineering


7/29/2021 8
PROBLEMS STOP – AND – WAIT PROTOCOL

3. Problems due to delayed ACK/Data

• After timeout on sender side, a delayed ACK might be wrongly


considered as ACL of some other data packet.

Sender Receiver

Department of Electronics and Communication Engineering


7/29/2021 9
STOP – AND – WAIT ARQ PROTOCOL

• The idea of stop – and – wait protocol is straightforward.

• After transmitting one frame, the sender waits for an


acknowledgement before transmitting the next frame.

• If the acknowledgement does not arrive after a certain period


of time, the sender times out and retransmit the original frame.
• Stop-and-Wait ARQ = Stop-and-Wait + Timeout Timer + Sequence Number

Department of Electronics and Communication Engineering


7/29/2021 10
STOP – AND – WAIT ARQ PROTOCOL

1. The ACK is received before the timer expires


Sender Receiver

Timeout

Timeout

Department of Electronics and Communication Engineering


7/29/2021 11
STOP – AND – WAIT ARQ PROTOCOL

2. The Original Frame is Lost


Sender Receiver

Timeout

Timeout

Department of Electronics and Communication Engineering


7/29/2021 12
STOP – AND – WAIT ARQ PROTOCOL

3. The ASK is Lost


Sender Receiver

Timeout

Timeout

Department of Electronics and Communication Engineering


7/29/2021 13
STOP – AND – WAIT ARQ PROTOCOL

4. The Timeout Fires Too Soon


Sender Receiver

Timeout

Timeout

Department of Electronics and Communication Engineering


7/29/2021 14
Thank You

Department of Electronics and


Communication Engineering

You might also like