CentOS7 Modify the NIC name to Eth0 & Add multiple NIC configurations to VMware

Source: Internet
Author: User
Directory

Directory preface in CentOS 7 Why do you name the network card in RHEL7 using the RHEL6 network card naming rules add network card devices for CentOS7 in VMware

Preface

Whether it is Rhel 7, or CentOS 7 have used networkmanager.service for network management, of course, network services can continue to use, but will also be a transitional period of residue.
In addition to the 7 version of the network card named Udev file changed, from 6 of Ifcfg-eth0 into ifcfg-eno16777736. And the Fuck is, in VMware to create 7 virtual machine, obviously added a network card device, but in the system is not found. This article mainly records how to turn ifcfg-eno16777736 into Ifcfg-eth0, and successfully add NIC devices in VMware. Why do I name the NIC in CentOS 7?

RHEL7 adopts Dmidecode acquisition naming scheme to get the motherboard information.
Can realize a permanent uniqueness of the network card name, RHEL6 card naming will be changed according to the situation and not unique and fixed.
Ethernet : EnX (x can have the following 3 types)
Wireless network : WLX
cable : wwx o motherboard onboard NIC P Independent network card, PCI NIC s hot-plug card, USB, etc.

xxxx (number) means : MAC address + motherboard information calculation to derive unique sequence in RHEL7 using RHEL6 's network card naming rules

If you are not accustomed to RHEL7 Dmidecode collection naming, you can revert to the RHEL6 naming scheme by modifying the configuration.
Modify GRUB configuration file
(power-on to Kernel pass parameter, close motherboard Dmidecode collect name)
Vim/etc/sysconfig/grub

Add Net.ifnames=0 biosdevname=0 to the #在GRUB \_cmdline_linux configuration entry         #不启用BIOSDEV的配置

Reload Grub Configuration

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

generate RHEL6 Network card configuration file

Cd/etc/sysconfig/network-scripts
MV Ifcfg-enxxxxxx Ifcfg-eth0

Configure network adapters
Vim Ifcfg-eth0

Name= "eth0"
Onboot=yes

Reboot system in effect

Systemctl reboot
Add a network card device to CentOS7 in VMware

VMware has a small bug, when we create a virtual machine at the same time to specify a number of network cards, the additional network card will not be found, at this time we need to be in the virtual machine setup will not be found in the network card removed, and then add a new network card, VMware would refresh the virtual machine, Then the use of ifconfig will be able to appear new network card devices, and then Ifcfg-eth0 Copy into the ifcfg-eth1 can be used after.
Note : LSB error occurs when the HDADDR in the MAC address and Nic profile of the network adapter device are inconsistent, so be sure to modify the HDADDR option when you copy the configuration file. The real MAC address of the network card device, you can view the

by Ifconfig.

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.