TCP Protocol Flashcards
What are the goals of TCP protocol?
- Guaranteed Delivery
- Optimize Network Throughput
- Avoid Congestion
How is guaranteed delivery implemented in TCP protocol?
- Usage of Sequence Numbers in order to uniquely identify packets
- Usage of ACKs and SACKs
- Use of Checksums
- Usage of timers in order to re-transmit dropped packets
How does TCP optimize network throughput?
- Cumulative Acknowledgement
- Selective Acknowledgement
- Fast Recovery
- Fast Retransmission
- Usage of Window Scale Factor
How does TCP avoids congestion?
- Slow start by gradually adapting the congestion window
- Usage of Receive Window allows client to adapt to processing power
What are the parameters of the sliding window?
- Acknowledged Bytes
- Sent but non-acknowledged bytes
- Total size of bytes which can be sent without having an acknowledgement
What is the optimal TCP window size?
For the highest possible throughput, it is important that the transmitter is not forced to stop sending by the sliding window protocol earlier than one round-trip delay time (RTT). The limit on the amount of data that it can send before stopping to wait for an acknowledgment should be larger than the bandwidth-delay product of the communications link. If it is not, the protocol will limit the effective bandwidth of the link.
Comment: This is particulary important for high bandwidth / high latency connections. By using the right value the whole connection can be used before data is processed and acknowledged.
How does the congestion avoidance algorithm work?
The congestion window is increased quadratically until the sshtresh is reached. After that the window is increased linearly.
How does the “Fast Recovery” process work?
Three acknowledgments for a packet initiate a fast recovery process. The congestion window is set to half of the sshtresh allowing a temporary inflation.
What is the MSS (Maximum Segment Size) of TCP?
Total amount of bytes a TCP segment can contain in terms of payload data without packet overhead
How is SRTT (Smoothed Round-Trip Time) calculated?
mu_0 = R_0
sig_0 = 0.5 R_0
mu_i = (1 - a) mu_{i-1} + a R_i
sig_i = (1 - b) sig_{i-1} + b |mu_i - R_i|
SRTT = SRTT + max(G, 4 x RTTVAR)
What is the relationship between TCP Maximum Segment Size and IP datagram size?
TCP segments will be packaged into IP datagrams. As we saw in the section on IP, datagrams have their own size limit issues: the matter of the maximum transmission unit (MTU) of an underlying network. If a TCP segment is too large, it will lead to an IP datagram is too large to be sent without fragmentation. Fragmentation reduces efficiency and increases the chances of part of a TCP segment being lost, resulting in the entire segment needing to be retransmitted.
The solution to these two competing issues was to establish a default MSS for TCP that was as large as possible while avoiding fragmentation for most transmitted segments. This was computed by starting with the minimum MTU for IP networks of 576. All networks are required to be able to handle an IP datagram of this size without fragmenting. From this number, we subtract 20 bytes for the TCP header and 20 for the IP header, leaving 536 bytes. This is the standard MSS for TCP.