Chapter 3: Transport Layer 3.5 - 3.7 Flashcards
Characteristics of TCP connection oriented transport
- point to point (one sender one receiver)
- reliable, in order byte stream
- full duplex data
- pipelining, cumulative ACKs, and flow controlled
TCP sequence number, ACKs ?
Sequence number : byte stream “number” of first byte in segment data
ACKs : sequence of next byte expected from the other side
TCP round trip time ?
EstimatedRTT = (1 - a) * EstimatedRTT + (a * SampleRTT)
typical value of a = 0.125
SampleRTT : measured time from segment transmission until ACK received
what is formula of TCP timeout interval
TimeoutInterval = EstimatedRTT + 4*DevRTT
where DevRTT …
DevRTT = (1-b)DevRTT + b |SampleRTT-EstimatedRTT|
typical value of b = 0.25
TCP Sender events (simplified)
- Data received from application
- create segment with seq# and start timer if not
already - seq# is a byte-stream number of first data byte in
segment
- create segment with seq# and start timer if not
- timeout
- retransmit segment that caused timeout
- restart timer
- ACK received
- ifACK acknowledges previouslt unACKed segments:
– update what is known to be ACKed
=- start timer if there are still unACKed segments
- ifACK acknowledges previouslt unACKed segments:
TCP fast retransmit
if sender receiver 3 ACKs with same data, resend unACKed segment with smallest seq#
TCP flow control
receiver controls sender, so sender won’t overflow receiver’s buffer by transmitting too much too fast
TCP 3 way handshake to open connection
- Client sends SYN asking server to open a connection
- Server receives SYN and send SYNACK saying ok so do you
- Client responds with ACK saying yes, I’ll also open a connection then
Congestion and how it is different from flow control
informally: too many sources sending too much data too fast for network to handle
differs from flow control, with fc it is one sender too fast for one receiver. With congestion, too many senders sending too fast.
Some scenarios of causes of congestion
- simple, one router and infinite buffers
2.
congestion controls, why?
there are multiple flows in the internet, make sure every flow gets its fair share
how TCP achieves congestion controls
making sure the sender increases transmission rate, probing for usual bandwidth until loss occurs
additive increase : increase cwnd(congestion window) by 1 MSS every RTT until loss detected
multiplicative decrease : cut cwnd in half after loss
What cwnd (congestion window) contains ?
set of bytes that have been sent but not yet acknowledged
last byte sent - last byte acked <= cwnd
TCP sending rate : cwnd/RTT bps
TCP slow start
Slow start ( a bit of misnomer):
- initial rate is slow but ramps up exponentially fast
- initially cwnd = 1MSS
- double cwnd every RTT (every ACK received)
TCP detecting and reacting to loss
- loss by timeout
- cwnd set to 1 MSS
- windows then grow exponentially (slow start)
- loss indicated by 3 duplicate ACKs : TCP Reno
- cwnd is cut in half and grow linearly
- TCP Tahoe always sets cwnd to 1 (timeout or 3 duplicate ACKs)