Virtual port number in socket port

Source: Internet
Author: User

Port number

Protocol Port number:

The full name of the port number is the protocol port number, it is used for the application layer and transfer into the interaction, when creating a socket need to know the IP address and port number, here the port number is virtual, Transport layer protocol We know that the port number is a 16-bit integer, then represents 0 to 65535 so many port numbers, What is the use of him?

If the IP is to determine the network is the only one host, then the IP port number is the only one in the network to determine the only one of the process, note that the port number refers to the local meaning, he only in order to mark the application layer of the various processes and transport layer interaction in the layer of the indirect port, There is no correlation between the port numbers of different computers in the Internet.


The majority of the known port numbers are preserved in the Etc/services file.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/80/E8/wKiom1dEPUyRoMcpAAHdeQcVDG0707.png "title=" Untitled. png "Width=" "height=" 390 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:390px; "alt=" Wkiom1depuyromcpaahdeqcvdg0707.png "/>

Classification of protocol port numbers:

1> The port number used by the server side: Here is divided into two categories, the most important class is known as the port number or the system port number, the value is 0~1023, these values can be found in the URL www.iana.org. The IANA assigns these port numbers to some of the most important applications in TCP/IP, which are known to all users. When a new application appears, the IANA must assign him a well-known port, or else the application process on the Internet will not be able to communicate with him. Another class is called the registration port number , which is used for applications that do not have a well-known port number, and the use of such port numbers must be in the IANA to prevent duplication in accordance with the prescribed level of formality.


2> The port number used by the client: The value is 49152~65535, because this type of port number is dynamically selected when the client process is running, so called the ephemeral port number is left to the client process to choose to use temporarily. When the server process receives a message from the client process, it knows the port number used by the client process, so it can send the data in the past and the port number used after the end of the communication ceases to exist.



This article is from the "Traces" blog, be sure to keep this source http://wpfbcr.blog.51cto.com/10696766/1782656

Virtual port number in socket port

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.