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 (1 Gbps link, 15 ms prop. delay, 8000 bit packet)
Pipelining
e.g.
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/