A TCP/IP port number is a 16-bit logical identifier in a transport-layer header. Endpoints use it to decide which service or process should receive a given stream of traffic, so that many conversations can share one host and one IP address without getting mixed up.
How a port number works
Each TCP or UDP segment or datagram carries a source port and a destination port. Together with the IP addresses of the two endpoints and the transport protocol, these values identify a particular flow. RFC 6335 puts it this way: “Ports are 16-bit numbers, and the combination of source and destination port numbers together with the IP addresses of the communicating end systems uniquely identifies a session of a given transport protocol.” RFC 9293, the current consolidated TCP specification published in August 2022, adds that TCP uses port numbers “to identify application services and to multiplex distinct flows between hosts.” Its glossary defines a port as “the portion of a connection identifier used for demultiplexing connections at an endpoint.”
As an Amazon Associate I earn from qualifying purchases.
In practical terms, the IP address gets a packet to the right machine, and the port tells that machine which listening service or open connection should handle it. A port is not a physical socket, connector, or cable. It is a number held in software-visible headers, and the operating system maps it to a process.
Port versus IP address
People often confuse the two because both appear in connection settings. They answer different questions.
#1 Best Overall
- Used Book in Good Condition
| Attribute | IP address | Port number |
|---|---|---|
| Question it answers | Which host or network interface is the traffic for? | Which service or flow on that host should receive it? |
| Layer | Internet layer (IP) | Transport layer (TCP or UDP) |
| Size | 32 bits for IPv4, 128 bits for IPv6 | 16 bits (values 0 to 65535) |
| Meaningful on its own? | Yes, for reaching a host | No; it needs an IP address and a protocol |
A useful analogy is a building address and a room number. The building address gets mail to the right place, and the room number directs it to the right occupant. The analogy breaks down quickly, though: a port is not a separate physical path, and what a host does with a port depends on its own configuration.
TCP and UDP use the same number space but different rules
TCP and UDP each have their own 16-bit port namespace, so the same number can exist in both without being the same assignment. Port 53 in UDP and port 53 in TCP are separate registrations, for example. Always name the protocol when discussing a port.
Rank #2
- TCP provides a reliable, in-order byte stream. Connections are set up and tracked, and the port pair helps separate one connection from another.
- UDP, defined in RFC 768 (dated 28 August 1980), provides datagram delivery with minimal mechanism. The specification does not guarantee delivery or protect against duplicates, so the port number does nothing to make delivery reliable.
Neither transport’s port number provides encryption, authentication, or a security boundary on its own. Firewall rules and access controls may use ports, but the port value itself is only an addressing label.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Port ranges
RFC 6335, the IANA port-number procedure published in August 2011, divides the 16-bit space into three ranges:
Rank #3
| Range | Name(s) | How values are handled |
|---|---|---|
| 0 to 1023 | System Ports, also called Well Known Ports | Assigned through IANA processes |
| 1024 to 49151 | User Ports, also called Registered Ports | Assigned through IANA processes |
| 49152 to 65535 | Dynamic, Private, or Ephemeral Ports | Not assigned through the ordinary registry process; available for local use |
Operating systems and applications commonly pick ephemeral values for the source side of outgoing connections. A number in the dynamic range therefore says nothing about a registered service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Why a familiar port does not prove the service
Many services have conventional default ports, and those conventions are useful. RFC 6335 notes that defaults are common where possible. But a convention is not a guarantee. Port meaning is ultimately local to the endpoints: a web server can listen on a non-standard port, and a host can run a different program on a port that is usually associated with something else. Seeing port 443 open suggests HTTPS is likely, but only a check of the actual service confirms it.
Rank #4
The IANA Service Name and Transport Protocol Port Number Registry records assignments and service names. Check the live registry before stating that a specific assignment is current, because individual entries change over time, while the range framework and the core definitions are stable.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick Recap
Checks you can run
- Confirm the transport protocol (TCP or UDP) before interpreting any port number.
- Look up the number in the IANA registry for the protocol in question, and treat a match as a convention rather than proof.
- Verify what is actually listening on the host with an operating-system tool such as
ss -tlnpon Linux ornetstat -anoon Windows, rather than relying on the expected service name. - Remember that a port being open or closed is a fact about the host’s current state, not a property of the number.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

