Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A TCP/IP port number is a 16-bit logical number carried in the header of each TCP or UDP packet. It tells the receiving computer which service or process should handle that traffic. A port is a numbering scheme inside the software stack, not a physical socket, connector, or opening on the machine.

What a port number does

Many services can run on one host at the same time: a web server, a mail server, a file-transfer service, and dozens of client connections. The IP address gets packets to the right machine, but it does not say which program on that machine should receive them. The port number fills that gap. It lets the operating system’s network stack hand each incoming segment or datagram to the correct listener or connection.

The IETF’s consolidated TCP specification, RFC 9293 (published August 2022), states 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.” In plain terms, a port is one part of the label that lets an endpoint sort incoming traffic into separate conversations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How a port differs from an IP address

An IP address and a port do different jobs, and a port is never a substitute for an address. RFC 6335 (published August 2011) describes the relationship this way: the source and destination port numbers, together with the IP addresses of the two end systems, uniquely identify a session of a given transport protocol.

Element What it identifies Example
IP address The host or network interface that traffic should reach 192.0.2.10 (documentation address)
Port number The service or connection endpoint on that host, within one transport protocol 443 for a conventional HTTPS listener
Transport protocol The rules for delivery, such as TCP or UDP TCP

The analogy of a building address and a room number is useful up to a point. The address gets you to the building, and the room number tells staff where to deliver the message. Network traffic has no physical rooms, however. A port is simply a number that the endpoints agree to use when matching traffic to a process.

TCP and UDP use separate port contexts

TCP and UDP both use 16-bit port numbers, but they are different transport protocols with different behavior. TCP provides a reliable, in-order byte stream and uses ports to separate application flows. UDP, defined in RFC 768 (dated 28 August 1980), provides datagram delivery with minimal protocol mechanism. Delivery is not guaranteed, and the specification does not provide duplicate protection.

Because of this, the same number in TCP and UDP is not automatically the same assignment. When you discuss a port, name the transport protocol with it, for example “TCP port 53” or “UDP port 53.” A port number alone does not provide reliability, encryption, or access control.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Port number ranges

RFC 6335 divides the 16-bit port namespace into three ranges. The boundaries apply to TCP, UDP, and the other transports that use the same port registry.

Range Common names How it is allocated
0–1023 System Ports, Well Known Ports Assigned through IANA processes
1024–49151 User Ports, Registered Ports Assigned through IANA processes
49152–65535 Dynamic, Private, or Ephemeral Ports Not assigned through the registry’s ordinary process; operating systems and applications use these for temporary local connections

The ephemeral range is the one you see when a client opens an outgoing connection. The operating system picks an unused number from this range for its side of the conversation, so a browser’s source port is usually a high number that changes between sessions.

Why a familiar port number does not prove the service

Common services often use default ports, and RFC 6335 notes that defaults are used where possible. Those defaults are conventions, not guarantees. The meaning of a port is local to the endpoints that agree on it. A web server can listen on a non-standard port, a database can be placed behind a different number, and an unrelated program can be bound to a port that is normally used by something else.

For this reason, a port number is a clue, not proof. Checking what is actually listening requires looking at the machine itself, not only at the number.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Checking an assignment in the IANA registry

The Internet Assigned Numbers Authority (IANA) maintains the Service Name and Transport Protocol Port Number registry. Entries for specific services change over time, so confirm a current assignment there before stating it as fact. The registry records assignments and service names; it does not show which programs are running on a given host.

  • Open the IANA Service Name and Transport Protocol Port Number registry on the IANA website.
  • Search for the service name or the port number.
  • Check the transport column (TCP, UDP, or both) before reading the entry.
  • Treat an entry as the official assignment, and treat a listening service on a host as a separate fact that you verify on that host.

Key facts to remember

  • A port number is a 16-bit logical identifier used by TCP and UDP to route traffic to a service or flow at an endpoint.
  • The IP address reaches the host; the port and transport protocol identify the service or session on it.
  • Ports 0–1023 and 1024–49151 are assignable through IANA processes; 49152–65535 is used for dynamic and ephemeral connections.
  • Default ports are conventions. Any port can be used for any service if the endpoints are configured that way.

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.