0
点赞
收藏
分享

微信扫一扫

服务器更换完主板后网口不通

在linux 系统下面,如果换完主板后,原主板记录网卡的/etc/udev/rules.d 文件夹下面一个与net 相关的配置文件不能自动删除原网卡信息造成的,需要进行手动删除,否则就会造成eth0 变成eth3,eth1变成eth4,解决该问题只需修改以下文件即可。



[root@node1 rules.d]# cd /etc/udev/rules.d


[root@node1 rules.d]# ls

40-hplip.rules 70-persistent-net.rules 97-bluetooth-serial.ru

56-hpmud_support.rules 85-pcscd_ccid.rules 98-kexec.rules

60-fprint-autosuspend.rules 90-alsa.rules 99-fuse.rules

60-pcmcia.rules 90-hal.rules 99-lustre.rules

60-raw.rules 90-rdma.rules

70-persistent-cd.rules 91-drm-modeset.rules


[root@node1 rules.d]# cat 70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x10d3 (e1000e)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="48:5b:39:12:51:90",ATTR{type}=="1", KERNEL=="eth*",NAME="eth0" (如果换过主板后,将该条删除或注释)


# PCI device 0x8086:0x10d3 (e1000e)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="48:5b:39:12:4c:57",ATTR{type}=="1", KERNEL=="eth*",NAME="eth1"(如果换过主板后,将该条删除或注释)


# PCI device 0x8086:0x10d3 (e1000e)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="48:5b:39:12:83:48",ATTR{type}=="1", KERNEL=="eth*",NAME="eth2" (如果换过主板后,将该条删除或注释)


# PCI device 0x8086:0x10d3 (e1000e)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="48:5b:39:12:27:60",ATTR{type}=="1", KERNEL=="eth*",NAME="eth3" (如果换过主板后,将该条删除或注释)


按照上述方法删除后,请按如下操作后重启,即可正常按照常规网卡配置IP 的方法进行网卡
的IP 配置,重启后eth2\eth3 也会变成eth0\eth1。


[root@node1 ~]# chkconfig NetworkManager off

[root@node1 ~]# reboot


举报

相关推荐

0 条评论