Centos7 Nic naming rules

Source: Internet
Author: User
The traditional name of network devices is eth [0123 & hellip;] Centos7 provides different naming rules, which are allocated by default based on the firmware, topology, and location information. The advantage of this is that the name is fully automatic and predictable, and the disadvantage is that it is more difficult to read than eth0 and wlan0. For example, enp5s01 and default naming rules, systemd applies the following naming rules to the interface.

The traditional name of a network device is eth [0123…].

Centos7 provides different naming rules, which are allocated by default based on firmware, topology, and location information. The advantage of this is that the name is fully automatic and predictable, and the disadvantage is that it is more difficult to read than eth0 and wlan0. For example, enp5s0

 

1. naming rule policy

By default, systemd applies the following naming rules to the interface.

 

Rule 1: for an on-board device, name the merged firmware or the index number provided by the BIOS. if the information from the firmware or BIOS is readable, name it, for example, eno1. this name is common, otherwise, Rule 2 is used.

 

Rule 2: name the index number of the PCI-E hot plug port provided by the merging firmware or BIOS, such as ens1, which is used if the information is readable; otherwise Rule 3 is used.

 

Rule 3: name the physical location of the merged hardware interface, for example, enp2s0. if it is available, name it. if it fails, go directly to solution 5.

 

Rule 4: name the MAC address of the merge interface, such as enx78e7d1ea46da. this scheme is disabled by default unless you select this scheme.

 

Rule 5: use a traditional solution. If all solutions fail, eth0 is used.

 

 

2. meaning of the first two characters

En Ethernet

Wl WLAN

Ww wireless WAN WWAN

 

3. select the third character based on the device type

 

4. if you are not used to the new naming rules, you can restore the traditional way of naming, edit the grub file, add two variables, and then use the grub2-mkconfig to regenerate the configuration file.

 

Vim/etc/sysconfig/grub

 

GRUB_CMDLINE_LINUX = "net. ifnames = 0 biosdevname = 0" # Add two variables

 

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

 

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.