Modify the Rhel7/centos7 NIC to eth0

Source: Internet
Author: User

With the advent of rhel7/centos7, we found that a lot of habits and the previous use of the same habits, such as the network card, the previous naming method is eth[serial number] mode, and in the RHEL7/CENTOS7 because the interface name is automatically based on the firmware, Topology and location information to determine. Now, even if you add or remove network devices, the interface names remain fixed without re-enumeration, and the broken hardware can be replaced seamlessly. Although this change has some advantages, but for us accustomed to the former system of people, but it is a pain, now we will change the NIC to the previous eth0 this way, now RHEL7 in the following network card:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/8E/wKiom1Y8IFXjulp_AAPFA7V1cws950.jpg "title=" QQ picture 20151106113542.png "alt=" Wkiom1y8ifxjulp_aapfa7v1cws950.jpg "/>

The circle in the picture is now the name of the NIC in the RHEL7 * * *

The following changes are started:

(1) Modify the NIC configuration file/etc/sysconfig/network-scripts/ifcfg-eno16777736 The name=eno16777736 in the file to name=eth0650) this.width=650; " Src= "Http://s3.51cto.com/wyfs02/M02/75/8C/wKioL1Y8IXmSMZl_AAJ1pyr1oMI731.jpg" title= "QQ picture 20151106114006.jpg" alt = "Wkiol1y8ixmsmzl_aaj1pyr1omi731.jpg"/> * * * * * * * * * * * * * * in the Circle

(2) Change the configuration file name of the NIC to Ifcfe-eth0:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/8C/wKioL1Y8Im7x4eUcAATTeo3N35U775.jpg "title=" QQ picture 20151106113542.png "alt=" Wkiol1y8im7x4eucaatteo3n35u775.jpg "/>

(3) Disable the naming rule, edit the/etc/default/grub file implementation, in the file grub_cmdline_linux= "RHGB quiet" changed to grub_cmdline_linux= "net.ifnames=0 Biosdevname=0 RHGB Quiet "

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/75/8C/wKioL1Y8JCTRbzOnAAB8WGJog_s444.jpg "title=" QQ picture 20151106113542.png "alt=" Wkiol1y8jctrbzonaab8wgjog_s444.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/75/8F/wKiom1Y8KGbCG_xBAAFxD7AaLac181.jpg "title=" QQ picture 20151106113542.png "alt=" Wkiom1y8kgbcg_xbaafxd7aalac181.jpg "/>

The contents of the circle in the picture are the modified effect * * *

(4) Run the command Grub2-mkconfig-o/boot/grub2/grub.cfg to regenerate the grub configuration and update the kernel parameters:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/8C/wKioL1Y8JSXjpD4cAAOVLk9dfIU708.jpg "title=" QQ picture 20151106113542.png "alt=" Wkiol1y8jsxjpd4caaovlk9dfiu708.jpg "/>

(5) Modify the configuration file/etc/udev/rules.d/70-persistent-ipoib.rules, modify the effect shown (this profile is if there are multiple network card devices in the system, do not let the kernel to name the network card device):

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/8F/wKiom1Y8JkLggIKoAASxA1NXt-0161.jpg "title=" QQ picture 20151106113542.png "alt=" wkiom1y8jklggikoaasxa1nxt-0161.jpg "/> * * * * is mainly attr{type}==" 1 "and Name=" eth0 "items, other without modification * **

(6) Restart verify NIC name:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/75/8F/wKiom1Y8KMHzQxNJAAb0P_oKL9c174.jpg "title=" QQ picture 20151106113542.png "alt=" Wkiom1y8kmhzqxnjaab0p_okl9c174.jpg "/>

We see the name of the network card has been changed to our familiar name, modified, I hope this article to help you!!!


This article is from the IT home blog, so be sure to keep this source http://bjwxjy.blog.51cto.com/525755/1710309

Modify the Rhel7/centos7 NIC to eth0

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.