Communication Networks (9)

Reliable Data Transfer: Intuition

rdt
reliable data transfer protocol
udt
unreliable data transfer protocol

Reliable Channel

channel is perfectly reliable:

  • no bit errors
  • no loss of packets

Channel with Bit Errors

  • underlying channel may flip bits in packet

Detect error: checksum

Recover from errors: receiver tells sender with:

ACK
acknowledgements

NAKs
:negative acknowledgements

if ACK/NAK corrupted

  • sender doesn’t know what happened at receiver
  • can’t just retransmit: possible duplicate
  • sender adds sequence number to each pkt to deal with duplicating

FSM

Notice that the 2 sequence numbers (0 and 1) suffies
{: .prompt-tip }

NAK-free protocol

  • using ACKs only
  • instead of NAK, receiver sends ACK for last pkt received OK
  • in sender, duplicate ACK means NAK

Channels with Errors and Loss

  • Channel can also lose packets (data, ACKs)
  • sender waits “reasonable” amount of time for ACK
  • retransmits if no ACK received in this time

Performance

utilization Usender U_{\text {sender }} (1 Gbps link, 15 ms prop. delay, 8000 bit packet)

Usender =L/RRT+L/R=.00830.008=0.00027U_{\text {sender }}=\frac{L / R}{R T+L / R}=\frac{.008}{30.008}=0.00027

Pipelining

e.g. 3×Usender 3\times U_{\text {sender }}

Go-back-N

  • sender can have up to N unacked packets in pipeline
  • receiver only sends cumulative ack, Doesn’t ack packet if there’s a gap
  • sender has timer for oldest unacked packet
  • when timer expires, retransmit all unacked packets

Selective Repeat

  • sender can have up to N unacked packets in pipeline
  • rcvr sends individual ack for each packet
  • sender maintains timer for each unacked packet
  • when timer expires, retransmit only that unacked packet

Communication Networks (9)
https://yzzzf.xyz/2024/03/05/communication-networks-9/
Author
Zifan Ying
Posted on
March 5, 2024
Licensed under