fedora网卡名字p3p1

Fedora 搞的consistent network device names本人觉的很哦心,很难记。

all onboard ethernet adapters are labeled as emX (em1, em2…) and all PCI ethernet adapters are labeled as pXpX (p[slot]p[port], like p7p1 for port 1 on slot 7).

我的网卡名就变成了p3p1

下面我们就来把她改成eth0

vim  /etc/default/grub
在 GRUB_CMDLINE_LINUX= "rd.lvm.lv=VolGroup/LogVol01 rd.lvm.lv=VolGroup/LogVol00 rd.dm=0 LANG=zh_CN.UTF-8  KEYTABLE=us quiet rhgb rd.md=0 rd.luks=0 "  中加入biosdevname=0
变成
GRUB_CMDLINE_LINUX= "rd.lvm.lv=VolGroup/LogVol01 rd.lvm.lv=VolGroup/LogVol00 rd.dm=0 LANG=zh_CN.UTF-8  KEYTABLE=us quiet rhgb rd.md=0 rd.luks=0 biosdevname=0 "
  
$grub2-mkconfig -o  /boot/grub2/grub .cfg
  
$ touch  /etc/udev/rules .d /70-persistent-net .rules
#写入
SUBSYSTEM== "net" , ACTION== "add" , DRIVERS== "?*" , ATTR{address}== "44:37:e6:19:46:5e" , ATTR{dev_id}== "0x0" , ATTR{ type }== "1" , KERNEL== "eth*" , NAME= "eth0"
  
$ cd  /etc/sysconfig/network-script/
  
$ cp  ifcfg-p3p1  ifcfg-eth0
  
#再把里面的DEVICE="p3p1" 改成DEVICE="eth0"
reboot机器就可以了

你可能感兴趣的:(fedora网卡名字p3p1)