[Solved] The ports displayed dismatch with the physical ones

Device: Tplink WDR6500 v2

Is this custom firmware or did you download LEDE from here...


Plenty of switches number the internal ports differently from the labels on the outside. Happens all the time. However, according to the source code in trunk, the switch in your device should number the ports identically to the numbers visible on the outside:

ucidef_add_switch "switch0" \
                  "0@eth1" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"

That being said, it looks like the LEDE 17.01 images still use the inverted numbering:

ucidef_add_switch "switch0" \
                  "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4@eth1"

It's not immediately clear why trunk and stable differ, and the WDR6500 v2 shares its config with quite some other devices.

1 Like

Yes, I downloaded this firmware just from the links u attached above.

So, can I redefine the ports through some config file?

Yes, I downloaded the firmware from the links u attached.

can't reply in forum, dunno why, sorry.

I can't comment on whether the 02_network file gets included in the firmware images as-is or is used to program some settings into the binary firmware (I suspect it is the latter). In the first case you could just edit that file, in the latter case you need to recompile.

You can edit /etc/board.json and add an "index": 123 property to the items in the ports array to renumber the internal to external ports. LuCI will use this info to display the ports in the right order.

1 Like

Out of curiosity, did the configuration in your screenshot route traffic correctly (as the CPU port must be tagged and in the screenshot, the tagging would occur on LAN 4 instead of eth1)?

On routers like this one that have a separate CPU port hardwired to the WAN port, the default switch configuration is usually everything untagged. All the LAN ports work the same and are simply switched to the other CPU port. There is no need for the switch to do anything to achieve a stock-like setup where the only separation is WAN vs LAN.

1 Like

thx @jow
redefine the ports in /etc/board.json then it looks correct.