.
A port number is a way to identify a specific process to which an Internet or other network message is to be forwarded when it arrives at a server. For TCP and UDP, a port number is a 16-bit integer that is put in the header appended to a message unit. Therefore, ports are typically used to map data to a particular process running on a computer.
Imagine IP addresses as the street address of an apartment building, and the port number as the number of a particular apartment within that building. If a letter (a data packet) is sent to the apartment building (IP) without an apartment number (port number) on it, then nobody knows who (which service) it is for. In order for the delivery to work, the sender needs to include an apartment number along with the address to ensure the letter gets to the right address.
In both TCP and UDP, each packet header will specify a source port and a destination port, each of which is a 16-bit unsigned integer (i. e. ranging from 0 to 65535), as well as specifying the source and destination network addresses (IP - numbers) among other things. A process may "bind" to a particular port to send and receive data, meaning that it will listen for incoming packets whose destination port matches that port number, and/or send outgoing packets whose source port is set to that port number. Processes may also bind to multiple ports.
As an example, a server used for sending and receiving email may provide both an SMTP (for sending) and a POP3 (for receiving) service; these will be handled by different server processes, and the port number will be used to determine which data is associated with which process. By convention, the SMTP server will listen on port 25, while POP3 will listen on port 110, although it is possible to use different ports.
Not all network transport layer use network ports; for example, although UDP and TCP use ports, ICMP does not.
The port numbers are divided into three ranges:
The Well Known Ports are those from 0 through 1023. The well-known port numbers are the port numbers that are reserved for assignment by the Internet Corporation for Assigned Names and Numbers (ICANN) for use by the application end points that communicate using the Internet's TCP or UDP.
The Registered Ports are those from 1024 through 49151. Registered port numbers are network ports in the range 1024-49151 (out of a range of 216 = 65536). They can be registered to certain protocols by software companies, similar to the way domain names are registered.
Eg: Port 28960 assigned for the game Call of Duty 2 (PC Version), Port 27010 assigned for Half-Life and its mods, such as Counter-Strike.
The Dynamic and/or Private Ports are those from 49152 through 65535. The dynamic port numbers (a.k.a private port numbers) are the port numbers that are available for use by any application to use in communicating with any other application, using the Internet's TCP or UDP.
List of TCP and UDP port numbers:
Before the arrival of ICANN, the port numbers were administered by the Internet Assigned Numbers Authority (IANA).
Port and Port Numbers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment