服务器更换完主板后网口不通
  NXfcn21KE4RD 2023年11月02日 60 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


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  Yoru5qB4TSKM   2023年12月10日   37   0   0 服务器重启IP
NXfcn21KE4RD