Mismatch between LuCi en CLI

I have this VLAN problem I am trying to solve in another thread and suddenly, I realised I am %?%$ up because whenever I am trying to tag some ports, they are not identified the same way in CLI or LuCI.

How can I solve this ?

Look at this for instance:

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 2 3 4 5'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '1t 6t'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '3'
        option description 'Wifi(110)'
        option pvid '110'
        option ports '0t 2t 6t'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '4'
        option description 'Guests(115)'
        option pvid '115'
        option ports '0t 2t 6t'

vlan 3, according to LuCI, should resolve in : "0t 1t 2t"

How is it that the CLI does not show 1t for both vlan 3 and 4 but instead
shows 6t which is, according to vlan1 and vlan2, the WAN port????

Tis is messed up.

So I guess I will be advised to work solely in CLI so how can I identify which ports are which so I end turning in loops.

On a swconfig machine, the port names map is in /etc/board.json.

Here is part from an Archer A7:

				{
					"num": 0,
					"device": "eth0",
					"need_tag": false,
					"want_untag": false
				},
				{
					"num": 2,
					"role": "lan",
					"index": 1
				},
				{
					"num": 3,
					"role": "lan",
					"index": 2
				},

from that we have switch port 0 = eth0, switch port 2 = lan1, switch port 3=lan2.
Also the device wiki page may have a chart.
The LuCI index numbers are supposed to correspond with the physical writing on the router case and/or port activity LEDs, but they don't always.
If all else fails, use swconfig dev switch0 show to see which ports are up and down as you plug and unplug one of the cables.

1 Like

The CPU is connected to ports 0 (eth1) and 6 (eth0). Your physical ethernet ports are 2 (LAN1), 3 (LAN2).. 5 (LAN4) and WAN1 is port 1.

As an aside, you probably only want each VLAN to be connected to a single port of your CPU (either eth0 or eth1, but not both; typically eth0 in your configuration would be for the WAN, and eth1 would be for your LANs/VLANs.

1 Like

If I am using the device as a WAP only, is it not a waste of one CPU ?

If you're using it as an AP only, the CPU is largely irrelevant. It only factors into the equation when you are routing (which is not the case if it is in dumb AP mode).

@mk24 @psherman

This will help a lot because I was working under the idea that
port 0 was eth1
port 1 est eth 0
port 6 was WAN

That's why I was going in circle.

I should have looked at /etc/config/network right after a fresh install