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"/>
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"/>
Refer to public cloud blog article, link: 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/
In centos 5, we were used to the names of network devices such as eth0. In centos 6, we found that network devices were named like em1. At that time, we added biosdevname = 0 to the startup parameter during installation, so that we can continue to use the eth0 name.
When centos 7 is reached, the original parameter biosdevname = 0 does not work, and the network device is named eno1. If you want to continue using a traditional name such as eth0, add the following parameters during installation and startup:
Net. ifnames = 0 biosdevname = 0
If you want to change the name to eth0 after the installation is complete, you need:
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 = 0 Rd. LVM. lv = vg0/usr rhgb quiet"
Grub2-mkconfig-O/boot/grub2/grub. cfg
/Etc/sysconfig/network-scripts/ifcfg -*
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 name is enp5s0.
For detailed naming rules, see the network guide.
For details, see:
RHEL 7 network Guide
Red Hat bug965718
This article is from the "bug blog" blog, please be sure to keep this source http://xlogin.blog.51cto.com/3473583/1441208
Rename Nic In centos 7