[Computer Network Learning Notes] Port Number

Source: Internet
Author: User

1. What is a port?

If you compare an IP address to a house, the port is the door for entering and exiting the house. The port number is the key to open the door. The real house has only a few doors, but the port of an IP address
Up to 65536! The port is marked by the port number. The port number must be an integer ranging from 0 to 65535.

What is the role of Port 2?

How does a host differentiate different network services? Obviously, you cannot rely only on IP addresses because the relationship between IP addresses and network services is one-to-many. In fact, different services are divided by "ip address + port number. Generally, servers are identified by well-known port numbers.

The number of well-known port numbers is between 1 and 1992 ~ In the range of 255. 256 ~ The port numbers between 1023 are usually occupied by UNIX systems to provide some specific UNIX services-that is, services that are only available in UNIX systems and may not be provided by other operating systems, iana Management 1 ~ All port numbers between 1023.

One difference between the Internet extension service and a specific UNIX service is Telnet and rlogin. Both of them Allow logon to other hosts over the computer network. Telnet adopts the TCP/IP standard with port number 23 and can be implemented on almost all operating systems. Rlogin is only designed for Unix systems (although many non-Unix systems also provide this service), and its famous port number is 513.

The client usually does not care about the port number it uses. You only need to ensure that the port number is unique on the local machine. The client slogan is also known as the temporary port number (that is, it takes a short time ). This is because it usually exists only when the user runs the client program, and the server runs as long as the host is on.

 

3. How to use it?

In the TCP and UDP segment structures, the port addresses are both 16 bits and can have a port number in the range of 0---65535. The 65536 port numbers have the following usage rules:

(1) A port less than 256 is defined as a common port, which is generally identified by a common port number. All services provided by TCP/IP implementation use a port number between 1 and, which is managed by ICANN;

(2) The client only needs to ensure that the port number is unique on the local machine. The client slogan is also called a temporary port number because of its short time;

(3) Most TCP/IP implementations assign a port number between 1024---5000 to the temporary port number. A port number larger than 5000 is reserved for other servers.

 

4. How can I view it?

Port Number a server has a large number of ports in use. How can I view ports? There are two methods: one is to use the built-in commands of the system, and the other is to use third-party port scanning software.

1. Use "netstat" to view port status

In Windows 2000/XP, you can use "netstat" at the command prompt to check the status of the system port. You can list the port number that is being opened by the system and its status.

2. Use third-party port scanning software

There are many third-party port scanning software, although the interface is very different, but the function is similar. Here "fport" (can be? Type_t = 7 or download. "Fport" is used at the command prompt. The running result is similar to "netstat-an", but it can not only list the port numbers and types in use, you can also list which application uses the port.

3. Run the "netstat-n" command to display the address and port information in digital format.

 

 

  

[Computer Network Learning Notes] Port Number

Related Article

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.