TCP Protocol

Try to combine Transport Layer#Go Back N (GBN) and Transport Layer#Selective ACK (SACK)
Cumulative ACK and receiver buffering

Slow Start

Congestion Avoidance

Fast Recovery

IMG_1084.jpg
IMG_6C1D1232D319-1.jpeg

In summary, the TCP protocol goes from exponential first then linear

IMG_700FE9F4A9F9-1.jpeg|300

TCP State Diagram

Pasted image 20231012231344.png

TCP Saw-Tooth Behavior

Average TCP Throughput =(NRTT+N/2RTT)/2=0.75NRTT
where N=RTT/maxTT

IMG_A388CB588DEC-1.jpeg|490

TCP Timeout Management

TCP has a single timer to keep track of all timeouts

IMG_67ED5DE843FC-1.jpeg|530

RTO Estimation
Exponential Weighted Moving Average (EWMA)

RTO can be estimated as a function of the historical RTT + a safety function

Large RTO means large CW
Large RTO the network will get congested and transmitter will react slowly
Small RTO network utilization is low since transmitter (SST) will react too quickly, even before the network get too congested

Packets to Bytes

TCP operates as a byte stream
uses MSS (maximum segment size) to separate segments of packets

TCP Flow Control

TCP Fairness

Between TCP and UDP
UDP doesn't control congestion, so TCP would always cuts back (TCP being polite), the channel allocation is not fair

Between TCP and TCP

TCP Random Early Drop

Hack/Workaround for the network layer to give feedback to TCP about its queue size/congestion.
Network layer drops a random data packet from each flow, so that the router queue does not fill up above some threshold (say 60%).

TCP over Wireless

Bit Error Rate (BER) is the probability that bit will flip

TCP must differentiate between wireless losses and congestion losses (at router) because

TCP performs bad on wireless

Solutions:
(Both violates the layer principles)