Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2266255
  • 博文数量: 168
  • 博客积分: 6641
  • 博客等级: 准将
  • 技术积分: 1996
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-02 11:49
文章存档

2020年(4)

2019年(6)

2017年(1)

2016年(3)

2015年(3)

2014年(8)

2013年(2)

2012年(12)

2011年(19)

2010年(10)

2009年(3)

2008年(17)

2007年(80)

分类: LINUX

2014-07-28 16:40:11


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

##########################################
阅读(2541) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~