CentOS 7.0 恢复传统网卡名称
##########################################
2014-07-28 TsengYia#126.com http://tsengyia.blog.chinaunix.net/
1. 修改内核启动参数,添加 net.ifnames=0 阻止其重新命名
[root@localhost ~]# vim /etc/sysconfig/grub
.. ..
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet net.ifnames=0"
[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
.. ..
[root@localhost ~]# reboot
.. ..
2. 确认网卡名称
[root@localhost network-scripts]# ifconfig -a
eth0: flags=4163
mtu 1500
.. ..
3. 调整网卡配置
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# mv ifcfg-eno16777736 ifcfg-eth0
[root@localhost network-scripts]# vim ifcfg-eth0
.. ..
[root@localhost network-scripts]# systemctl restart network
##########################################
REF:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Consistent_Network_Device_Naming.html#sec-Understanding_the_Predictable_Network_Interface_Device_Names
The names have two character prefixes based on the type of interface:
en for Ethernet,
wl for wireless LAN (WLAN),
ww for wireless wide area network (WWAN).
The names have the following types:
Table 9.1. Device Name Types
Format Description
o on-board device index number
s[f][d] hotplug slot index number
x MAC address
ps[f][d] PCI geographical location
ps[f][u][..][c][i] USB port number chain
##########################################
阅读(2592) | 评论(0) | 转发(0) |