In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 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 how to modify the Mac address of the network card in the centos system of the CVM. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.
The CVM adds a line in the file / etc/sysconfig/network-scripts/ifcfg-eth0 similar to the following
MACADDR=00:04:AC:33:1C:3B
: the MAC address is the physical address of the Nic. In fact, the MAC address can also be changed under Linux:
1) closed network card equipment
/ sbin/ifconfig eth0 down
2) modify MAC address
/ sbin/ifconfig eth0 hw ether MAC address
3) restart the network card
/ sbin/ifconfig eth0 up
How to modify the MAC address of network card under Red Hat Linux
OS version: Red Hat Enterprise Linux AS4
Core: Kernel 2.6.9-42
On , there are many ways to modify MAC addresses under linux, most of which seem to have not been verified and can not achieve the purpose of modification.
After detailed testing by Xiao Yun Xiaobian, finally successfully solved this problem.
misunderstanding 1:
# ifconfig eth0 down / disable the eth0 Nic. Take the eth0 Nic as an example.
# ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE / modify the MAC address of the eth0 Nic /
# ifconfig eth0 up / restart the eth0 Nic /
then restarts the host.
conclusion: the MAC address is modified in this way, and when the host system is restarted, the MAC address will be restored automatically.
Misunderstanding 2 of :
# ifconfig eth0 down
# cd / etc/sysconfig/network-scripts
# vi ifcfg-eth0
modifies "HWADDR=xx:xx:xx:xx:xx:xx" in it
# ifconfig eth0 up
# service network start
conclusion: the network cannot be enabled after the MAC address is modified in this way, and the following prompt appears:
"Bringing up interface eth0: Device eth0 has different MAC address than expected,ignoring."
, how to ensure the permanent preservation of the modified MAC address in the linux environment? The correct steps are as follows?
# ifconfig eth0 down
# cd / etc/sysconfig/network-scripts
# vi ifcfg-eth0
changed "HWADDR=xx:xx:xx:xx:xx:xx" to "MACADDR=xx:xx:xx:xx:xx:xx"
# ifconfig eth0 up
# service network start
keywords: there is a difference between HWADDR and MACADDR.
This is how the cloud host centos system shared by the editor modifies the Mac address of the network card. If you happen to have similar doubts, you might as well 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.