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. All network-connected devices come equipped with standardized ports that have an assigned number. The reason why they are reserved is for certain protocols and their associated function. Hypertext Protocol (HTTP) messages, for example, always got to port 80 one of the most commonly used ports.
Advanced Research Projects Agency Network, is an informal cooperation of system administrators and software authors, developers of which proposed the concept of port numbers. Previously port numbers were known as socket numbers, the early incarnation of port numbers is similar to the Internet Protocol (IP) address class used today.
Differences between an IP address and a port number
The work of an IP address is to identify a machine in an IP network and is used to determine the destination of a data packet. Port numbers identify a particular application or service on a system.
An IP address is a logical address used to identify a device on the network. Any device connected to the internet is assigned a unique IP address for identification. This identifying information enables devices to communicate over the internet.
Port numbers are an essential part of addressing information that helps identify senders and receivers of information and a particular application on the devices. Port numbers consist of 16-bit numbers.
For example, a user request a file transfer from a client, or local host, to a remote server on the internet and uses File Transfer Protocol (FTP) for the transaction. In order to transfer files via FTP, both devices must be configured. The Transmission Control Protocol (TCP) software layer in the local host identifies the port number 21, which, by convention, associates with an FTP request - in the 16-bit port number integer that is appended to the request.
At the server, the TCP layer will read port number 21 and forward the request to the FTP program at the server.
What are the different types of port numbers and their uses?
There are 65,535 port numbers, but not all are used every day. Restricted port numbers or well-known port numbers are reserved by prominent companies and range from 0 to 1023. Apple Quick Time, Structured Query Language services, and Gopher services use some of these restricted ports.
Those who want to register a specific port number can choose from 1024 to 49151. Software to companies typically registers these port numbers. Dynamic or private ports ranging from 49152 to 65536 are available for anyone to use. In another scenario, port numbers are assigned temporarily for the duration of the request and its completion- from a range of assigned port numbers. This is called a temporary port number.
Let's see some commonly used ports and their associated networking protocols:
The Internet Assigned Numbers Authority allocates and maintains all the port numbers listed above.
Common questions raised about port numbers
What is the port number for localhost?
Localhost is the default name used to establish a connection with a computer. The IP address is usually 127.0.0.1. This is done by using a loopback address network. Port 80 is the common standard port for HTTP.
What is port number 8080 used for?
Port number 8080 is usually used for web servers. When a port number is added to the end of the domain name, it drives traffic to the web server. However, users can not reserve port 8080 for secondary web servers.
What is port number 3360 used for?
TCP/IP networks use port 3360. The connection-oriented protocol TCP demands handshaking to set up end-to-end communications. Upon establishing the connection, user data is transferred bidirectionally over the connection.
What is my IP address and port number?
What is a proxy server address and port number?
A proxy server is, essentially, a computer on the internet with its own IP address. It sits between the client device and the remote server and acts as an intermediary to handle communication requests over the internet.
When a local computer sends a web request, it automatically goes through the proxy server. The proxy server uses its own IP address for the web request and not the user's. Proxy servers offer privacy benefits -- for example, the ability to change the client IP address, masking the user's location. The proxy server address includes an IP address with the port number attached to the end of the address. The port number 8080 is usually used for web servers, proxy and caching.