Need help with DSA port assignments about unusual behaviour

I installed openwrt a month ago and I don't have much experience.
I have a router with 4 lan ports. I divided my network into three, main, quest and IoT. When I moved the 4th port with my IoT server to IoT interface, for some inexplicable reason, the devices behind the port 1, 2 and 3 stopped working, even though I didn't touch there anything. When I moved the 4th port back to the lan, the other ports started working again. A result that does not make any sense.
here is the setup where all ports work

root@WRT1900ac:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd27:f9b5:7706::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config device
        option name 'lan1'
        option macaddr '94:10:xxx'

config device
        option name 'lan2'
        option macaddr '94:10:xxx'

config device
        option name 'lan3'
        option macaddr '94:10:xxx'

config device
        option name 'lan4'
        option macaddr '94:10:xxx'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr '94:10:xxx'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'Quest'
        option proto 'static'
        option ipaddr '10.20.30.40'
        option netmask '255.255.255.0'
        option device 'br-quest'

config interface 'IOT'
        option proto 'static'
        option ipaddr '172.16.0.1'
        option netmask '255.255.255.0'
        option device 'br-iot'

config device
        option type 'bridge'
        option name 'br-quest'

config device
        option type 'bridge'
        option name 'br-iot'

here is the setup where 1,2,3 refuse to work

root@WRT1900ac:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd27:f9b5:7706::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config device
        option name 'lan1'
        option macaddr '94:10:3e:xxx'

config device
        option name 'lan2'
        option macaddr '94:10:3e:xxx'

config device
        option name 'lan3'
        option macaddr '94:10:3e:xxx'

config device
        option name 'lan4'
        option macaddr '94:10:3e:xxx'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr '94:10:3e:xxx'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'Quest'
        option proto 'static'
        option ipaddr '10.20.30.40'
        option netmask '255.255.255.0'
        option device 'br-quest'

config interface 'IOT'
        option proto 'static'
        option ipaddr '172.16.0.1'
        option netmask '255.255.255.0'
        option device 'br-iot'

config device
        option type 'bridge'
        option name 'br-quest'

config device
        option type 'bridge'
        option name 'br-iot'
        list ports 'lan4'

It appears that you cannot have two separate bridges running on this device.

Try using bridge VLAN filtering.

2 Likes

Can you or someone else guide me how to achieve the same result with filtering as with bridging. My router maintenance skills don't extend beyond the basics. I think that my possibility of screwing up here is too big to try alone.

Run the following commands:

uci add network bridge-vlan
uci set network.@bridge-vlan[-1].device='br-lan'
uci set network.@bridge-vlan[-1].vlan='1'
uci add_list network.@bridge-vlan[-1].ports='lan1'
uci add_list network.@bridge-vlan[-1].ports='lan2'
uci add_list network.@bridge-vlan[-1].ports='lan3'
uci set network.lan.device='br-lan.1'

uci add network bridge-vlan
uci set network.@bridge-vlan[-1].device='br-lan'
uci set network.@bridge-vlan[-1].vlan='10'
uci add_list network.@bridge-vlan[-1].ports='lan4'
uci set network.IOT.device='br-lan.10'

Then run uci export network and look for the following changes:

config bridge-vlan
		option device 'br-lan'
		list ports 'lan1'
		list ports 'lan2'
		list ports 'lan3'
		option vlan '1'
	
config bridge-vlan
		option device 'br-lan'
		list ports 'lan4'
		option vlan '10'

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
		
config interface 'IOT'
        option proto 'static'
        option ipaddr '172.16.0.1'
        option netmask '255.255.255.0'
        option device 'br-lan.10'

Restart the network service.

If everything is fine, save the changes using uci commit network.
Otherwise, reboot the device.

The result was some of the desired changes, but not all, in my opinion. I dare not proceed without inspection or I will be locked out
here is all the actual result

root@WRT1900ac:~# uci add network bridge-vlan
cfg10a1b0
root@WRT1900ac:~# uci set network.@bridge-vlan[-1].device='br-lan'
root@WRT1900ac:~# uci set network.@bridge-vlan[-1].vlan='1'
root@WRT1900ac:~# uci add_list network.@bridge-vlan[-1].ports='lan1'
root@WRT1900ac:~# uci add_list network.@bridge-vlan[-1].ports='lan2'
root@WRT1900ac:~# uci add_list network.@bridge-vlan[-1].ports='lan3'
root@WRT1900ac:~# uci set network.lan.device='br-lan.1'
root@WRT1900ac:~# uci add network bridge-vlan
cfg11a1b0
root@WRT1900ac:~# uci set network.@bridge-vlan[-1].device='br-lan'
root@WRT1900ac:~# uci set network.@bridge-vlan[-1].vlan='10'
root@WRT1900ac:~# uci add_list network.@bridge-vlan[-1].ports='lan4'
root@WRT1900ac:~# uci set network.IOT.device='br-lan.10'
root@WRT1900ac:~# uci export network
package network

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

config globals 'globals'
        option ula_prefix 'fd27:f9b5:7706::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config device
        option name 'lan1'
        option macaddr '94:10:3e:a2:01:71'

config device
        option name 'lan2'
        option macaddr '94:10:3e:a2:01:71'

config device
        option name 'lan3'
        option macaddr '94:10:3e:a2:01:71'

config device
        option name 'lan4'
        option macaddr '94:10:3e:a2:01:71'

config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option device 'br-lan.1'

config device
        option name 'wan'
        option macaddr '94:10:3e:a2:01:71'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'Quest'
        option proto 'static'
        option ipaddr '10.20.30.40'
        option netmask '255.255.255.0'
        option device 'br-quest'

config interface 'IOT'
        option proto 'static'
        option ipaddr '172.16.0.1'
        option netmask '255.255.255.0'
        option device 'br-lan.10'

config device
        option type 'bridge'
        option name 'br-quest'

config device
        option type 'bridge'
        option name 'br-iot'

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config bridge-vlan
        option device 'br-lan'
        option vlan '10'
        list ports 'lan4'

It looks fine. Restart the network service.

If you lose access for some reason, power off/on the device and the previous configuration will be restored.

1 Like

just to be clear, by restart u mean restart router

Run /etc/init.d/network restart.
If you don't lose access, run uci commit network.
Otherwise, turn off/on the power.

Thanks. I got it to work. I also made a little modification and marked all vlan1 ports as primary vlan. As far as I understand, when I ever want to add an access point I need to mark that port as tagged.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.