openwrt/LEDE打印信息: br-lan: received packet on eth0 with own address as source address

openwrt/LEDE通过串口或者dmesg命令发现有很多报告信息如下:

............

[277.479000] br-lan: received packet on eth0 with own address as source address
[280.482316] br-lan: received packet on eth0 with own address as source address
[283.485629] br-lan: received packet on eth0 with own address as source address
[286.488970] br-lan: received packet on eth0 with own address as source address
[289.492402] br-lan: received packet on eth0 with own address as source address

.............................................

这种情况是因为局域网内有两个相同的mac地址,就会导致有这样的报告。这里是说eth0的地址与其局域网内的某个mac地址冲突。那么可以通过以下命令修改eth0的mac地址:

  1. ifconfig eth0 down; ifconfig eth0 hw ether F0:17:00:66:06:01;ifconfig eth0 up

执行该行命令修改eth0的mac地址。然后重启网络 /etc/init.d/network restart ;再看串口打印信息/或者dmesg,发现没问题已解决。

但是这种方法只能在当前的状态生效,当重启系统/reboot后又会出现该问题。解决方法如下

  1. vim /etc/rc.local

然后在 exit 0 之前添加: ifconfig eth0 down; ifconfig eth0 hw ether F0:17:00:66:06:01;ifconfig eth0 up

这样就可以在系统启动之后自动将eth0的mac地址修改。

你可能感兴趣的:(openwrt/LEDE配置)