CentOS 7 Network Device naming method CentOS 7 How to name the network device

Source: Internet
Author: User
Tags centos

At the time of CentOS 5, we were accustomed to eth0 such a network device naming, in CentOS 6, found that the network device became EM1 name. At that time, when we were installing, we added biosdevname=0 to the startup parameters and we could continue to use the name eth0.

By the time the CentOS 7, the original parameter biosdevname=0 did not work, the network device became ENO1 such name. If you want to continue using a traditional name such as eth0, then add the parameters to the installation startup:

Net.ifnames=0 biosdevname=0

If you have finished installing and want to change to a name like eth0, then you need to:

modifying 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=0th.lvm.lv=vg0/usr rhgb quiet "

Grub2-mkconfig-o/boot/grub2/grub.cfg

to name a file again:

/etc/sysconfig/network-scripts/ifcfg-*

CentOS 7 The reason for this change is that SYSTEMD and Udev introduced a new way of naming network devices. Consistent network device naming (consistent network DEVICE). Can be based on firmware, topology, location information to set a fixed name, the benefits are named Automation, the name is completely predictable, after the hardware is broken, the replacement will not affect the name of the device, so that the replacement of hardware seamless. The disadvantage is that the new device name is harder to read than the traditional name. For example, the name is Enp5s0.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.