Have been reading endless sources about how VLAN is configured and so on but still don’t get it what happens when. UPDATED ON 12.Arp2021
INgress and Egress at Port, Bridge → Ports → Bridge Port → VLAN PVID (priority tagged not specifically considered):
UNtagged traffic INCOMING:
1. frame-types=admit all & ingress filtering=off.
VLAN tagging is added according to PVID, traffic goes in.
2. frame-types=admit only VLAN tagged all & Ingress Filtering=off
dropped, because no VLAN tag in traffic
3. frame-types=admit only untagged and priority tagged & Ingress Filtering=off
The VLAN tag is added according to the PVID, traffic goes in.
4. frame-types=any & Ingress Filtering=ON
The above rules are applied, subsequently, it is checked whether the VLAN ID is stored as a rule in the egress, VLAN filter (see below), means whether this VLAN ID is available on this port. If so, traffic is leaving the bridge otherwise traffic is dropped.
tagged traffic INCOMING:
1. frame-types=admit all & Ingress Filtering=off
the VLAN tag is read but not changed, traffic goes in.
2. frame-types=admit only VLAN tagged all & Ingress Filtering=off
the VLAN tagging is read but not changed, traffic goes in.
3. frame-types=admit only untagged and priority tagged & Ingress Filtering=off
dropped, because VLAN tag is present
4. frame-types=any & Ingress Filtering=ON
The above rules are applied, then it is checked whether the VLAN ID is stored as a rule in the egress, VLAN filter (see below), port is allowed. If so, traffic goes in, otherwise dropped (same as in 1.A.iv)
UNtagged traffic OUTGOING (e.g origins from CPU Port/Bridge):
The VLAN-Tag/ID is added according to the PVID, the traffic leaves the devices
Tagged traffic OUTGOING
1. VLAN ID and PVID are not identical:
traffic remains unchanged, the traffic leaves the devices
2. VLAN ID and PVID are identical:
the VLAN ID is removed from the traffic, the traffic leaves the devices
egress at the bridge, Bridge → VLAN → Bridge VLAN:
Untagged traffic outgoing: traffic dropped. This does not exist because default VLAN1 is assigned if it has no VLAN tag, by the ingress rule above. This results in other implications when I read through Wiki etc., that then becomes too much here (?)
tagged traffic outgoing, VLAN ID is checked:
1. There is no filter rule for this VLAN ID: traffic dropped
2. Rule for VLAN ID exists:
Port, where traffic occurs, is listed as Tagged: VLAN ID is not changed
Port, where traffic occurs, is listed as untagged: VLAN ID is removed
Port, where traffic occurs, is not listed: traffic dropped
any help around this mystery will be greatly appreciated
Stefan
I have read that one before I created this topic.
I’m clear with the first posts but then broadens the topic, what is could but you losing the overview.
ingress and egress are mentioned several times but there is not a clear and simple overview of what actually happens there.
So any simple confirmation or correction of my bullet point list would be appreciated.
not currently, just trying to understand what is happening on the bridge
IMHO it is not the same question, this refers to ingress and egress rules the other one refers to what is shown in the GUI, which is something different.
I admit it all goes under the VLAN umbrella but there is so much that simply could be done the same way, but if you are seeking an answer to very specific detail, it will get easily lost in all the other post.
I’m hoping I giving some delighting to others as well, by keeping thins split as it makes easier to be found again.
Yes, your asumptions are correct. However there’s more to it, there are two more ingress settings which affect the way frames are treated on ingress:
frame-types … this sets ingress filter which then (according to settings) drops certain frames. If e.g. frame-types=admit-only-vlan-tagged frames without VLAN tags are dropped.
ingress-filtering … if set, only frames belonging to VLANs set in egress table are allowed on ingress. If this is not set (but frame-types is set as in previous bullet), any tagged frame will be allowed on ingress. If this is set, then only frames with VIDs allowed for egress will pass on ingress.
N.b. untagged frames are affected by this rule as well, seems like PVID is applied first, ingress filtering is done later.
It is not exactly clear whether any untagged frame is actually passing bridge when vlan-filtering=yes, I like to think only tagged frames live on bridge (and here the implicit MT default of PVID=1 on all bridge ports kicks in). So rule #1 doesn’t apply at all.
The rest seems quite right to me.
What beats me is that in Cisco world there are two names for frames without 802.1q headers: untagged VLANs and native VLANs. I’m not fluent in ciscoish so I guess that there can only be single native VLAN per switch/stack/CDP domain while every untagged VLAN port can belong to different VLAN. To me concept of native VLAN (as opposed to hybrid ports in MT world) is total nonsense.
I tend to avoid Cisco stuff, my understanding (which may be incorrect) for their interfaces is:
Access ports are untagged.
Trunk ports with no native VLAN are tagged only.
Trunk ports with a native VLAN are hybrid, you can have a differing native VLANs on different interfaces.
Both Cisco and Mikrotik VLAN configuration and naming schemes are confusing compared to those used by HP…
looks like that I need to update my OP once again.
Recently I have learned that PVID acts on outgoing and incoming traffic, which means this will be added as rules:
UNtagged traffic EGRESS (e.g origins from CPU Port/Bridge):
The VLAN-Tag/ID is added according to the PVID, the traffic leaves the devices
Tagged traffic EGRESS
VLAN ID and PVID are not identical:
traffic remains unchanged, the traffic leaves the devices
VLAN ID and PVID are identical:
the VLAN ID is removed from the traffic, the traffic leaves the devices
Not really. What you’re missing is that bridge has two or three personalities (depends how you count). When you consider those personalities separately, you don’t have to change your explanation. This topic explains bridge and its personalities nicely.
but it does not tell you that the PVID setting is acting on ingress and egress. This caused, at least to me, some confusion due to how WinBox shows tagged/untagged in the Bridge VLAN overview, as described here Why is there “Current Tag” & “Current Untagged” in each VLAN.
At least that solved my mystery (still need to post that in the other topic).
As a beginner, I would love to see this mentioned somewhere. I’m open to suggestion on how to structure the rule-set otherwise :).
IMO you already covered this case under 2.B.ii.b … because when bridge interface has PVID set (and it always has it set, if not other the hidden default PVID=1), again all frames pass bridge the switch like entity tagged. As soon as frame enters bridge (the switch-like …), it doesn’t matter through which port it entered (apart from the rule that frame never egresses the same port it ingressed, but that doesn’t relate to VLANs specifically).
Setting PVID on bridge port adds that port as untagged to the egress list of VLANs. Which means PVID itself doesn’t affect egress behaviour.
ok got it but I said Bridge → VLAN → Bridge VLAN by splitting in 1. … Bridge → Ports → Bridge Port → VLAN PVID and 2. Bridge → VLAN → Bridge VLAN tells a novice that both settings have a influence how things are shown in the GUI.
This cost me a lot of headaches.
I will try to have your words added to the OP (but don’t know yet how).
I can only agree that bridge in MT world is a mess because it’s not explicitly clear which settings are about bridge (the switch-like stuff) and which settings are about bridge (the interface). It’s confusing and hence the article by @sindy (it took some time for all of us to find out all of the dark corners).
But then, if you explicitly consider bridge as a port, and think of settings related to it the same way as settings related to other member ports, then you don’t need any more explanations other than those already present in your OP.