In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about the method of modifying the IP and mac addresses of the public network. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Recently, I need to use php to write a simulation program, the program needs to constantly change the public network IP address, and modify the local mac address.
After a period of research, I found a solution.
one. Public network address
The so-called public network address is relative to the intranet address. The intranet addresses are mainly in the following three formats: 192.168.x.xMague 10.x.x.xrex 172.16.x.x. In the case of home wireless routing, for example, the IP addresses you see through ipconfig are all intranet addresses. You can view the public network by visiting ip138.com.
How to modify the IP address of public network
I use the easiest way to change my IP address.
1. I first applied for an adsl dial-up broadband. 120 yuan per month
two。 Modify the IP address by redialing
The related code is as follows:
This procedure realizes automatic dialing by calling external rasdial.
two. Mac address
Mac address, Nic address. A mac address is used to identify the only computer. In other words, a computer has only one mac address.
This is also the method that many programs use to identify independent users. However, the mac address is divided into the physical mac and the mac address of the driver layer.
The mac address of the driver layer can be modified. The mac is the same as the mac address of the physical network card before it is modified.
The program reading mac can not directly obtain the physical mac, but the mac of the driver layer. So we can achieve our goal by changing the driver layer mac.
How to modify a mac address
You can modify the mac address by changing the registry, or you can download the existing mac address modifier
1. Download the tmac program. Download address is http://www.technitium.com/tmac/index.html
two。 Use tmac-n local-s-r-re-to generate a mac address immediately. Local is the local connection name.
The related code is as follows:
three. PHP long-time operation mode
The php program ends automatically after running for a period of time. In order to keep php running, you can modify the parameter max_execute_time. Php.ini.
Modify max_execution_time = 0
The above is the method of modifying the public network IP and mac addresses shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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.