由于换了主板,集成网卡mac地址变了,70-persistent-net.rules中仍然保留了老网卡的内容,新网卡则被识别为eth1. 将表示老网卡的行注释掉,然后将表示新网卡的行中eth1改成eth0,在把网卡配置文件ifcfg-eth0的mac地址改成新网卡mac地址,重启. 操作: [root@localhost ~]# vi /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated
一.参考文档: 如何交换eth0和eth1? http://bbs.chinaunix.net/archiver/tid-2026056.html 二.具体操作 #echo `ifconfig -a` ifconfig eth0 down ifconfig eth1 down ip link set dev eth0 name eth2 ip link set dev eth1 name eth0 ip link set dev eth2 name eth1 ifconfig eth0 up i
故障现象:Linux的网卡由eth0变成了eth1,如何修复?解决方案:在linux中,udev记录网络规则的脚本为:/etc/udev/rules.d/70-persistent-net.rules 如下操作: [user@localhost ~]$ vi /etc/udev/rules.d/70-persistent-net.rules # This file was automatically generated by the /lib/udev/write_net_rules # pro