ggy@darkstar:~$ cat /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:90:06:83", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
这个文件是关于网卡的。
说明一下.这个文件的使用情况.适用的情况是
当网卡变动时.比如说我主板集成一个网卡,现在在cmos中启用后.这个文件就会发生变化.
当新加网卡时.或换网卡时.这个文件都会有变化.
对应的修改mac 或eth 0 这个名字.来调整.
我只改name="eth0"
以下是我的二块网卡同时在的文件。
ggy@darkstar:~$ cat /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:90:06:83", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:10:cd:ab", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"