Transport Protocols and Congestion ControlIntroduction and ContextTransport protocols provide end-to-end communication between applications running on different hosts. While the network layer delivers packets across an internetwork, the transport layer determines whether application data is delivered reliably, in order, at an acceptable rate, and with appropriate protection against overload. In modern communication networks, transport behavior strongly influences latency, throughput, fairness, energy consumption, and application quality of experience. The classical transport-layer problem was reliable delivery over a best-effort packet network. Contemporary networks make the problem more demanding. Wireless links introduce losses unrelated to congestion; data centers require very low latency; satellite and intercontinental paths have large bandwidth-delay products; mobile devices change networks during a connection; and encrypted protocols reduce the visibility available to middleboxes. Consequently, transport design must distinguish transmission errors from congestion, regulate both sender and receiver behavior, and adapt to heterogeneous network conditions. This chapter examines reliable transport, UDP, TCP and its major variants, QUIC, flow and congestion control, active queue management, fairness, and performance over high-delay and lossy paths. Learning ObjectivesAfter completing this chapter, the reader should be able to: 1. Explain the services and mechanisms of the transport layer. 2. Compare reliable byte-stream, datagram, and encrypted multiplexed transports. 3. Analyze TCP flow control, congestion control, retransmission, and recovery. 4. Distinguish loss-based, delay-based, model-based, and hybrid rate control. 5. Evaluate active queue management and fairness among competing flows. 6. Calculate fundamental performance quantities such as bandwidth-delay product and TCP throughput estimates. 7. Select transport and queue-management strategies for high-delay, lossy, wireless, data-center, and heterogeneous networks. 8. Critically assess emerging transport developments and their governance implications. 1. Transport-Service ModelA transport protocol sits between applications and the Internet Protocol. Its principal responsibilities may include: - Process-to-process delivery: Port numbers identify application endpoints.
- Segmentation and reassembly: Large application messages are divided into transport segments and reconstructed at the destination.
- Multiplexing and demultiplexing: Multiple applications share one host and network interface.
- Reliability: Lost, duplicated, corrupted, or reordered data can be detected and recovered.
- Flow control: The sender is prevented from overwhelming the receiver.
- Congestion control: The sender adapts to the capacity available in the network.
- Connection management: Some protocols establish, maintain, and terminate logical connections.
These functions are not always provided together. TCP supplies a reliable ordered byte stream, whereas UDP supplies a minimal datagram service. QUIC provides reliable streams, congestion control, security, and connection migration over UDP. A fundamental distinction is between flow control and congestion control. Flow control protects the receiving host. Congestion control protects the shared network. A sender must respect both limits. In TCP, the usable sending window is approximately `W = min(cwnd, rwnd)` where `cwnd` is the congestion window, `rwnd` is the receiver-advertised window, and `W` is the effective in-flight-data limit, measured in bytes or segments. This relation assumes a window-based protocol and that both values are expressed in compatible units. 2. Reliable Transport2.1 Reliability mechanismsReliable transport commonly combines sequence numbers, acknowledgements, checksums, timers, and retransmissions. A sequence number identifies the position of data in a stream or the identity of a segment. An acknowledgement indicates data received successfully. A cumulative acknowledgement confirms all bytes up to a specified point. Selective acknowledgements identify additional non-contiguous blocks that have arrived. A checksum detects many transmission errors. It does not prove that a packet was delivered, nor does it correct errors. If a segment is damaged, the receiver normally discards it, causing recovery through retransmission or an error signal. The retransmission timeout (RTO) should be related to the measured round-trip time (RTT), but should not be set equal to a single RTT sample because RTT varies. TCP estimates a smoothed RTT and its variation, then sets an RTO with a safety margin. The general principle is: `RTO = smoothed RTT + safety factor × RTT variation` The precise constants and estimator are protocol-specific. Exponential backoff is used after repeated timeout events to avoid worsening congestion. 2.2 Stop-and-wait and sliding windowsStop-and-wait sends one frame and waits for its acknowledgement. It is simple but inefficient when propagation delay is large. A sliding-window protocol permits several segments to be in flight. Its efficiency depends on the ratio between the window size and the bandwidth-delay product. The bandwidth-delay product (BDP) is `BDP = link rate × round-trip propagation delay` when the rate is in bits per second and delay is in seconds; the result is in bits. It represents the amount of data that can occupy the path while a sender waits for feedback. To fully utilize a path, the effective sending window should generally be at least comparable to the BDP, subject to receiver and protocol limits. Worked Example 1: BDPA path has a capacity of 200 Mbit/s and an RTT of 80 ms. The BDP is `200 × 10^6 × 0.080 = 16 × 10^6 bits` or 2,000,000 bytes, approximately 1.91 MiB. Thus, a window near 2 MB is required merely to keep the pipe full, assuming no other bottleneck and negligible processing constraints. A smaller window causes underutilization even if the physical link is fast. 2.3 Go-Back-N and selective repeatIn Go-Back-N, a loss may cause retransmission of the lost segment and all subsequent unacknowledged segments. Selective repeat retransmits only missing segments, usually identified through selective acknowledgements. Selective repeat is more efficient on long-delay or lossy paths but requires greater receiver buffering and protocol complexity. 3. UDP and Datagram TransportUDP is connectionless and provides multiplexing, checksums, and datagram boundaries, but no inherent reliability, ordering, retransmission, flow control, or congestion control. Its header is small and processing is comparatively lightweight. UDP is appropriate when the application can tolerate loss, requires message boundaries, or implements specialized control itself. Examples include DNS queries, real-time media, interactive games, telemetry, and protocols such as QUIC. UDP does not mean that an application may transmit without restraint. Applications using UDP remain responsible for appropriate congestion behavior; uncontrolled UDP can damage other flows and cause network instability. For real-time audio and video, late data may be useless. Retransmitting every lost packet can increase delay and produce worse quality than concealment, forward error correction, adaptive coding, or selective retransmission. The correct choice depends on the application's deadline and loss tolerance. 4. TCP Architecture and OperationTCP presents a reliable, ordered byte stream. It does not preserve application message boundaries. Applications requiring records must implement framing, for example by including a length field or delimiter. A TCP connection is identified by the four-tuple of source address, source port, destination address, and destination port. The three-way handshake synchronizes sequence numbers and negotiates options. Connection termination uses FIN and acknowledgement exchanges; a reset can abort a connection. 4.1 Flow controlThe receiver advertises available buffer space through the receive window. The sender must not send more unacknowledged data than the advertised space. Flow control prevents buffer overflow, but it cannot detect router-queue overload. A zero receive window may temporarily stop transmission. Window scaling is important on high-BDP paths because a small fixed window limits throughput. Modern implementations also use buffer autotuning, but excessive buffering can increase latency. 4.2 Congestion signalsTCP infers congestion primarily from packet loss, duplicate acknowledgements, and delay behavior. A timeout is generally treated as a stronger signal than several duplicate acknowledgements because it suggests a more severe or persistent problem. The congestion window evolves through phases: - Slow start: The window grows rapidly, approximately doubling each RTT when acknowledgements return, until a threshold or congestion signal is reached.
- Congestion avoidance: The window grows more cautiously, traditionally by approximately one maximum segment size per RTT.
- Fast retransmit: Several duplicate acknowledgements can indicate a missing segment before the timer expires.
- Fast recovery: The sender reduces its sending rate and attempts to continue using the acknowledged portion of the window rather than returning fully to the initial state.
The terms “slow start” and “congestion avoidance” describe algorithms, not necessarily actual low or high speed. Slow start can produce rapid growth on a high-capacity path. 4.3 TCP variantsTCP Reno combines additive increase with multiplicative decrease and fast recovery. Its behavior is often summarized as AIMD: increase cautiously during presumed stability and reduce substantially after congestion. TCP NewReno improves recovery when multiple segments are lost in one window, particularly without selective acknowledgements. TCP SACK allows the receiver to report successfully received non-contiguous blocks. SACK is especially valuable when multiple losses occur in a window. TCP CUBIC uses a cubic congestion-window function based on elapsed time since the last congestion event. It grows efficiently on high-speed paths and is widely deployed in general-purpose operating systems. TCP BBR estimates bottleneck delivery rate and propagation delay rather than treating loss as the only congestion signal. It attempts to operate near an estimated bottleneck bandwidth while limiting queue growth. Its behavior differs from loss-based TCP and raises important questions about inter-protocol fairness. No variant is universally best. Performance depends on RTT, queue policy, competing traffic, wireless losses, acknowledgment behavior, application demand, and implementation details. 5. Congestion-Control Models5.1 Window-based controlWindow-based protocols regulate the amount of unacknowledged data. They are feedback systems: acknowledgements provide evidence about delivery, while losses, delay, or explicit signals indicate possible congestion. A simplified steady-state TCP throughput estimate is often written as `T ≈ C × MSS / (RTT × sqrt(p))` where `T` is average throughput, `MSS` is maximum segment size in bytes, `RTT` is round-trip time, `p` is the segment-loss probability, and `C` is a model-dependent constant. This expression applies only under restrictive assumptions, such as long-lived traffic, congestion losses, a particular loss-recovery regime, and relatively stable RTT. It is not a universal TCP performance law. It shows that throughput decreases with RTT and approximately with the inverse square root of loss probability. Worked Example 2: Throughput estimateAssume `MSS = 1460 bytes`, `RTT = 0.10 s`, `p = 0.01`, and use `C = 1.22` as an illustrative constant for a simplified Reno-style model. `T ≈ 1.22 × 1460 / (0.10 × sqrt(0.01))` Since `sqrt(0.01) = 0.1`, `T ≈ 1781.2 / 0.01 = 178,120 bytes/s` which is approximately 1.42 Mbit/s. This is a model estimate, not a guaranteed rate. If losses are caused by wireless errors rather than congestion, interpreting every loss as a congestion signal can reduce performance unnecessarily. 5.2 Rate-based and model-based controlRate-based protocols explicitly regulate a sending rate rather than only a window. Model-based protocols estimate bottleneck bandwidth, propagation delay, queue occupancy, or delivery rate. Delay-based schemes interpret increasing RTT as evidence of queue growth. Hybrid schemes combine loss, delay, and delivery-rate measurements. Feedback controllers face a fundamental trade-off. Aggressive probing improves utilization but risks queue buildup and loss. Conservative control reduces delay and loss but may underuse capacity. Measurement noise, delayed feedback, reverse-path congestion, and traffic variability complicate controller design. 5.3 Explicit congestion notificationExplicit Congestion Notification (ECN) allows a congested router to mark packets instead of dropping them, provided the endpoints and queues support ECN. The receiver reports marks to the sender, which reduces its sending rate. ECN can reduce loss and retransmission overhead, but deployment requires compatible hosts, routers, configuration, and correct response to marks. 6. Active Queue ManagementA drop-tail queue accepts packets until its buffer is full and then drops subsequent arrivals. It is simple but can create full queues, synchronization among flows, and high delay known as bufferbloat. Active Queue Management (AQM) attempts to signal congestion before a queue is completely full. Important approaches include: - RED: Random Early Detection probabilistically drops or marks packets based on an averaged queue length. It can avoid global synchronization but is sensitive to parameter selection.
- CoDel: Controls queueing delay by measuring the minimum delay over intervals and dropping or marking when persistent delay exceeds a target.
- PIE: Uses a feedback controller to regulate estimated queue delay.
- FQ-CoDel: Combines flow queuing with CoDel, isolating flows sufficiently to improve latency and preventing aggressive flows from dominating a single queue.
- ECN-based AQM: Marks packets rather than discarding them when endpoints support congestion notification.
AQM does not create bandwidth. It changes the timing and form of congestion signals. Its effectiveness depends on correct deployment, traffic patterns, link rate, and implementation quality. 7. Fairness and Performance MetricsTransport performance should not be judged by throughput alone. Relevant metrics include goodput, latency, jitter, loss rate, retransmission overhead, completion time, energy consumption, and fairness. A common fairness measure is Jain's fairness index: `J = (sum xi)^2 / (n × sum xi^2)` where `xi` is the throughput of flow `i`, and `n` is the number of flows. Under the usual nonnegative-throughput assumption, `J` lies between `1/n` and 1. A value of 1 indicates equal throughput; lower values indicate greater inequality. Equal throughput is not always the correct objective: weighted fairness may be appropriate when flows have different service requirements. Fairness depends on the definition of a flow. Two applications may open many parallel connections and obtain more aggregate capacity than an application using one connection. This creates incentives for connection proliferation and complicates policy enforcement. Per-flow queuing can improve isolation but may be exploited by using multiple flow identifiers. 8. High-Delay, Lossy, and Heterogeneous Networks8.1 High-delay pathsSatellite and intercontinental paths have large RTTs. Feedback arrives slowly, so conservative window growth can take many RTTs to reach the available capacity. A high BDP requires large sender and receiver windows. Packet pacing, SACK, accurate timers, and appropriate initial windows are valuable. Short flows are particularly affected because they may finish before reaching their steady state. 8.2 Lossy wireless pathsWireless loss may result from interference, fading, handover, or link-layer retransmission rather than congestion. A transport that treats every loss as proof of congestion may reduce its rate excessively. Cross-layer information, link-layer recovery, forward error correction, multipath operation, and delay or delivery-rate signals can improve performance. However, hiding all wireless loss from the transport layer may also conceal genuine congestion. 8.3 Heterogeneous and mobile networksA mobile device may move between Wi-Fi and cellular networks, changing its address, RTT, capacity, and loss characteristics. Traditional TCP connections can break when the address changes. QUIC supports connection identifiers and can migrate a connection between network paths, subject to validation and security requirements. 9. QUIC and Modern Transport DesignQUIC is a secure transport protocol implemented in user space over UDP. It integrates TLS 1.3 for cryptographic handshake and key establishment, supports multiple independent streams, provides congestion control, and can reduce connection setup latency. TCP's ordered byte stream can cause head-of-line blocking: a missing segment may delay delivery of later data to the application. QUIC streams provide independent ordering, so loss in one stream need not block delivery on another, although all streams still share connection-level congestion control. QUIC also encrypts most transport metadata, improving privacy but reducing the ability of middleboxes to inspect or classify transport behavior. QUIC introduces engineering trade-offs. User-space implementation enables rapid evolution but increases dependence on operating-system scheduling and packet-processing efficiency. Encryption limits passive observation and some forms of traffic management. Connection migration requires careful address validation to prevent amplification and abuse. Fairness with TCP and behavior under extreme loss remain active areas of measurement and research. 10. Illustrative Case Study: A Global Video-Conferencing ServiceBackgroundConsider a fictional international video-conferencing service serving users over fiber, 5G, home Wi-Fi, and satellite access. Users report frozen video during busy periods, excessive delay on satellite links, and rapid quality changes when moving between Wi-Fi and cellular networks. ProblemThe service uses a single reliable transport connection for signaling, audio, video, and file transfer. A lost packet delays all subsequent application data. The sender also interprets wireless losses as congestion and reduces its rate sharply. Home routers use large drop-tail buffers, producing high queueing delay. AnalysisMeasurements show three distinct causes: 1. Persistent queueing at access routers produces delay without immediate loss. 2. Radio interference causes isolated losses unrelated to bottleneck congestion. 3. A single ordered stream permits one missing segment to delay unrelated media data. The service also uses a fixed receive buffer that is too small for high-RTT satellite paths. ApproachThe operator migrates media transport to QUIC-based streams and uses separate streams for audio, video, and control. Audio receives priority because its bandwidth is small but its delay sensitivity is high. The sender applies pacing and a congestion controller suitable for variable-rate paths. It enables SACK-like loss reporting, enlarges receive buffers according to measured BDP, and uses adaptive media coding rather than relying solely on retransmission. Access gateways deploy an AQM with flow queuing and ECN where supported. The application measures one-way delay using synchronized or estimated clocks, but does not treat an isolated wireless loss as conclusive proof of congestion. During network changes, connection migration is used after path validation. OutcomeThe design reduces head-of-line blocking, lowers queueing delay, and maintains intelligible audio during moderate video loss. Satellite users still experience propagation delay, because no transport protocol can remove physical distance, but the system avoids unnecessary underutilization. The case also demonstrates that transport improvements must be combined with application adaptation and queue management. Learning Points- A transport protocol should match application deadlines and delivery semantics.
- Loss, delay, and rate measurements should be interpreted together.
- Receiver buffers must reflect the path's BDP.
- Queue management is an end-to-end quality issue, not merely a router configuration detail.
- Network migration and encryption introduce both capability and governance challenges.
11. Limitations, Governance, and Professional PracticeTransport experiments can be misleading when performed on a single path or with short tests. Results should report RTT, bottleneck capacity, queue policy, competing traffic, packet size, acknowledgment behavior, implementation version, and whether losses are congestion-related. Reproducible evaluation should include controlled emulation and real-world traces. Network operators must consider neutrality, privacy, and security. Traffic classification can support quality of service but may expose sensitive information or discriminate among applications. Encrypted transports improve confidentiality and integrity, yet can complicate lawful troubleshooting, emergency traffic prioritization, and abuse detection. Congestion control should avoid aggressive behavior that harms competing users. Automated rate adaptation should be auditable and should not silently violate service agreements or network policy. AI and machine learning may assist traffic prediction, anomaly detection, and parameter tuning. However, learned controllers can behave unpredictably outside training conditions, create unstable interactions with conventional controllers, or favor measurable throughput at the expense of latency and fairness. Safety limits, fallback controllers, interpretable metrics, and controlled deployment are essential. 12. Best-Practice Design Checklist1. Select TCP, UDP, QUIC, or an application-specific design according to reliability, ordering, security, and latency requirements. 2. Separate flow-control limits from congestion-control limits. 3. Estimate BDP before selecting buffer and window sizes. 4. Use selective acknowledgements and robust timers on long or lossy paths. 5. Pace traffic where burstiness could overload queues. 6. Treat delay, loss, ECN, and delivery rate as complementary signals. 7. Deploy AQM and flow queuing to control bufferbloat and improve isolation. 8. Evaluate fairness across users, applications, and connection counts. 9. Test mobility, asymmetric paths, wireless loss, and competing traffic. 10. Report reproducible measurements and protect user privacy during monitoring. Chapter SummaryTransport protocols convert best-effort packet delivery into useful application communication. Reliable transport depends on sequence numbers, acknowledgements, checksums, timers, and retransmissions, while sliding windows permit efficient operation over paths with significant bandwidth-delay products. UDP offers minimal datagram service and leaves reliability and congestion responsibility to applications. TCP provides an ordered byte stream with receiver flow control and congestion control based on feedback such as loss, acknowledgements, and delay. Reno, NewReno, SACK, CUBIC, and BBR illustrate different approaches to recovery and rate adaptation. Flow control protects receivers; congestion control protects the network. Window-based, rate-based, delay-based, loss-based, and model-based controllers make different assumptions and exhibit different fairness and latency characteristics. AQM methods such as RED, CoDel, PIE, and FQ-CoDel address bufferbloat and queue isolation, while ECN can signal congestion without dropping packets. QUIC modernizes transport through encrypted operation, independent streams, connection migration, and user-space evolution. High-delay, lossy, wireless, and mobile networks require careful interpretation of signals, suitable windows, selective recovery, pacing, and application adaptation. Professional design must evaluate throughput together with latency, jitter, goodput, fairness, energy, privacy, and security. Key TermsTransport layer: End-to-end layer providing process-to-process communication services. Port: Logical identifier used to deliver data to an application process. Reliability: Ability to detect and recover from delivery errors, loss, duplication, or reordering. Sequence number: Identifier indicating data position or segment identity. Acknowledgement: Feedback indicating successfully received data. RTT: Round-trip time between sending data and receiving corresponding feedback. RTO: Retransmission timeout used to trigger recovery when feedback is absent. Flow control: Regulation that prevents a sender from overrunning a receiver. Congestion control: Regulation that limits overload in the shared network. Congestion window: Sender-side limit on data allowed in flight because of network conditions. Receive window: Receiver-advertised limit based on available buffer space. Bandwidth-delay product: Link rate multiplied by round-trip delay. UDP: Connectionless datagram transport with minimal built-in mechanisms. TCP: Reliable, ordered byte-stream transport protocol. QUIC: Encrypted, multiplexed transport protocol implemented over UDP. AQM: Active Queue Management that signals congestion before a queue is completely full. ECN: Explicit Congestion Notification using packet marks instead of, or before, drops. Bufferbloat: Excessive latency caused by persistently large queues. Goodput: Useful application data delivered per unit time, excluding retransmissions. Jain's fairness index: A normalized measure of equality among flow throughputs. Review QuestionsShort Answer Questions1. Distinguish flow control from congestion control. 2. Why is UDP suitable for some real-time applications? 3. What is the purpose of selective acknowledgements? 4. Define bandwidth-delay product. 5. State two advantages of QUIC over a traditional TCP byte stream. Long Answer Questions1. Explain TCP slow start, congestion avoidance, fast retransmit, and fast recovery. 2. Compare Reno, CUBIC, and BBR in terms of congestion signals and rate adaptation. 3. Explain how AQM addresses bufferbloat and compare RED with FQ-CoDel. 4. Discuss transport design challenges in wireless and satellite networks. 5. Describe QUIC architecture, including streams, encryption, congestion control, and migration. Analytical / Application Questions1. A 500 Mbit/s path has an RTT of 120 ms. Calculate its BDP in bits and bytes, and explain the consequence of using a 1 MB sender window. 2. Two flows obtain throughputs of 30 Mbit/s and 10 Mbit/s. Calculate Jain's fairness index and interpret the result. 3. Design a transport strategy for an interactive video-conferencing service operating across Wi-Fi, 5G, and satellite links. Justify choices concerning ordering, retransmission, congestion signals, queue management, and mobility. Multiple Choice Questions with AnswersQuestion 1Which quantity represents the amount of data that can occupy a path during one round trip? A. Maximum segment size B. Bandwidth-delay product C. Receive window only D. Retransmission timeout Correct Answer: B. Bandwidth-delay product Question 2What is the primary purpose of TCP's receive window? A. To protect routers from congestion B. To encrypt application data C. To prevent the sender from overrunning the receiver D. To select the shortest network path Correct Answer: C. To prevent the sender from overrunning the receiver Question 3Which protocol provides a minimal connectionless datagram service? A. TCP B. QUIC C. UDP D. SCTP only Correct Answer: C. UDP Question 4In the simplified TCP throughput model, increasing RTT while other variables remain fixed generally causes throughput to: A. Increase linearly B. Decrease C. Remain exactly unchanged D. Become independent of loss Correct Answer: B. Decrease Question 5What is a key function of SACK? A. It reports non-contiguous blocks received successfully B. It eliminates the need for sequence numbers C. It guarantees zero packet loss D. It replaces congestion control with encryption Correct Answer: A. It reports non-contiguous blocks received successfully Question 6Which mechanism marks packets to signal congestion without necessarily dropping them? A. ECN B. DNS C. NAT D. ARP Correct Answer: A. ECN Question 7Which feature of QUIC can reduce application-level head-of-line blocking? A. Independent streams B. Removal of all congestion control C. Use of only one ordered byte stream D. Disabling encryption Correct Answer: A. Independent streams Question 8For two flows with equal throughput, Jain's fairness index is: A. 0 B. 0.25 C. 0.5 D. 1 Correct Answer: D. 1 Question 9Which queue-management approach combines flow queuing with controlled delay management? A. FQ-CoDel B. Stop-and-wait C. Go-Back-N D. Slow start Correct Answer: A. FQ-CoDel Question 10A 200 Mbit/s link has an RTT of 80 ms. Its BDP is approximately: A. 20 kbits B. 1.6 Mbits C. 16 Mbits D. 160 Mbits Correct Answer: C. 16 Mbits
|