问题:多台openwrt设备在同一网络中使用产生MAC冲突
1.修改 lan,wan mac地址
编辑 /etc/config/network
修改其中一段
config 'interface' 'lan'
option 'type' 'bridge'
option 'ifname' 'eth0.0'
option 'proto' 'static'
option 'netmask' '255.255.255.0'
option 'ipaddr' '192.168.200.1'
option 'macaddr' 'd8:64:c7:5e:f1:c6'
config 'interface' 'wan'
option 'ifname' 'eth0.1'
option 'proto' 'dhcp'
option 'macaddr' 'd8:64:c7:5e:f1:c6'
2.修改 eth0 mac地址
(1) 编辑 /etc/rc.local
ifconfig eth0 down
ifconfig eth0 hw ether d8:64:c7:5e:f1:c6
ifconfig eth0 up
(2)编辑network文件
vi /etc/config/network
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
option 'macaddr' '11:AA:BB:22:CC:DD' #添加这一行,MAC地址改为你想要的
3.修改wireless mac地址
修改 /etc/config/wireless中的mac:
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path '10180000.wmac'
option htmode 'HT20'
option txpower '20'
option country '00'
config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'psk2'
option key '1234567890'
option 'macaddr' 'd8:64:c7:5e:f1:c6'
4.修改完成
reboot 重启,就能看到所有修改都生效了。