OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version openwrt-21.02
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by cybermaus - 15.06.2021

FS#3879 - Incorrect switch config for TP-Link Archer C2 AC750

Model TP-Link Archer C2 v1
Architecture MediaTek MT7620A ver:2 eco:5
Firmware Version OpenWrt 21.02.0-rc2 r16122-c2139eef27 / LuCI openwrt-21.02 branch git-21.148.49484-14511e5

The Archer C2 has a little unusual switch setup, in that the SoC itself only has an unused 100Mb switch and instead there is an extra RTL8367B chip. We can only assume TP-Link wanted to make this a 1Gb device, despite using a 100Mb SoC. (and indeed, the 1Gb ports is why I got this particular cheap device)

OpenWRT 19.07.7 handled this beautifully, as it simply did not show the switch0, neither in UCI nor in Luci, though the RTL8367B chip is labeled switch1 in stead of the more usual switch0

When clean upgrading (so removing and rebuilding all config) to 21.02.0-rc2 I noticed that the internal switch was now populated in UCI and displayed in Luci
The Archer C2 does work, switch1 is configured as expected, but the presence of switch0 seems to cause Luci to display an error “Switch switch0 has an unknown topology - the VLAN settings might not be accurate.” and further prevents Luci from updating switch1 settings.

So the presence of switch0 in UCI is confusing and unneeded, and also prevents Luci from working.

Manually removing the switch0 section from /etc/config/network makes it all work again.

/etc/config/network as generated on 19.07.7 (only the switch section)

config switch
        option name 'switch1'
        option reset '1'
        option enable_vlan '1'
        option max_length '3'

config switch_vlan
        option device 'switch1'
        option vlan '1'
        option ports '6t 1 2 3 4'

config switch_vlan
        option device 'switch1'
        option vlan '2'
        option ports '6t 0'

/etc/config/network as generated on 21.02.0-rc2 (only the switch section)

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

config switch
        option name 'switch1'
        option reset '1'
        option enable_vlan '1'
        option enable_vlan4k '1'
        option max_length '3'

config switch_vlan
        option device 'switch1'
        option vlan '1'
        option ports '6t 1 2 3 4'

config switch_vlan
        option device 'switch1'
        option vlan '2'
        option ports '6t 0'

so to restate, after manually removing the extra switch0 from rc2, it all was normal again

cybermaus commented on 15.06.2021 10:17

I retract my "manual remove switch0 makes it work"

It does make the Luci work. And the device continues to work. Until you reboot, all connections lost. Even using IPv6 link-local fe80 address. All I could do is 10 second reset. Tried several times and variants.

So maybe this is a bit more urgent. Still not very urgent, but not low-low.

So:
In v19, it all worked, with switch0 not visible in /etc/config/network
In v21, with switch0 visible in network, device works, but you cannot configure switch1
In v21, with switch0 removed from network, you can configure switch1, but after reboot switch0 does not pass through any of the RGMII traffic to switch1

My current workaround: leave switch0 in network, manually edit config for switch1

Thanks

ludwig commented on 02.01.2022 05:40

Thank you for your solution.

I have the same problem with TP-Link Archer C2 AC750 on OpenWrt 21.02.1 here.
In the oroginal state there was switch0 and if one tries to change switch1 wan to tagged/untagged/off it is impossible to change it again. It will become off. Also if one tries to change it in
/etc/config/network

So this should be investigated and the lua for luci shall be fixed.

Removing the switch0 section in /etc/config/network helped me to get proper operation!

But I need to try to reboot, but do I want to reboot :-)

Priority should be high as it is a show stopper if you can not access your network via the internal vlan switch

Cheers

ludwig

ludwig commented on 02.01.2022 18:51

So I played around with it and found that one needs to remove the switch0 config
in /etc/config/network
(thanks to cybermaus!)

and to disable vlan on switch0.

I hacked it in an ugly way as I modified /etc/init.d/network to configure switch0:

here in init_switch() I added:

      swconfig dev switch0 set enable_vlan 0

Please look at the attached files they also contain some "history" of looking around.

To get a quick and dirty solution, upload my config
backup-Jade-2022-01-02.tar.gz from the archive
and go from there.

The root password is "toor" the wifi password is "rattensommer"
The IP address is 10.42.42.1

Have fun with this cheap router.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing