Retransmission
- Retransmission Strategies
- Acknowledgements
- Stop-and-Wait retransmission
- Alternating Bit protocol
Retransmission strategies
- link level: when error rate on link is high, e.g. modem or wireless
- end-to-end: when error rate on link is low, e.g. optic fibers
- end-to-end + link level: when end-to-end transmission goes
over some high-error-rate links and some reliable links, e.g. TCP
over modem+fiber optic
- retransmissions use
- special packets, acknowledgments, to
signal that a packet has or has not been received,
- timers to detect packet loss
Types of Acknowledgements
- cumulative: ack everything up to this sequence number, e.g. TCP
- non-cumulative: ack this packet
- negative: I am missing this specific packet
Stop and Wait protocol
- assumption: bounded delay T before receiver ack comes back to sender
(i.e. either ack is received by sender within time T, or ack was never
sent, or ack is lost)
- example: point-to-point connection
- one-bit sequence number for packets (0 or 1)
- if ack is received within time T, send next packet,
- otherwise, resend same packet
- sequence number helps receiver distinguish retransmission from new packet
Correctness of retransmission protocols
- correctness: protocol delivers exactly one copy of each packet,
in the order originally sent
- assumption: if packet is sent often enough, it will make it through
Correctness of stop-and-wait
cases:
- packet and ack received correctly
- packet is lost: sender times out, retransmits.
- ack is lost: sender times out, retransmits. Retransmission
has same sequence number, so receiver discards it.
- receiver cannot miss packet, since sender keeps sending until
positive ack is received
- receiver cannot duplicate packet, since successive packets with
same sequence number are discarded.
Alternating Bit protocol
- assumption: FIFO (non-reordering) network
- example: ethernet
- single bit sequence/ack number
- only one possible outstanding (unacked) packet
- on receipt of packet s, send ack s
- if outstanding packet has sequence s:
- ignore acks 1-s
- ack s allows us to send next packet with sequence 1-s
Correctness of ABP
- if network is FIFO,
- any ack 1-s we receive is for the last packet
- any ack s we receive is for the current packet, and
- when we receive an ack s, there can be no ack 1-s left in the
network.
- therefore, any future ack 1-s must be for future packets, and
- acks will be matched to packets
Step 4 does not hold with a non-FIFO network