Friday, January 28, 2011

Ports

The ports referred to here are not physical cable receptacles, such as the console port on a router. A port, in a discussion of TCP segments, is a number in the TCP header that is used to identify the ends of logical connections that carry long-term conversations. These port numbers are used as source and destination addresses in the TCP segment.
 
Port numbers are divided into three ranges:
• Numbers from 0 through 1023 are the Well Known Ports.
• Numbers from 1024 through 49151 are the Registered Ports.
• Numbers from 49152 through 65535 are the Dynamic and/or Private Ports. 

The Well Known Ports are assigned by the Internet Assigned Numbers Authority (IANA). For example, any conversation bound for the File Transfer Protocol (FTP) application uses the well-known port 21. Conversations that do not involve an application with a well-known port number are assigned port numbers randomly chosen from the Dynamic and/or Private Ports.