In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Add network card in CentOS can not identify how to solve, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
1. When ifconfig is executed after the newly added network card is added, the system does not recognize
The code is as follows:
# ifconfig
two。 Get the real mac of the newly added Nic
The code is as follows:
# ip addr
3. Copy eth0 to eth2 and modify the configuration file
The code is as follows:
# cd / etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-eth2
# vim ifcfg-eth2
The contents to be modified are:
HWADD is obtained through ip addr
UUID. I didn't find UUID. I can comment it out.
NAME is changed to the name of the current network card eth2
DEVICE is changed to the name of the current network card eth2
IPADDR,GATEWAY et al.
Save exit
4. Restart the network card and you can see that it has been obtained.
The code is as follows:
# systemctl restart network
# ifconfig
Change the name of the network card in PS:centos7 to eth0
Because I often switch between centos6 and centos7 systems, I feel that the network card name of centos7 is too long and inconvenient, so I want to make it the same as 6.
If you want to change the name of the network card to the same eth0,eth2 as 6, do the following
1.
The code is as follows:
# cd / etc/sysconfig
two。 Add the following sentence to the longest line
The code is as follows:
# vim grub
Net.ifnames=0 biosdevname=0
3.
The code is as follows:
# grub2-mkconfig-o / boot/grub2/grub.cfg
4. Rename the original network card name
The code is as follows:
# cd / etc/sysconfig/network-scripts
# mv ifcfg-enoXXXXXXXX ifcfg-eth0
5. Change the name of NAME,DEVICE in ifcfg-eth0 to eth0.
The code is as follows:
NAME=eth0
DEVICE=eth0
6.reboot and check to find that it has become the eth0 we want
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.