Timedora

1 TCP, UDP, and Port Fundamentals

Learn how TCP and UDP carry application data, how ports identify endpoints, and how to interpret common protocol-and-port assignments.

How and deliver data

and are transport-layer protocols that carry data between applications on different devices. They use port numbers to identify the sending and receiving applications.

establishes a connection before exchanging data. It provides a reliable, ordered byte stream: lost data is retransmitted, and received data is acknowledged. Web browsing, email, and remote login commonly use .

sends separate messages called datagrams without first establishing a connection. does not itself guarantee delivery, order, or protection from duplicates. Its lower overhead can suit brief queries, voice or video, and other delay-sensitive traffic; an application can add its own reliability mechanisms if needed.

Neither protocol is universally better. The application's needs determine which is appropriate.

Port numbers and their ranges

A is a 16-bit number ranging from 00 to 6553565535, used with a transport protocol to identify an application endpoint on a device. and maintain separate port-number spaces, so port 5353 and port 5353 are distinct endpoints. A identifies a service convention, but it does not guarantee which program is actually using that port.

IANA divides port numbers into three ranges:

  • System (well-known): 00–10231023, for common, standardized services.

  • User (registered): 10241024–4915149151, for registered application services.

  • Dynamic/private: 4915249152–6553565535, often used for temporary client ports.

Client-server communication

In the usual client-server pattern, the client initiates communication to a server's IP address and service port. The server listens for requests, while the client uses a temporary port so the reply can be directed back to the correct application.

For example, a client might connect from 192.0.2.10:53000 to a web server at 203.0.113.20:443 using . The server's reply travels back to the client's address and port. Together, the source and destination addresses, source and destination ports, and transport protocol distinguish a .

With , the endpoints establish a connection before exchanging application data. With , the client sends a to the server; no -style connection handshake is required.

Common services and ports

These common or standard assignments can help identify likely services:

  • SSH: port 2222, commonly used for secure remote login and command execution.

  • DNS: port 5353 and port 5353, for domain-name lookups; DNS supports both transports.

  • HTTP: port 8080, for unencrypted web traffic by default.

  • HTTPS: port 443443; HTTP/3 uses over , commonly on port 443443, for encrypted web traffic.

  • DHCP: port 6767 for the server and port 6868 for the client, for automatic address and network-configuration assignment.

  • NTP: port 123123, for network time synchronization.

These assignments are not proof of the traffic's actual contents. Services may use other ports, and traffic on a familiar port may not be the expected service. HTTPS is not synonymous with because HTTP/3 uses over .

Interpreting protocol-and-port pairs

Interpret a service as a transport protocol plus a , and use the assignment as a clue about the application.

  1. Identify the transport. or changes how the traffic is delivered.

  2. Read the port. port 2222 commonly indicates SSH; port 123123 commonly indicates NTP.

  3. Check the context. A is often more informative about the intended server service than a temporary client .

  4. Treat the result as a clue, not a certainty. Ports can be reassigned locally, services can use nonstandard ports, and registered port numbers do not authenticate traffic.

For example, a packet addressed to destination port 5353 is likely DNS traffic. A packet addressed to destination port 5353 may also be DNS; the alone does not reveal which query or response is being carried.