A number assigned to user sessions and server applications in an IP network. Port numbers, which are standardized by the Internet Assigned Numbers Authority (IANA), reside in the header area of the packet being transmitted and thus identify the purpose of the packet (Web, email, voice call, video call, etc.).
Destination Ports Are Server Applications
Destination ports may be "well-known ports" (0-1023) for the major Internet applications, such as Web and email. For example, all port 80 packets (HTTP packets) are directed to and processed by a Web server. User "registered ports" (1024-49151) are assigned to applications that are mostly vendor specific, such as Skype and BitTorrent. See
well-known port,
port forwarding and
opening a port.
Source Ports Are the User Sessions
The source port is a next-available number assigned by TCP/IP to the user's machine. This assigned client number is how the network address translation (NAT), which typically resides in the router, determines which user to send back the responses to. Although that same client number is used simultaneously within thousands of organizations, each TCP/IP network keeps track (via NAT) of its own assigned numbers for internal use only. A "socket" is the combination of port number and IP address (see
TCP/IP socket). See
NAT.
Reverse Numbers for the Trip Back
In the response from the server, the port numbers and IP addresses are reversed. The packet's destination port becomes the unique source port number assigned to that user's TCP/IP session.
We're Listening
TCP/IP servers are said to be "listening" for their port numbers to know when to accept incoming packets. If a human action had to be chosen for this, "looking" would have been more accurate. People "listen to sounds" but "look" for data; however, computerese has never been known for clarity. See
TCP/IP and
NAT.
Retrieving a Web Page
To request a Web page from the Internet, port 80 must be open in the network firewall to let the request go out. When sending back the Web page, the port numbers are reversed, and the user's network accepts the external packets because the request was initiated by a user. The IP is the numeric address of the source or destination network (see
dot address).