Grundlagen des Internets

Was ist TCP Congestion Control?

TCP Congestion Control kümmert sich darum, dass der Sender die Daten so schnell wie möglich übertragen kann, ohne dabei das Netzwerk zu überlasten. Der Sender soll die Überlastung dabei autonom, also ohne explizites Feedback, erkennen.
 
TCP erkennt Überlastung wie folgt:
Neue ACK empfangen: Data ist korrekt angekommen beim Empfänger - keine Congestion
 
Empfang von 3 Duplikaten ACKs; erwartete Segmente ggf. verloren gegangen -> Moderate Überlastung
 
Timeout -> starke Überlastung
 
Es gibt zwei Kontrollvariablen: cwnd (Congestion window & ssthresh (slow start threshold), hilft dem congestion control algo den cwnd-Wert anzupassen
 
Beim Beginn wird das cnwd auf ein kleines vielfaches vom MSS(maximum segment size in bytes) gesetzt, bspw. 1 MSS. Wenn alle Segmente empfangen und ACK'd sind, also ohne Congestion, so steigt cwnd:
- cwnd < ssthresh -> exponentieller Anstieg pro transmission round
- cwnd >= ssthresh -> linearer Anstieg pro trans.round
 
Bei Congestion steigt cwnd ab:
- starke congestion: cwnd = 1 MSS
- moderate congestion: cwnd = cwnd/2
 
Slow Start ist ein Teil der congestion control:
Kriterium: cwnd < sstresh
- Initialisiert mit cwnd = 1MSS (nach Verbindungssetup oder Timeout)
- exponentieller Anstieg von cwnd, mit cwnd = cwnd+ MSS für jede ACK (pro transmission round)
- Übergang zu "Congestion Avoidance" Phase, wenn cwnd >= ssthresh
 
Congestion Avoidance Phase
Kriterium: cwnd >= ssthresh
- Linearer Anstieg von cwnd um 1 MSS pro transmission round, durch cwnd = cwnd + MSS^2/cwnd
- langsames annähern an optimale Übertragungsrate
- sobald Congestion erkannt wird: cwnd verringern oder Übergang zu Slow Start
 
Bei starker Congestion (durch Timeout):
- ssthresh = cwnd/2
- Übergang zu slow start
 
Bei moderater Congestion (durch 3 duplikate ACKs)
- Übergang zu "Fast Recovery":
- ssthresh = cwnd / 2
- cwnd = ssthresh + 3 MSS (window inflation)
- warte auf fehlende Segmente
- ähnlich wie congestion avoidance, aber erhöht cwnd um 1MSS pro duplikate ACK (window inflation)
- neue ACK erhalten: cwnd = ssthresh, übergang zur normalen Congestion Avoidance (window inflation wird entfernt)
 
Warum window inflation?
- verlorene Segmente halten cwnd davon ab sich weiterzubewegen
- sender vergrößert temporär sein cwnd, um weiterhin Segmente senden zu können

Diskussion