As an experiment I am trying to use the official in-tree MT7530 DSA module. For some reason I am not able to get it properly configured.
root@OpenWrt:/# dmesg | grep "mt7530"
[ 0.750000] mt7530 mdio-bus:00: MT7530 adapts as multi-chip module
[ 0.870000] mt7530 mdio-bus:00: MT7530 adapts as multi-chip module
[ 0.890000] mt7530 mdio-bus:00 lan0 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[ 0.900000] mt7530 mdio-bus:00 lan1 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[ 0.910000] mt7530 mdio-bus:00 lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[ 0.920000] mt7530 mdio-bus:00 lan3 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[ 0.930000] mt7530 mdio-bus:00 lan4 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[ 0.940000] mt7530 mdio-bus:00: configuring for fixed/trgmii link mode
[ 0.950000] mt7530 mdio-bus:00: Link is Up - 1Gbps/Full - flow control off
[ 16.810000] mt7530 mdio-bus:00 lan0: configuring for phy/gmii link mode
[ 16.870000] mt7530 mdio-bus:00 lan1: configuring for phy/gmii link mode
[ 16.910000] mt7530 mdio-bus:00 lan2: configuring for phy/gmii link mode
[ 16.950000] mt7530 mdio-bus:00 lan3: configuring for phy/gmii link mode
[ 16.990000] mt7530 mdio-bus:00 lan4: configuring for phy/gmii link mode
[ 20.090000] mt7530 mdio-bus:00 lan3: Link is Up - 1Gbps/Full - flow control rx/tx
[ 20.970000] mt7530 mdio-bus:00 lan0: Link is Up - 1Gbps/Full - flow control rx/tx
root@OpenWrt:/# _ 84.560000] br-lan: port 4(lan3) entered disabled state
[ 84.560000] mt7530 mdio-bus:00 lan3: Link is Down
[ 86.730000] mt7530 mdio-bus:00 lan4: Link is Up - 1Gbps/Full - flow control rx/tx
[ 86.730000] IPv6: ADDRCONF(NETDEV_CHANGE): lan4: link becomes ready
My /etc/config/network
root@OpenWrt:/# cat /etc/config/network
config interface 'lan'
option type 'bridge'
option ifname 'lan0 lan1 lan2 lan3'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.2.1'
config interface 'wan'
option ifname 'lan4'
option proto dhcp
ifconfig
br-lan Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::a0e6:57ff:fef9:fb7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:335 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62489 (61.0 KiB) TX bytes:1602 (1.5 KiB)
eth0 Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
inet6 addr: fe80::a0e6:57ff:fef9:fb7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:338 errors:0 dropped:0 overruns:0 frame:82
TX packets:362 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69185 (67.5 KiB) TX bytes:75181 (73.4 KiB)
Interrupt:22
lan0 Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:186 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32736 (31.9 KiB) TX bytes:30770 (30.0 KiB)
lan1 Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lan2 Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lan3 Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:150 errors:0 dropped:0 overruns:0 frame:0
TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29814 (29.1 KiB) TX bytes:36637 (35.7 KiB)
lan4 Link encap:Ethernet HWaddr A2:E6:57:F9:FB:7B
inet6 addr: fe80::a0e6:57ff:fef9:fb7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:551 (551.0 B) TX bytes:1510 (1.4 KiB)
Everything else is "stock", dnsmasq, firewall.
DHCP is not working, no automatic IP on LAN4 (the WAN port), no IP handed out on the 'LAN' bridge. Even when I configure a client with a static IP, I can't even ping this client or the router the other way around.
removing the /etc/config/network and trying to setup the DSA switch as 'gateway' as described here DSA switch configuration from userspace will allow traffic to go "through" the router like a dumb switch, but still not able to even ping anything.
What am I missing (fail to understand)??