Community discussions

MikroTik App
 
ashpri
Member Candidate
Member Candidate
Topic Author
Posts: 154
Joined: Sun Oct 14, 2018 3:11 am

Switch Chip VLAN Setting Question (HAPAC2)

Wed Mar 24, 2021 1:48 pm

Port 1-4 = Trunk Port
Port 5 = Access Port (VL10)

---------

/interface ethernet switch port
set 0 vlan-mode=secure
set 1 vlan-mode=secure
set 2 vlan-mode=secure
set 3 vlan-mode=secure
set 4 default-vlan-id=10 vlan-header=always-strip vlan-mode=secure
set 5 vlan-mode=secure


Is A or B correct: (or are they in effect the same, as eth5 is set to strip header above)

A:
/interface ethernet switch vlan
add independent-learning=yes ports=ether1,ether2,ether3,ether4,ether5,switch1-cpu switch=switch1 vlan-id=1
add independent-learning=yes ports=ether1,ether2,ether3,ether4,ether5 switch=switch1 vlan-id=10
add independent-learning=yes ports=ether1,ether2,ether3,ether4,ether5 switch=switch1 vlan-id=20

B:
/interface ethernet switch vlan
add independent-learning=yes ports=ether1,ether2,ether3,ether4,switch1-cpu switch=switch1 vlan-id=1
add independent-learning=yes ports=ether1,ether2,ether3,ether4,ether5 switch=switch1 vlan-id=10
add independent-learning=yes ports=ether1,ether2,ether3,ether4 switch=switch1 vlan-id=20
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19322
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Switch Chip VLAN Setting Question (HAPAC2)

Wed Mar 24, 2021 2:52 pm

 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11587
Joined: Thu Mar 03, 2016 10:23 pm

Re: Switch Chip VLAN Setting Question (HAPAC2)

Wed Mar 24, 2021 3:06 pm

Case A (ether5 member of VLANs 1, 01 and 20) doesn't make much sense since ether5 port is set to untag everything on egress and can only tag untagged frames with single default-vlan-id on ingress.
 
ashpri
Member Candidate
Member Candidate
Topic Author
Posts: 154
Joined: Sun Oct 14, 2018 3:11 am

Re: Switch Chip VLAN Setting Question (HAPAC2)

Wed Mar 24, 2021 3:44 pm


Thank you, I watched this. He uses option B.

Case A (ether5 member of VLANs 1, 01 and 20) doesn't make much sense since ether5 port is set to untag everything on egress and can only tag untagged frames with single default-vlan-id on ingress.

This is the crux of my question. If in practice there is no difference (even though A does not make sense), then I would rather use A. Why? Time efficiency. When it comes to making changes, I can leave the vlan table alone and make changes only in the port settings.

If my logic makes sense.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11587
Joined: Thu Mar 03, 2016 10:23 pm

Re: Switch Chip VLAN Setting Question (HAPAC2)

Wed Mar 24, 2021 4:35 pm

If in practice there is no difference (even though A does not make sense), then I would rather use A.
I didn't say there was no difference. In case A traffic from other VLANs will bleed through ether5 (broadcasts, multicasts and some unicast packets if switch won't know exact egress port for dst MAC address, ...). It goes against the gist of setting vlan-mode=secure ... Even more so if you don't set independent-learning=yes on all switch ports.
 
ashpri
Member Candidate
Member Candidate
Topic Author
Posts: 154
Joined: Sun Oct 14, 2018 3:11 am

Re: Switch Chip VLAN Setting Question (HAPAC2)

Thu Mar 25, 2021 1:46 am

I didn't say there was no difference. In case A traffic from other VLANs will bleed through ether5 (broadcasts, multicasts and some unicast packets if switch won't know exact egress port for dst MAC address, ...). It goes against the gist of setting vlan-mode=secure ... Even more so if you don't set independent-learning=yes on all switch ports.

Ah noted. Basically with option A, the access port becomes a hybrid port instead of a native access port. Is this correct?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11587
Joined: Thu Mar 03, 2016 10:23 pm

Re: Switch Chip VLAN Setting Question (HAPAC2)

Thu Mar 25, 2021 7:45 am

I didn't say there was no difference. In case A traffic from other VLANs will bleed through ether5 (broadcasts, multicasts and some unicast packets if switch won't know exact egress port for dst MAC address, ...). It goes against the gist of setting vlan-mode=secure ... Even more so if you don't set independent-learning=yes on all switch ports.

Ah noted. Basically with option A, the access port becomes a hybrid port instead of a native access port. Is this correct?

No, hybrid port means it is member of one VLAN where frames on the outer side (i.e. on the wire) are untagged, and one or more VLAN where frames on outer side are tagged.
In case A the port is still access, all frames on outer side will be untagged, but partly hybrid - on ingress it will accept frames tagged with VIDs from the list of vlans. Normally device beyond such port won't be able to normally communicate bi-directionally with other devices from "non-native" VLAN (because normal NIC driver will do the ingress filtering), but there are still some frames which will bleed this way or another.

Who is online

Users browsing this forum: Bing [Bot], scoobyn8 and 47 guests