08 Transport TCP
08 Transport TCP
• Required Readings
• Chapter 3 of Computer Networking – A Top-Down Approach Featuring the
Internet 7th edition, by J. Kurose et. al
• Sections 3.5, 3.6, 3.7
20 bytes
• TCP segment size
• MSS (max segment size)
• maximum amount of application data to be placed in a
40 bytes
segment
• Each side determines its MSS and informs the other
end during connection setup
MSS
• It is limited by lower link-layer MTU (max
transmission unit) IP datagram encapsulates TCP segment, which in
turn, link-layer frame encapsulates IP datagram
• TCP Checksum
• Same way as UDP, using Internet Checksum
Sure.
Here are my state info:
ISN: 214748366
RecvWin: 49232
MSS: 1460
Connection closed
closed
• Because there may have a large variation of the RTT time; simply measure the
RTT to determine the timeout interval is not good enough; need an adaptive
timeout mechanism
• the remote peer tells the other end how much receive buffer space available at its end
for this connection at the moment
• this is for speed-matching send rate to receiving application’s draining rate
• Space remain in Receive buffer (suppose no out-of-order segment)
• RecvWin = RecvBuffer – [LastByteRcvd–LastByteRead]
• Effects of congestion
• Longer delay as experiencing longer queues in routers
• Packet loss due to buffer overflow at routers
• Rely on retransmission to recover from the loss; however, performance suffers
• resources used by the packet before the loss become waste
RTT
large; not a limiting factor)
• initial transmission rate = 20 kbps
RTT
• CongWin += MSS*MSS/CongWin
• This is the additive increase – linear
• If detection of congestion feedback:
• Triple Duplicate ACKs
• Drop the transmission rate by half
• This is the multiplicative decrease
• Go to the Fast Recovery phase
• Timeout time
• Set ssthresh to FlightSize/2
• Set CongWin to 1 MSS
• Go to Slow Start phase
Computer and Communication Networks 39
Triple Duplicate ACKs
• Detection of congestion by timeout
Host A Host B
• Switch to Slow Start SN1
SN6
• whenever receiver gets a valid but out-of-order segment, it ACK3
ACK3
immediately sends back an ACK telling which expected seq
# it is waiting for Retransmit SN3
ACK7
• TCP does not use NACK
• when there are more than 3 out-of-order segments
arrived, this is likely to be a packet loss signal
• Switch to Fast Recovery with Fast Retransmit
ssthresh
50 • when CongWin >= ssthresh, sender is in
congestion-avoidance phase, window grows
linearly
40
30
• when triple duplicate ACK occurs, ssthresh
set to CongWin/2, CongWin set to ~ ssthresh
20
SN1
• TCP Reno can only retransmit one lost segment per RTT SN3
• Similar to Selective Repeat, TCP uses the SACK option to ACK5 SACK 6-8