Introduction to one of the Network Ports

Source: Internet
Author: User

The TCP and UDP protocols of the TCP/IP transport layer are two completely independent software modules, so their respective port numbers are also independent of each other. For example, if TCP has a port 255 and UDP can have a port 255, the two do not conflict.
There are two basic methods to allocate port numbers:
The first type is global allocation. This is a centralized allocation method. A central organization with a recognized authority will uniformly distribute the results according to user needs and publish them to the public;
The second type is local allocation, also known as dynamic connection. When a process needs to access the transport layer service, it submits an application to the local operating system. The operating system returns the local unique port number, then, the process connects itself to the port through a suitable system call (binding ).
The TCP/IP Port Number is allocated in the preceding two methods. The port number is divided into two parts. A small number of reserved ports are allocated to the service process globally. Each standard server has a globally recognized port called a secure port, which is the same even on different machines. The remaining ports are free ports and allocated locally.
TCP and UDP stipulate that a port less than 256 can be used as a reserved port.
By port number can be divided into three categories:
(1) Well Known Ports: from 0 to 1023, they are closely bound to some services. Usually the communication between these ports clearly indicates a service protocol. For example, port 80 is always HTTP Communication.
(2) Registration port (Registered Ports): from 1024 to 49151. They are loosely bound to some services. That is to say, many services are bound to these ports, which are also used for many other purposes. For example, many systems process dynamic ports starting from around 1024.
(3) Dynamic and/or Private Ports: From 49152 to 65535. Theoretically, these ports should not be allocated to the service. In fact, machines usually allocate dynamic ports from 1024. But there are also exceptions: SUN's RPC port starts from 32768.
The system administrator can "Redirect" Port:
A common technique is to redirect a port to another address. For example, the default HTTP port is 80, and many people redirect it to another port, such as 8080. If so, use this address to access this article.
Http://wwd.3322.net: 8080/net/port.htm (of course, this is just a theoretical example ).
Redirection is implemented to hide the accepted default port and reduce the destruction rate. In this way, if someone wants to attack a recognized default port, port scanning must be performed first. Most port redirection is similar to the original port. For example, most HTTP ports change from 80 to 8000,808, and. Similarly, the port of POP is originally 110 and is often redirected to 1100. There are also many situations in which we select numbers with special significance in statistics, such as 1234,23456 and 34567. Many people choose odd numbers for other reasons, such as, and.
Recently, more and more Remote Access Trojans (RATs) use the same default port. For example, the default port of NetBus is 12345.
Blake R. Swopes pointed out that there is another reason to use the redirection port. On UNIX systems, if you want to listen to ports lower than 1024, you need to have the root permission. If you do not have the root permission and want to open the web service, you need to install it on a higher port. In addition, some ISP firewalls will block low-port communication, so that even if you have the entire machine, you still have to redirect the 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.