Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 1

The Stop-and-Wait protocol is a simple flow control mechanism used in data communication.

It ensures
reliable transmission of data over a network with potential packet loss or errors. Here's how it works:

Sender sends a packet: The sender sends a single data packet to the receiver.

Receiver acknowledges reception: Upon receiving the packet, the receiver sends back an
acknowledgment (ACK) message to the sender indicating successful receipt.

Sender waits for acknowledgment: After sending the packet, the sender waits for the ACK message. If it
receives the ACK within a certain timeout period, it assumes the packet was successfully delivered and
can send the next packet.

Timeout: If the sender does not receive an ACK within the timeout period, it assumes that the packet
was lost or damaged during transmission. In this case, it resends the same packet.

Receiver discards duplicate packets: If the receiver receives a duplicate packet (due to retransmission), it
discards the duplicate and sends an ACK for the last correctly received packet.

This process continues until all data packets have been successfully transmitted and acknowledged.

The main advantage of the Stop-and-Wait protocol is its simplicity. However, it can be inefficient,
especially in high-latency networks, as the sender has to wait for an acknowledgment before sending the
next packet. This can result in underutilization of the available bandwidth. To improve efficiency,
protocols like Selective Repeat and Go-Back-N have been developed, which allow for the transmission of
multiple packets before receiving acknowledgments.

You might also like