1.增加lan接口,比如lan1
mynetwork="lan1"
myip="XXX.XXX.XXX.XXX"
mynetmask="255.255.255.0"
uci set network.${mynetwork}=interface
uci set network.${mynetwork}.proto=static
uci set network.${mynetwork}.ipaddr=$myip
uci set network.${mynetwork}.netmask=$mynetmask
uci set network.${mynetwork}.ifname=$mynetwork
uci set network.${mynetwork}.type=bridge
uci set network.${mynetwork}.force_link=1
uci set network.${mynetwork}.ip6assign=60
2.修改wireless
这里的访客网络是@wifi-iface[2]
。
uci set wireless.@wifi-iface[2].network="${mynetwork}"
3.新增防火墙
uci add_list firewall.@zone[0].network=${mynetwork}
4.开启dhcp
uci set dhcp.${mynetwork}=dhcp
uci set dhcp.${mynetwork}.interface=${mynetwork}
uci set dhcp.${mynetwork}.start=100
uci set dhcp.${mynetwork}.limit=150
uci set dhcp.${mynetwork}.leasetime=12h
5.uci commit
6.GatewayInterface br-lan1