In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to name network devices under CentOS7". In the operation of actual cases, many people will encounter such a dilemma, so 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!
In CentOS 5, we were used to naming network devices like eth0, and under CentOS 6, we found that network devices became names like em1. At that time, when we installed, we added biosdevname=0 to the startup parameter, and we could continue to use the name eth0.
When it comes to CentOS 7, the original parameter biosdevname=0 doesn't work, and the network device becomes a name like eno1. If you want to continue to use the traditional name eth0, add parameters when the installation starts:
Net.ifnames=0 biosdevname=0
If you have already installed it and want to change it to a name like eth0, you need:
Modify grub2 startup parameters
Vi / etc/sysconfig/grub
GRUB_CMDLINE_LINUX= "rd.lvm.lv=vg0/swap vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 net.ifnames=0 biosdevname=0 rd.lvm.lv=vg0/usr rhgb quiet"
Grub2-mkconfig-o / boot/grub2/grub.cfg
Rename the file:
/ etc/sysconfig/network-scripts/ifcfg-*
The reason for this change in CentOS 7 is that systemd and udev introduced a new network device naming method-consistent Network device naming (CONSISTENT NETWORK DEVICE NAMING). The fixed name can be set according to firmware, topology and location information. the advantage is that the naming is automatic and the name is completely predictable. the replacement will not affect the naming of the device after the hardware is broken, so that the replacement of the hardware can be seamless. The disadvantage is that the new device name is harder to read than the traditional one. For example, the name of the experience is enp5s0.
This is the end of the content of "how to name network devices under CentOS7". 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.