Advanced Lab in Computer Communications: - Transmission Control Protocol
Advanced Lab in Computer Communications: - Transmission Control Protocol
Communications
M e e t in g 5 – Transmission Control Protocol
2)Introduction
to Computer Networks, EE School, TAU (Instructor: Yuval Shavitt
in 2004 and Boaz Patt-Shamir in 2005)
Transport
Physical
Congestion control
TCP – ACKs and Sequence #s
Sending at R bps
receiver buffering
11
TCP Congestion Control (2)
Closed-loop, end-to-end, window-based congestion control
Many Versions
TCP/Tahoe: this is a less optimized version
TCP/Reno: many OSs today implement Reno type
congestion control
TCP/Vegas: not currently used
TCP Tahoe (1)
Slow Start:
Set CWD = 1
For each ACK CWD++
Timeouts:
Timeouts (TO) used to detect packet
failures.
After a timeout occurred:
CWD = 1
SSTRESH = CWD/2
Begin start Slow Start all over again.
TCP Round Trip Time and Timeout
16
TCP Tahoe – Problems
Cumulative ACKs-
Follows a Go-Back-N approach.
Every time a packet is lost, need to send the
whole window…
TCP Reno
TCP Reno (1)
Adds a mechanism to detect lost packets earlier:
ACK after every segment
3 duplicate ACKs (TD) means that a segment was lost
Fast Retransmit-
After 3 duplicate ACKs, assume that the packet was lost
and retransmit immediately.
Fast Recovery-
Skip slow start- go right to Congestion Control:
SSTRESH = CWD/2
CWD = SSTRESH
cwnd
TD TD TD
TO
ssthresh
ssthresh ssthresh
ssthresh
Time
slow congestion congestion congestion slow congestion
start avoidance avoidance avoidance start avoidance
21
Reno in Steady State
SNs and CWND
AIMD - Additive Increase Multiplicative Decrease
x2
fairness line:
x1=x2
overload
x0
efficiency
underload line: x1+x2=C
x1
24
TCP Throughput - Objective
25
TCP/Reno Throughput Modeling
Wm * S
throughput ≈ bytes/sec
RTT
26
TCP/Reno Throughput Modeling:
(deterministic)
available
ssthresh bandwidth
W/2
Time
congestion
avoidance
Assume one packet loss (loss event) per cycle
Total packets send per cycle = (W/2 + W)/2 * W/2 = 3W2/8
Thus p = 1/(3W2/8) = 8/(3W2)
W= 8/3
p
= 1.6
p
⇒ throughput = S 3 1.6
RTT 4 p = 1. 2 S
RTT p
27
TCP/Reno Throughput Modeling
(random loss)
mean of ∆W = (1 − p ) W1 + p (− W2 ) = 0
2 (1− p )
=> mean of W = p ≈ 1.4
p
, when p is small
28
TCP Reno - Problems
Windows Vista TCP/IP stack includes a component called Compound TCP (CTCP). If
enabled it uses “aggressive” congestion window algorithms borrowed from Vegas.
CTCP is enabled by default in computers running Windows Server 2008 and disabled
by default in computers running Windows Vista.
In Linux there are different TCP flavors with every release. Starting with Linux 2.6.13
the congestion window algorithm is pluggable and can be set to work according to
Reno, Vegas, Hybla (for satellites links), BIC and many more algorithms. The
administrator can set the correct algorithm according to the connection type he has.
TCP over Wireless – New Challenges
The basic assumption behind TCP is that packets are lost due
to congestion, and that transmission errors are very rear.
This is not true for Wireless networks.
TCP over wireless- Hot topic for researches around the world!
TCP over Wireless – Some Solutions...
Timeout calculation:
Old method: Using only mean of RTT
New method: Using both mean and standard deviation of RTT
2 Factor Authentication –