Transport Layer port number
Transport Layer protocols leverage what is known as a port number in order to associate the particular communication with a specific application on a device. Port numbers compose part of a socket which is used to allow applications on particular hosts to communicate with each other. Port numbers are used by the following Transport Layer protocols:
- Transmission Control Protocol (TCP)
- User Datagram Protocol (UDP)
- Stream Control Transmission Protocol (SCTP)
- Datagram Congestion Control Protocol (DCCP)
There are other Transport Layer protocols in use, but these don't leverage port numbers.
The range of port numbers used by these protocols is divided into three categories:
- Well-known Ports (0 to 1023): These port numbers are used by system processes or services that provide widely used types of network services, like HTTP (port 80), HTTPS (port 443), FTP (port 21), etc.
- Registered Ports (1024 to 49151): These ports are assigned by IANA for specific services, and applications can use these ports with IANA's registration to avoid conflicts.
- Dynamic or Private or Ephemeral Ports (49152 to 65535): These are ports that can be freely used dynamically since they cannot be registered with IANA. This range is used for private or customized services for temporary purposes. This is the range typically used by NAT as well as for automatic allocation.