Both TCP and UDP establish a communication connection over the Internet, reassemble the data packets after transmission, and then forward them to the addressed programs of the recipient. To enable this transfer, the operating system must create entries and open them during transmission. Each entry has a specific indicator. After transmission, the receiving system uses the port number to determine the location of data delivery. Each data packet always contains two port numbers, that of the sender and that of the recipient.
The ports are numbered consecutively, from 0 to 65,536. Some of these identifiers are standardized and assigned to specific applications. These standard ports are also referred to by the term "well-known ports", because the identifiers are known to all and, above all, are fixed. There are also �registered ports�. These are ports related to an application defined by an organization or developer. The Internet Assigned Numbers Authority (IANA) supports their registration. There is also a wide range of dynamically assigned port numbers. A browser can then, for example, use this type of port for the duration of the consultation of a website. Once free, the number can then be reassigned.
Among the more than 65,000 existing ports, certain identifiers are very important for communication via the Internet. Below is a list of the most important well-known and registered ports. Some ports can only be used for one of these two protocols (TCP or UDP). Others have not been officially booked for a defined service, but have established themselves informally. Some ports allow double occupancy.