Linux 网卡重命名

有时在安装服务器时新添加的网卡的名字并不是按顺序排列,以下是通过手动的方法定义网卡的名称;

/etc/udev/rules.d/70-persistent-net.rules   

在此可以修改MAC地址对应的网卡名称

 

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="60:a4:4c:e7:c8:8f", ATTR{type}=="1", KERNEL=="eth*", NAME="em0"

 

# PCI device 0x8086:0x10d3 (e1000e)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="60:a4:4c:e7:c8:90", ATTR{type}=="1", KERNEL=="eth*", NAME="em1"

 

# PCI device 0x8086:0x150f (igb)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:cd:04:17:73", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

 

# PCI device 0x8086:0x150f (igb)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:cd:04:17:72", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

 


本文出自 “lihongweibj” 博客,转载请与作者联系!

你可能感兴趣的:(linux,网卡重命名)