previous |
start |
next
TCP Connections
An application process requests TCP to establish, or open, a
(reliable) connection to a server process running on a specified
edge-system, and awaiting connections at a known port number. After
allocating an unused client-side port number[5], TCP initiates an exchange of connection
establishment "control segments":

- This exchange of segments is called a 3-way
handshake (for obvious reasons), and is necessary because
any one of the three segments can be lost, etc. The
ACK
and SYN
segment names
refer to "control bits" in the TCP header: for example, if the
ACK
bit is set, then this is an
ACK
segment.
- Each TCP chooses an random initial sequence
number (the
x
and
y
in this example). This is crucial to the
protocol's operation if there's a small chance that "old" segments
(from a closed connection) might be interpreted as valid within the
current connection.
- A connection is closed by another 3-way
handshake of control segments. It's possible for a connection to be
half open if one end requests close, and the other
doesn't respond with an appropriate segment.
[5] Port numbers
below 1024 are reserved for "well-known" services, so the client
port number is always numerically greater than this. NB: this is
the "source" port in segments sent from the client process to the
server process, and the dest port in segments travelling in the
opposite direction.
previous |
start |
next