Run in serial console as network connection may drop
ip="192.168.40.31"
gw="192.168.40.1"
rand4bytes=$(head -c 256 /dev/urandom | md5sum | sed 's/\(..\)/\1:/g' | head -c 11)
uci set network.lan.macaddr="02:$rand4bytes":10
uci commit network
for index in 0 1 2; do
uci set wireless.radio$index.macaddr="02:$rand4bytes":5$index
done
ifconfig br-lan $ip
route add -net 0.0.0.0 gw $gw
echo nameserver 8.8.8.8 > /etc/resolv.conf
opkg update
opkg install luci
uci set network.lan.dns=8.8.8.8
uci set network.lan.gateway=$gw
uci set network.lan.ipaddr=$ip
# Delete Network
uci del network.wan
uci del network.wan6
uci commit network
echo "config switch_vlan" >> /etc/config/network # Wierd Bug
uci set network.@switch_vlan[0]=switch_vlan
uci set network.@switch_vlan[0].device='switch0'
uci set network.@switch_vlan[0].vlan='1'
uci set network.@switch_vlan[0].vid='1'
uci set network.@switch_vlan[0].ports='3 4 6t'
uci set network.@switch_vlan[1]=switch_vlan
uci set network.@switch_vlan[1].device='switch0'
uci set network.@switch_vlan[1].vlan='2'
uci set network.@switch_vlan[1].vid='2'
uci set network.@switch_vlan[1].ports='3t 4t 6t'
uci set network.@switch_vlan[2]=switch_vlan
uci set network.@switch_vlan[2].device='switch0'
uci set network.@switch_vlan[2].vlan='3'
uci set network.@switch_vlan[2].vid='3'
uci set network.@switch_vlan[2].ports='3t 4t 6t'
uci set network.lan.ifname='eth1.1'
uci commit network
uci set network.mesh1=interface
uci set network.mesh1.proto=none
uci set network.mesh1.type=bridge
uci set network.mesh1.ifname='eth1.2'
uci set network.mesh2=interface
uci set network.mesh2.proto=none
uci set network.mesh2.type=bridge
uci set network.mesh2.ifname='eth1.3'
uci commit network
uci set wireless.radio0.disabled=0
uci set wireless.radio1.disabled=0
uci set wireless.radio2.disabled=0
uci set wireless.radio0.channel=1
uci set wireless.radio0.country=US
uci set wireless.radio0.htmode=HT40
uci set wireless.radio0.legacy_rates=1
uci set wireless.radio1.channel=165
uci set wireless.radio1.country=US
uci set wireless.radio1.htmode=HT40
uci set wireless.radio1.legacy_rates=1
uci set wireless.radio2.channel=165
uci set wireless.radio2.country=US
uci set wireless.radio2.htmode=HT40
uci set wireless.radio2.legacy_rates=1
uci delete wireless.default_radio1
uci delete wireless.default_radio0
uci delete wireless.default_radio2
uci set wireless.ap=wifi-iface
uci set wireless.ap.device=radio0
uci set wireless.ap.mode=ap
uci set wireless.ap.network=lan
uci set wireless.ap.ssid=pi1
uci set wireless.ap.encryption=psk2
uci set wireless.ap.key=password
uci set wireless.mesh1=wifi-iface
uci set wireless.mesh1.mesh_fwding=1
uci set wireless.mesh1.device=radio1
uci set wireless.mesh1.mesh_id=tomesh
uci set wireless.mesh1.mode=mesh
uci set wireless.mesh1.network=mesh1
uci set wireless.mesh1.beacon_int=100
uci set wireless.mesh2=wifi-iface
uci set wireless.mesh2.device=radio2
uci set wireless.mesh2.mesh_fwding=0
uci set wireless.mesh2.mesh_id=tomesh
uci set wireless.mesh2.mode=mesh
uci set wireless.mesh2.network=mesh2
uci set wireless.mesh2.beacon_int=100
uci commit wireless
reboot
OpenWRT/LEDE raw config for mesh stream
Run in serial console as network connection may drop