Computer Networking Ports and Sockets
By Stephen Bucaro
A specific computer connected to the Internet is identified by it's unique IP address, however a
computer may have several different Internet applications running simultaneously, so how does the
computer know which application to send the data to? By it's "port" number. Applications running
on a computer communicate through ports.
Data transmitted over the Internet carries a 32-bit IP address that identifies its destination
computer and a 16-bit number that identifies a port on that computer. The combination of the IP
address and the port number is called a "socket". A pair of sockets, one on the sending computer
and one on the receiving computer uniquely identifies a specific connection on the Internet.
For example, the standard port number for Telnet is 23. You can access Telnet on a host whose IP
address is 18.104.22.168 with the socket address 22.214.171.124:23. Port numbers range from 0 to
65535. The IANA (Internet Assigned Numbers Authority) has divided port numbers into three groups,
Well Known, Registered, and Dynamic (or "Private") Ports.
Ports in the range from 0 to 1023 are called Well Known ports and are reserved by the IANA
for use by common TCP/IP applications like HTTP, FTP, and Telnet. Some common well known port numbers
are listed below.
|Port ||Process ||Description|
|20||FTP||File Transfer Protocol - Data|
|21||FTP||File Transfer Protocol - Control|
|23||Telnet||Terminal Emulation Protocol|
|25||SMTP||Simple Mail Transfer Protocol|
|53||DNS||Domain Name System|
|69||TFTP||Trivial File Transfer Protocol|
|80||HTTP||Hypertext Transfer Protocol|
|110||POP3||Post Office Protocol|
|443||HTTPS||Hypertext Transfer Protocol - Secure|
Registered ports have numbers in the range from 1024 to 49151. The Registered ports are
NOT reserved by the IANA and on most systems can be assigned to processes by system administrators
Dynamic (or Private) ports have numbers in the range from 49152 to 65535. Dynamic port
numbers are assigned randomly by the computers operating system, so if a system administrator
or programmer chooses to use a port in this range, there is a risk of a port conflict.
System administrators can change the port number associated with common internet services
like FTP, and Telnet, and sometimes they reconfigure a processes default port number for security
reasons. A hacker probing their network will find they cannot connect through the conventional ports.
More Networking Protocols and Standards:
• The OSI Data Link Layer
• IP Addressing
• Kerberos Authentication Protocol
• Free eBook: IPv6 Addressing
• DSL (Digital Subscriber Line)
• The OSI Session Layer
• IEEE 802 Standards Specify the Basics of Physical and Logical Networking
• OSI Transport Layer
• Looking at the OSI 7 Layer Reference Model
• IPv4 Datagram Fields