Ubuntu 换网卡后,接口名字可能会改变,原来的eth1可能变成eth6,等等。
可以修改 /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:02.0/0000:03:00.1 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:5d:4b:e1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:04.0/0000:04:00.1 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:5d:4b:e5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:04.0/0000:04:00.0 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:5d:4b:e4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:02.0/0000:03:00.0 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:5d:4b:e0", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
只需修改 NAME 中的参数。修改完后,重启系统即可。
当Ubuntu系统更换或新增网卡时,网络接口名称可能会改变。要固定接口名,可以通过编辑/etc/udev/rules.d/70-persistent-net.rules文件,根据PCI设备信息设定接口名为eth1, eth2等。只需更新NAME字段的值,然后重启系统,接口名将按设定固定。"
121676020,7327838,决策树中的基尼系数、熵之半与分类误差率解析,"['机器学习', '数据挖掘', '决策树', '熵', '基尼指数']
798

被折叠的 条评论
为什么被折叠?



