TCP Timeout and Retransmission - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

TCP Timeout and Retransmission

Description:

TCP Timeout and Retransmission. RTT Measurement. Err = M ... RTT and clock ticks. RTTs are measured in ticks, not in seconds. Tick happen at 500ms intervals ... – PowerPoint PPT presentation

Number of Views:356
Avg rating:3.0/5.0
Slides: 19
Provided by: cseOhi
Category:

less

Transcript and Presenter's Notes

Title: TCP Timeout and Retransmission


1
TCP Timeout and Retransmission
2
RTT Measurement
  • Err M A
  • A ? A g ? Err
  • D ? D h ? (Err - D)
  • RTO ? A 4D
  • M Measured sample, A Running average
  • g0.125, h 0.25

3
Karns Algorithm
  • For retransmitted packets, RTT estimates are not
    updated

4
RTT Measurements
  • There is at most one ongoing measurement at any
    time

5
RTT and clock ticks
  • RTTs are measured in ticks, not in seconds
  • Tick happen at 500ms intervals

6
Measured RTT and RTO Estimate
7
RTT Calculations
  • RTO of very first packet (SYN)
  • Initial values A 0, D 3
  • RTO A 2D 0 2 X 3 6 seconds
  • Exponential backoff upon timeout
  • Example
  • Err M A 0.5 2 -1.5
  • A A g x Err 2 0.125 x 1.5 1.8125
  • D D h (Err - D) 10.25 x (1.5-1) 1.125
  • RTO A 4D 1.8125 4 x 1.125 6.3125
  • In reality, all calculations are done in integers
    resulting in a value of 6 seconds in this example

8
Retransmissions
9
Slow Start(cwnd lt ssthresh)
  • Increase window by 1 MSS for each new ACK
    received
  • It is expected that in each RTT window would
    double
  • The start is slow, but growth of window is very
    fast in this phase
  • Often a short duration phase
  • Most of the lifetime of a connection is in the
    congestion avoidance phase (typically)

10
Adjusting TCP parameters
  • Initialize Cwnd 1, ssthresh 65535
  • TCP sender constrained by Min(cwnd, recvwin)
  • Upon congestion (timeout/3 duplicate ACKs)
  • ssthresh ? round_MSS(max(2MSS,0.5 x
    min(cwnd,recvwin))
  • Upon receiving a new ACK in Congestion Avoidance
    phase (cwnd gt ssthresh)
  • cwnd ? cwnd segsize x segsize/cwnd segsize/8
  • Upon timeout
  • cwnd ? 1 MSS

11
Slow Start and Congestion Avoidance ( A Coarse
Visualization)
12
Fast Retransmit and Fast Recovery
  • Upon 3rd DUPACK
  • ssthresh ? round_MSS(max(2MSS,0.5 x
    min(cwnd,recvwin))
  • cwnd ? ssthresh 3 MSS
  • Retransmit missing segment
  • For additional DUPACK
  • Increment cwnd by MSS
  • Transmit packet if allowed by current window
  • When new ack arrives
  • set cwnd to ssthresh (the value in the first
    step) 1 MSS

13
Duplicate ACKs
  • 45 is retransmitted as 63
  • Data is buffered till the in-sequence contiguous
    chunk becomes available

14
Cwnd and sequence number An Example
15
Slow-start and Congestion Avoidance Example
16
Duplicate ACK Example
17
ICMP Host Unreachable
  • TCP does not react to it
  • It retries with exponential increase in RTO
  • RTO increases to a max of 64 sec

18
Repacketization(Example sock sending data to
discard port)
Write a Comment
User Comments (0)
About PowerShow.com