The port fields are two separate 16-bit fields in the TCP header, one for source and another for
destination ports. The valid range of values is between 1 and 65535; the use of port 0 is typically a
“signature” of some sort.
When a source host wishes to connect to a destination host, an ephemeral port is typically selected in
the range of ports greater than 1023. For each new sending connection that the host attempts that is
not a retry, a different ephemeral port should be selected.