Rename Nic In centos 7

Source: Internet
Author: User

Lazy!

The name of the newly installed centos 7 Nic is no longer the same as before by default, and I feel a little crazy myself... we have to make him think about eth0... after searching for N for a long time, I couldn't find a solution. Later, I yelled at it in the group. Some friends gave a link to the solution... thank you, Beijing-dezhong!

Centos 7 has changed many places. It seems that you have been familiar with it for a while. I hope this article will help my friends who are similar to me.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/40/01/wKiom1PNykKDR3WuAAEr0AGtg5A847.jpg "Title =" 1.jpg" alt = "wkiom1pnykkdr3wuaaer0agtg5a847.jpg"/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/40/01/wKiom1PNy5Ci-VFJAAFe4PWKOrM425.jpg "Title =" 3.jpg" alt = "wKiom1PNy5Ci-VFJAAFe4PWKOrM425.jpg"/>

Rename the NIC configuration file:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/40/01/wKioL1PN1F6yo7nDAAHNfH4ameQ933.jpg "Title =" 2.jpg" alt = "wkiol1pn1f6yo7ndaahnfh4ameq933.jpg"/>

Edit the content of the/etc/sysconfig/GRUB file. The content of the file before editing is as follows: 650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/40/01/wKioL1PNzOHBrVV5AAEnHbxb9Ug004.jpg "Title =" 4.jpg" alt = "wkiol1pnzohbrvv5aaenhbxb9ug004.jpg"/>

Add "net. ifnames = 0 biosdevname = 0 ", edited file content: 650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/40/01/wKioL1PN0CegVKztAAEp3_d9yjs335.jpg "Title =" 7.jpg" alt = "wkiol1pn0cegvkztaaep3_d9yjs335.jpg"/>

Run: grub2-mkconfig-O/boot/grub2/grub. ipv650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/40/01/wKiom1PNy9vCFWGNAAHV4XyxMXM429.jpg "Title =" 5.jpg" alt = "wkiom1pny9vcfwgnaahv4xyxmxm429.jpg"/>

Then restart the system and check the NIC name: 650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/40/01/wKioL1PNzQWxcsfOAAJUNRImCoo148.jpg "Title =" 6.jpg" alt = "wkiol1pnzqwxcsfoaajunrimcoo148.jpg"/>

The reason for this change in centos 7 is that systemd and udev introduce a new network device naming method: consistent network device naming (Consistent network device naming ). You can set a fixed name based on the firmware, topology, and location information. The advantage is that naming is automated and the name is completely predictable. If the hardware breaks down, the change will not affect the device name, in this way, the hardware can be changed and merged. The disadvantage is that new device names are harder to read than traditional names. For example, the new name is enp5s0.

For detailed naming rules, see the network guide.

  • RHEL 7 network Guide

  • Red Hat bug965718


Reference: http://www.pubyun.com/blog/deveops/centos-7%E4%B8%8B%E7%BD%91%E7%BB%9C%E8% AE %BE%E5%A4%87%E5%91%BD%E5%90%8D

This article is from the "bug blog" blog, please be sure to keep this source http://xlogin.blog.51cto.com/3473583/1441209

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.