I dont think it’s just luci limitation: swconfig dev switch0 help | grep cpu switch0: 10.mvsw61xx(MV88E6176), ports: 7 (cpu @ 5), vlans: 64
as in 1. the CPU is always @5 doesnt matter how you will set untagged flow on switch. So my question is where the (cpu @ 5) is coming from - switch config or CPU config
There in the examples you can find only one CPU port. So maybe it’s a limitation of swconfig. I still think it doesn’t matter which port is named CPU. It’s just naming. Port 5/6 are connected to eth0/2 and that’s all that matters… When you install vanilla OpenWRT on TO only eth0 can be used. It think this is typical for OpenWRT and TO’s design is very unique. I think TurrisOS has some patches so that eth0/2 both can be used… But still only Port5 is named CPU
And that’s the point I think. So if there is no difference between ports (5 and 6) then where to choose which port will be linked to cpu?
I think I start to understand why just one port can be linked to CPU as “CPU port”.
In MikroTik it is similar: by default all flow goes directly to CPU over switch. If you want enable switch function then you must choose switch “master port” on switch and connect other switch ports to it. It can be always just one “master port” linked to CPU. So to reproduce Omnia setup on MT you can have eth1 as master port, eth2+eth3+eth4 as slaves of eth1 and eth5 out of this switch port group. By this setup there are two ports connected to CPU (eth1 and eth5). Then traffic is isloated between groups on switch but is connected on CPU bridge. At this point it is similar to Omnia setup. The only difference is that on MT you can choose which port will be switch CPU port.
So in Omnia case the RJ45 is not “soldered” directly to eth2 but to switch which gives you freedom to choose other RJ45 to be linked to eth2 but over the switch.
In theory if switch would have 9 ports then WAN RJ45 could be linked to eth1 over switch too.
The only difference I can see is that on Omnia I cannot choose switch CPU port but (or maybe I can but I don’t know how).
It all depends on how you set it up… The switch chip is just a dumb Layer 2 Switch. Just some MAC-Adress-Tables and internal VLAN-routing, that’s all. All ports of it are equal I think. How they are handeled is definded by config. CPU (SOC) is just a network device which is connected to the switch via 2(!) lines, that’s it.
I know. I was asking why just one port is tagged as CPU port and not both of them (5 and 6) and if it can be configured somehow to have both tagged as “CPU port” or how to configure/choose which of them will be “CPU port”. Because tagging is currently not working on port6/eth2.
There is hope for improvement with the upcoming TOS4.x, perhaps also that OpenWRT is close to releasing their next branch 19.01 with kernel 4.14 (4.19 perhaps in autumn).
Unfortunately the 2nd CPU is not working in the current TO 4.HBD state. But what I have seen is that at least the lan ports getting their own configurable ifaces and thus potentially allow for better tuning/fine graining of the switch.
Thanks for great discussion @protree@anon50890781.
Just one more question:
what means option reset '1' in config switch section?.
I can’t google it anywhere…
With this config we configure a switch with name switch0, enable vlan support on this switch and reset device.
I would have thought that the option thus is effecting whether swconfig dev switch0 set reset bears fruit (reset ‘1’) or does not (reset ‘0’). However having tested it there was no difference and with either setting the switch settings got reset and the reset state thus survives a reboot.
Hence either it is a bug that it does not make a difference or the setting has another meaning.
Maybe it is a misconception on my end but I would have thought that clients connected to different vlans on the switch would not be able to communicate with each other, being a security feature (management vlan) and as otherwise common in switch hardware. Instead clients on different vlan ids and even with different subnets are able to ping each other.
This happens either way with port 5 / 6 tagged or not.
The aforementioned links to the vlan config or OWRT documentation or the chip (Marvell 88E6176-TFJ2) documentation don’t really say.
How is VLAN segregation achieved on the switch as opposed through firewall zones?
Did a traceroute? I’m pretty sure they can ping each other over Layer 3 (routed). Routes are created automatically by OpenWRT (see output of route). Each Subnet (LuCi Interface) need its own firewall zone. Then you can define how forwarding should be handled.