Communication Networks (10)

Reliable Data Transfer: Intuition

Selective Repeat

  • receiver individually acknowledges all correctly received pkts
  • sender only resends pkts for which ACK not received
  • sender window

Selective repeat: dilemma

Receiver can’t see sender side. Assume using Seq. No. 0, 1, 2, 3.

TCP

point-to-point
one sender, one receiver
reliable, in-order byte steam
no “message boundaries”
pipelined
TCP congestion and flow control set window size
full duplex data
bi-directional data flow in same connection
MSS (maximum segment size)
connection-oriented
handshaking (exchange of control msgs) inits sender, receiver state before data exchange
flow controlled:
sender will not overwhelm receiver

Sequence number & ACK number

sequence numbers
byte stream “number” of first byte in segment’s data
acknowledgements
seq # of next byte expected from the other side
cumulative ACK

Sequence numbers acknowledgements are 32-bits unsigned integers.

  1. A sends ‘C’, which is the 42-th byte sent.
  2. A has recieved the 78-th byte from B and expecting the 79-th.
  3. B sends ‘C’, which is the 79-th byte sent
  4. B has recieved the 42-th byte from B and expecting the 43-th.

Tcp round Trip Time, Timeout

RTT

SampleRTT
measured time from segment transmission until ACK receipt

EstimatedRTT

 EstimatedRTT =(1α)× EstimatedRTT +α× SampleRTT \text { EstimatedRTT }=(1-\alpha) \times \text { EstimatedRTT }+\alpha \times \text { SampleRTT }

typical value: α=0.125\alpha = 0.125

Timeout

Timeout Interval
EstimatedRTT plus “safety margin”
larger variation \to larger safety margin

Deviation in RTT:

 DevRTT =(1β)× DevRTT +β× SampleRTT = EstimatedRTT \text { DevRTT }=(1-\beta) \times \text { DevRTT }+\beta \times | \text { SampleRTT }=\text { EstimatedRTT } |

Typeical β=0.25\beta = 0.25

 TimeoutInterval = EstimatedRTT +4× DevRTT \text { TimeoutInterval }=\text { EstimatedRTT }+4 \times \text { DevRTT }


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