| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TCP/IP Application Assignments and Server Port Number Ranges: Well-Known, Registered and Dynamic/Private Ports (Page 1 of 2) The port numbers we discussed in the previous topic provide a method of transport-layer addressing that allows many applications to use TCP and UDP simultaneously. By specifying the appropriate destination port number, an application sending data can be sure that the right process on the destination device will received the message. Unfortunately, there's still a problem we have to work on before this addressing system will work. To explain it, I need to go back to a familiar example: using the World Wide Web. We fire up our Web browser, which is client software that sends requests using the Hypertext Transfer Protocol (HTTP). We need to either know the IP address of the Web site we want to access, or we may have the IP address supplied to us automatically using DNS. Once we have the address, the Web browser can generate an HTTP message and send it to the Web site's IP address. This HTTP message is being sent not just anywhere on that IP address: it is intended for the Web server process on the site we are trying to reach. The problem is: how does the Web browser (client process) know which port number has been assigned to the server process on the Web site? Port numbers can range from 0 to 65,535, which means a lot of choices. And in theory, every Web site could assign a different port number to its Web server process. There are a couple of different ways to resolve this problem. TCP/IP takes what is probably the simplest possible approach: it reserves certain port numbers for particular applications. Each common application has a specific port number that is assigned to it for use by server processes that listen for requests for that application and then respond to them. To avoid chaos, the software that implements a particular server process normally uses the same reserved port number on every IP device, so clients can find it easily. In our example, the reserved port number for HTTP is 80. Every Web browser just knows that Web sites are designed to listen for requests sent to port 80. They will thus use this value in requests, to ensure the IP and TCP software on the Web browser direct these HTTP messages to the Web server software. It is possible for a particular Web server to use a different port number, but in this case, the user of the Web browser must be informed of this number somehow, and must explicitly tell the Web browser to use it instead of the default port number (80).
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |