Sunday 30 March 2014

A Detail Explanation of PORT NUMBERS..



Port number

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 the Transmission Control Protocol and the User Datagram Protocol, a port number is a 16-bit integer that is put in the header appended to a message unit. This port number is passed logically between client and server transport layers and physically between the transport layer and the Internet Protocol layer and forwarded on.
For example, a request from a client (perhaps on behalf of you at your PC) to a server on the Internet may request a file be served from that host's File Transfer Protocol (FTP) server or process. In order to pass your request to the FTP process in the remote server, the Transmission Control Protocol (TCP) software layer in your computer identifies the port number of 21 (which by convention is associated with an FTP request) in the 16-bit port number integer that is appended to your request. At the server, the TCP layer will read the port number of 21 and forward your request to the FTP program at the server.
Some services or processes have conventionally assigned permanent port numbers. These are known as well-known port numbers. In other cases, a port number is assigned temporarily (for the duration of the request and its completion) from a range of assigned port numbers. This is called an ephemeral port number.
 Port numbers are assigned in various ways, based on three ranges:
 System Ports / Well-Known Ports (0-1023)
 User Ports / Registered Ports (1024-49151) and
 Dynamic Ports / Private  Ports (49152-65535)

Well-known port number

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 Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Each kind of application has a designated (and thus "well-known") port number. For example, a remote job entry application has the port number of 5; the Hypertext Transfer Protocol (HTTP) application has the port number of 80; and the Post Office Protocol Version 3 (POP3) application, commonly used for e-mail delivery, has the port number of 110. When one application communicates with another application at another host computer on the Internet, it specifies that application in each data transmission by using its port number.
The well-known ports cover the range of possible port numbers from 0 through 1023. The registered ports are numbered from 1024 through 49151. The remaining ports, referred to as dynamic ports or private ports, are numbered from 49152 through 65535.
On most systems, a well-known port number can only be used by a system (root) process or by a program run by a privileged user.

Registered port numbers

The registered port numbers are the port numbers that companies and other users register with the Internet Corporation for Assigned Names and Numbers (ICANN) for use by the applications that communicate using the Internet's Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). In most cases, these applications run as ordinary programs that can be started by non privileged users. The registered port numbers are in the range from 1024 through 49151. They follow in sequence the well-known port numbers, which are, in most cases, applications that can only be started by privileged users, such as the Hypertext Transfer Protocol (HTTP) and Post Office Protocol Version 3 (POP3) applications. When one application communicates with another application at another host computer on the Internet, it specifies that application in each data transmission by using its port number.
Examples of applications with registered port numbers include Sun's NEO Object Request Broker (port numbers 1047 and 1048) and Shockwave (port number 1626). Besides the well-known port numbers and the registered port numbers, the remaining ports in the port number spectrum are referred to as dynamic ports or private ports and are numbered from 49152 through 65535.
Dynamic port numbers or Private port numbers

The dynamic port numbers (also known as the 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 Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). When one application communicates with another application at another host computer on the Internet, it specifies that application in each data transmission by using its port number. The port numbers range from 0 through 65535. However, certain port numbers - the well-known port numbers and the registered port numbers - are registered and administered by the Internet Corporation for Assigned Names and Numbers (ICANN) for use by certain classes of applications. The dynamic port numbers are in the highest range, from 49152 through 65535.

No comments:

Post a Comment