Chapter 3.4. Competing TCP and UDP Streams

INTRODUCTION

In all the exercises in the Transport Layer Section, we have been examining the details of TCP and UDP and comparing them to each other. One important aspect of this comparison that we have not yet touched upon is how they each react to contention for network resources. TCP adjusts the sending rate to avoid overwhelming both the receiver and the network. Limiting the sending rate to avoid overwhelming a receiver is called flow control. Limiting the sending rate to avoid overwhelming the network is called congestion control. UDP contains no flow control or congestion control algorithms and will send data into the network as fast as applications produces it.

TCP uses the Receiver's Advertised Window field in the TCP segment header to implement flow control. This field specifies the amount of data that the other end of the connection is willing and able to receive. It is first set during connection establishment and then it is updated with each TCP segment received. For example, if the receiver's advertised window was set to 17520, the sender should transmit no more than 17520 byes of unacknowledged data.

TCP senders maintain another limit called the congestion window. The congestion window typically starts at the maximum segment size (1 MSS) and then increases with each segment that is successfully acknowledged. The real limit on a TCP sender's rate is the minimum of the receiver's advertised window and the congestion window.

At ...

Get Computer Networking: Internet Protocols in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.