Distribute wireless traffic across two subnets

ip a
...........
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether ?:?:?:?:?:? brd ff:ff:ff:ff:ff:ff
    inet ?.?.?.?/24 brd ?.?.?.? scope global eth1
       valid_lft forever preferred_lft forever
................
9: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether ?:?:?:?:?:? brd ff:ff:ff:ff:ff:ff
    inet 10.100.235.97/22 brd 10.100.235.255 scope global eth0.2
       valid_lft forever preferred_lft forever
11: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether ?:?:?:?:?:? brd ff:ff:ff:ff:ff:ff
12: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether ?:?:?:?:?:? brd ff:ff:ff:ff:ff:ff
ip r
default via ?.?.?.254 dev eth1  src ?.?.?.212  metric 10 
default via ?.?.?.1 dev eth0.2  src ?.?.?.97  metric 30 
10.100.232.0/22 dev eth0.2 scope link  metric 30 
?.?.112.0/24 dev eth1 scope link  metric 10 
192.168.1.0/24 dev br-lan scope link  src 192.168.1.10

Here is more additional information:

Newbie question:
How to allow clients from WLAN1 to eth1 ?
And allow clients from WLAN0 go to eth0.2 ?

Let's take a look at your config files:

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'

config device
	option name 'eth1'
	option macaddr '??:??:??:??:??:??'

config interface 'wan'
	option proto 'dhcp'
	option device 'eth1'
	option metric '10'
	option ipv6 '0'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'

config device
	option name 'eth0.1'
	option macaddr '??:??:??:??:??:??'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option delegate '0'
	option ipaddr '192.168.1.10'
	option ipv6 '0'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'
	option enable_vlan4k '1'
	option enable_learning '0'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 5t'

config device
	option name 'eth0.2'
	option type '8021q'
	option ifname 'eth0'
	option vid '2'
	option ipv6 '0'
	option macaddr '??:??:??:??:??:??'

config switch_vlan
	option device 'switch0'
	option ports '0 5t'
	option vlan '2'

config interface 'WAN2'
	option proto 'dhcp'
	option device 'eth0.2'
	option metric '30'

config device
	option name 'wlan1'


wifi


config wifi-device 'radio0'
	option type 'mac80211'
	option path 'pci0000:00/0000:00:11.0'
	option band '2g'
	option channel '9'
	option country 'UA'
	option cell_density '0'
	option htmode 'HT40'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2+ccmp'
	option key '????????'
	option ssid 'Andrey_AP'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'pci0000:00/0000:00:12.0'
	option channel '36'
	option band '5g'
	option htmode 'HT20'
	option country 'UA'
	option cell_density '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option mode 'ap'
	option ssid 'Andrey_AP5'
	option encryption 'psk2+ccmp'
	option key '?????????'
	option network 'lan'


With your current config, it is not possible to do what you're asking.

You need to create a new network interface and assign one of the radios to that new network (don't forget to also create a DHCP server and assign the network to a firewall zone). Doing this will mean that the two SSIDs will necessarily be different networks which may complicate connections between devices (not sure if this is an issue for you or not).

You will also need to install mwan3 in order to use the 2 different WANs and route accordingly.

3 Likes