Port address in TCP/IP is ________ bits long.
2013
Port address in TCP/IP is ________ bits long.
- A.
32
- B.
48
- C.
16
- D.
None of the above
Attempted by 6 students.
Show answer & explanation
Correct answer: C
Concept
A port number is the transport-layer address that identifies a specific process or service running on a host. In both the TCP and the UDP segment headers, the Source Port and Destination Port are each stored in a fixed 16-bit field. A field of n bits can encode 2n distinct values, so the size of this field is what fixes how many ports can exist.
Application
The TCP/UDP header reserves a 16-bit field for the port address (one for source, one for destination).
With 16 bits, the number of distinct port values is 216 = 65,536.
These are numbered 0 to 65,535, which is exactly the standard port range used by every operating system.
Cross-check
The well-known fact that valid ports run from 0 to 65,535 is the give-away: 65,535 = 216 − 1, which is only possible if the field holds 16 bits. A 32-bit field would allow over 4 billion ports, and a 48-bit field even more — neither matches the observed 0–65,535 range. Hence the port address is 16 bits long.