Support for RTL838x based managed switches

As is seems there are a lot of devs here, I'd like to ask for your ideas on how to find the reason for my lan1 not being accessible from the device directly connected to it.

Setup:

  • D-Link DGS-1210-16 rev. G running OpenWrt master r16153
  • 4 VLANs (1=internal, 2=IoT, 3=guest, 4=internet-only), switch itself bound to VLAN 1
  • Internet router (192.168.[1-4].1) serving these 4 VLANs connected to lan1
  • WLAN-AP (Netgear R7800) with 4 SSIDs corresponding to the 4 VLANs) connected to lan5
  • Desktop computer connected to WLAN-AP on untagged port with PVID 1

Problem:

  • Everything works as intended, with one exception: I cannot access the DGS-1210-16 from the router. It does not answer pings or SSH login requests, instead runs into timeouts.

Fun facts:

  • lan1 seems to work because traffic is flowing through it. I can reach the router through lan1, browse the internet and so on. Only packets coming in on lan1 targeted for the switch itself are ignored.
  • When plugging the router from lan1 to any other port of lan2..lan8 on the DGS-1210-16, the problem disappears. I don't understand that because lan1..lan8 are using the same configuration in my setup (see below).

What should not be the the reason for this:

  • iptables (firewall, ip6tables and iptables are omitted from my build)
  • ebtables (not installed)
  • different configuration of lan1 (which does not work) and lan2..lan8 (which do work)

See below the output of uci show network.

I'd be very thankful for any hint on how to track down the problem.

network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.switch=device
network.switch.name='switch'
network.switch.type='bridge'
network.switch.macaddr='e0:1c:fc:12:02:34'
network.switch.ipv6='0'
network.lan_vlan=bridge-vlan
network.lan_vlan.device='switch'
network.lan_vlan.vlan='1'
network.lan_vlan.ports='lan1:t lan2:t lan3:t lan4:t lan5:t lan6:t lan7:t lan8:t lan9 lan10 lan11 lan12 lan13 lan14 lan15 lan16 lan17 lan18 lan19 lan20'
network.lan=interface
network.lan.ifname='switch.1'
network.lan.proto='static'
network.lan.netmask='255.255.255.0'
network.lan.ipaddr='192.168.1.241'
network.lan.gateway='192.168.1.1'
network.lan.dns='192.168.1.1' 
network.lan.dns_search='intranet'
network.lan_switch_1_dev=device
network.lan_switch_1_dev.name='switch.1'
network.lan_switch_1_dev.macaddr='e2:1c:fc:12:02:34'
network.eth0=interface
network.eth0.ifname='eth0'
network.eth0.proto='none'
network.eth0.ipv6='0'
network.iot_vlan=bridge-vlan
network.iot_vlan.device='switch'
network.iot_vlan.vlan='2'
network.iot_vlan.ports='lan1:t lan2:t lan3:t lan4:t lan5:t lan6:t lan7:t lan8:t'
network.guest_vlan=bridge-vlan
network.guest_vlan.device='switch'
network.guest_vlan.vlan='3'
network.guest_vlan.ports='lan1:t lan2:t lan3:t lan4:t lan5:t lan6:t lan7:t lan8:t'
network.inetonly_vlan=bridge-vlan
network.inetonly_vlan.device='switch'
network.inetonly_vlan.vlan='4'
network.inetonly_vlan.ports='lan1:t lan2:t lan3:t lan4:t lan5:t lan6:t lan7:t lan8:t'