0% found this document useful (0 votes)
30 views19 pages

Arq 1

The document discusses automatic retransmission request (ARQ) protocols for handling packet errors and retransmissions. It describes the basic stop-and-wait ARQ protocol where the transmitter sends a packet and waits for an ACK before sending the next. It also discusses optimizations like using sequence numbers, increasing the window size in go-back-N ARQ, and sending block ACKs in selective repeat ARQ to reduce overhead.

Uploaded by

pratyaysarkar.cs
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
30 views19 pages

Arq 1

The document discusses automatic retransmission request (ARQ) protocols for handling packet errors and retransmissions. It describes the basic stop-and-wait ARQ protocol where the transmitter sends a packet and waits for an ACK before sending the next. It also discusses optimizations like using sequence numbers, increasing the window size in go-back-N ARQ, and sending block ACKs in selective repeat ARQ to reduce overhead.

Uploaded by

pratyaysarkar.cs
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 19

Automatic Retransmission ReQuest

(ARQ) protocols
Handling erroneous packets
● After a packet is detected to be erroneous, there is
no point accepting those.
● Discard/drop them
● After discarding, what to do depends on application.
– Do nothing else, let the application handle dropped
packets
– Keep track of which packets are dropped and let the
application know about it
– Ask the transmitter to retransmit dropped packets.
Protocols for retransmission of lost
packets
● Simplest protocol overview :
– TX : Transmit one frame and wait for an acknowledgement
from the receiver side;
– RX : If a correct packet is received, it sends an
acknowledgement, and nothing if a frame error is detected.
– Tx : Transmit the next frame only after getting an
acknowledgement.
– Tx : Retransmits the old packet after waiting for
Acknowledgement till a pre-defined timeout.
● The protocol is called Stop-and-Wait ARQ.
Stop-and-Wait Protocol

Packet m

ACK

Packet m+1 (error)


Timeout

Packet m+1 (retx)

ACK
Different scenarios for stop-and-wait
protocols
● Packet m transmitted
● Received successfully
● ACK gets corrupted by error
● Packet m retransmitted after timeout
● Receiver considers the re-transmitted packet as
a new packet.
● Solution ??
Possible solutions
● Usage of sequence number in frames as well
as acknowledgements

Scenarios (contd ..)
● Packet m transmitted
● ACK gets corrupted
● Transmitter times out and retransmits packet m
● Re-transmitted packet gets corrupted – so no
ACK from receiver
● Should this lead to another timeout in the
transmitter, or anything faster can be done ?
Possible solutions
Scenarios (contd ...)
● Transmission delay has little variation
● Packet m transmitted successfully
● ACK is received
● Packet m+1 transmitted but gets corrupted
● ACK retransmitted after timeout in receiver
● Received correctly in the Tx
● Tx assumes packet m+1 correctly received
(mismatch with the receiver)
Possible solutions
Complete protocol operation

● Transmitter
– Transmits a packet with one bit SN(new/old) or (0/1). The flag is flipped each time a
new packet is transmitted.
– Waits for acknowledgement and starts a timer called round-trip timer
– Transmits a new packet with SN = (old_SN + 1)%2 after ACK for old_SN is received.
– Retransmits the old packet after timer expires, upto a maximum number of N
retransmissions and restarts the timer.
● Receiver
– Maintains a boolean RN (0 initially)
– When a new packet with SN = RN is correctly received,
● Sends ACK for RN and starts a timer
● RN = (RN + 1)%2
– If no correct packet is received within timeout, then old ACK is retransmitted upon
timer-expiry.
Modification of stop-and-wait ARQ
● Receiver operation :
– Sequence number RN is no longer modulo-2, it is
modulo-N
– If SN = RN, accept packet, else discard packet
– Send ACK with the next expected sequence number.
– Start/restart timer upon getting a correct packet,
– Send ACK upon timer expiry.
● Similar to stop-and-wait mode operation.
Modification of stop-and-wait ARQ
● Transmitter operation:
– Tx can transmit upto W packets without getting an
acknowledgement. Need not stop after 1 packet.
– SN_max : Maximum sequence number transmitted but
not yet acknowledged. So SN_max = between SN_min
and SN_min + W.
– SN_min is updated if ACK(SN_min+1) is received.
– SN_max is updated after packet SN_max+1 is
transmitted.
– A timer is started for each SN_min.
Example
● Take W = 8.
● Starting value of RN and SN_min = 0
● Packet with SN=4 gets corrupted.
Operation
Optimizations of Go-Back-N ARQ
● Point 1 : All packets transmitted after the
missing packet have to be re-transmitted again.
– Solution : have a buffer in the receiver side to store
correctly received frames even if they are received
out of sequence.
– Size of the receiver buffer (Rx window size) >=
transmit window size.
● Only the missing frame needs to be
retransmitted.
Rx operation example
Further optimization
● Reduce number of positive acknowledgement
– Introduce NACK for missing frames, and
– Reduce number of ACKs by making periodic ACKs
– Introduce polling from Tx
– Change the format of ACK including a bitmap
– Send the status report periodically, on polling or on
reception of any correct frame when there are
missing frames.
Selective repeat ARQ
● Rx buffer (window) maintained
● ACK → status report including bitmaps
● Status report sent periodically, or when polled,
or on each frame when there is a missing
frame.
● Round-trip timer behavior same as Go-Back-N
● Sequence number modulo >= 2*Window size.

You might also like