In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what are the knowledge points of python port". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. What is a port
The port is just the door of a house, which is the only way in and out of this house.
If a program needs to send and receive network data, it needs such a port.
In a linux system, there can be as many as 65536 ports (2 to the 16th power)!
Since there are so many, the operating system has been numbered for unified management, which is the port number.
two。 Port number
Ports are marked by port numbers, which are only integers, ranging from 0 to 65535
Note: * nix systems with different number of ports are different and can be modified manually.
3. How ports are assigned
Port numbers are not used at will, but are assigned according to certain regulations.
There are several classification standards for ports. We will not explain them in detail here, but will only introduce well-known ports and dynamic ports.
3.1 well-known port (Well Known Ports)
Well-known ports are well-known port numbers, ranging from 0 to 1023
Port 80 assigned to HTTP service port 21 assigned to FTP service
It can be understood that the number used by some commonly used functions is estimated, such as the phone numbers 110,10086 and 10010.
In general, if a program needs to use a well-known port, it needs to have root permission
3.2 dynamic Port (Dynamic Ports)
Dynamic ports range from 1024 to 65535
The reason why it is called a dynamic port is that it generally does not assign a service regularly, but dynamically.
Dynamic allocation means that when a system program or application program needs network communication, it applies to the host for a port, and the host allocates one of the available port numbers for its use.
When the program is closed, the occupied port number is also released
3.3 how do I view the port?
Use "netstat-an" to view port status
Lsof-I [tcp/udp]: 2425
This is the end of the content of "what are the knowledge points of python port". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.