In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "how to modify the MAC address under linux". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to modify the MAC address under linux" can help you solve your doubts.
In linux, modify the mac address
# ifdown eth0
# ifconfig eth0 hw ether 12:34:56:78:90:12
(the modified mac address is different from the original address)
# ifup eth0 (modified successfully)
After that, use # ifconfig to see that the mac address has changed, but when you enter the # service network restart or ifdowneth0 command, the following error message will appear:
Device eth0 has mac address 12:34:56:78:90:12, instead ofconfigured address 00:0c:29:ca:b5:7d. Ignoring.
Therefore, it is impossible to change the ip address and other related information by modifying the / etc/sysconfig/network-scripts/ifcfg-eth0 file at this time, because servicenetwork restart cannot make it effective, but you can temporarily change its ip address with ifconfig eth0 and return to the prototype after reboot.
Solve it now.
"device eth0 has mac address 12, instead ofconfigured address 00:0c:29:ca:b5:7d, 34, 56, 78, 90, 12, ignoring." Question:
The reason for this problem is the configuration file: the macaddr=00:0c:29:ca:b5:7d address in / etc/sysconfig/network-scripts/ifcfg-eth0 is different from the macaddr=00:0c:29:ca:b5:7d address in 1214. If you can change the macaddr=00:0c:29:ca:b5:7d to 12, 34, 56, 78, 78, and 90, the error will be eliminated. You can use # servicenetwork restart, but after rebooting, the mac address returns to the prototype. The solution is as follows:
Add these three sentences to / etc/rc.d/rc.local
Ifconfig eth0 down
Ifconfig eth0 hwether 12:34:56:78:90:12
Ifconfig eth0 up
At the same time, the macaddr=00:0c:29:ca:b5:7d address in / etc/sysconfig/network-scripts/ifcfg-eth0 will also be changed to 12-14-34-56-56-78-90-12.
In this way, after re-reboot, there is no fear of mac recovery, and # service networkrestart will not have the wrong words.
After reading this, the article "how to modify MAC address under linux" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, 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.