Hi,
I want to setup my Mikrotik with secure and efficient VLANs. But there are many ways to setup VLANs. So I have some questions about that.
I suppose my device could best use the /interface bridge vlan method. Since it has hardware offloading. However, there is also /interface ethernet switch to set VLAN (options), but from what I understand from this presentation, that option is for hardware only setups.
The thing I want to setup is the following.
Management and replication: Only locally between the VLAN members (tagged)
Public: Goes to Internet, to host services on, will be using NAT for IPv4 and a subnet for IPv6 (tagged)
Native: Default VLAN that’s untagged and goes to my router and also has Internet, but is just for access, not hosting
So, I’ve setup my VLANs with this.
/interface vlan add interface=br0 name=management vlan-id=11
/interface vlan add interface=br0 name=replication vlan-id=12
/interface vlan add interface=br0 name=public vlan-id=13
/ip address add address=172.27.10.4/24 interface=br0
/ip address add address=172.27.11.1/24 interface=management
/ip address add address=172.27.12.1/24 interface=replication
/ip address add address=172.27.13.1/24 interface=public
/interface bridge vlan add bridge=br0 untagged=ether1,ether2,ether3,ether4,ether5 vlan-ids=10 comment=native
/interface bridge vlan add bridge=br0 tagged=ether2,ether3,ether4,ether5 vlan-ids=11 comment=management
/interface bridge vlan add bridge=br0 tagged=ether2,ether3,ether4,ether5 vlan-ids=12 comment=replication
/interface bridge vlan add bridge=br0 tagged=br0,ether2,ether3,ether4,ether5 vlan-ids=13 comment=public
With these port options:
/interface/bridge/port/print detail
Flags: X - disabled, I - inactive; D - dynamic; H - hw-offload
0 ;;; rp1
interface=ether2 bridge=br0 priority=0x80 path-cost=10 internal-path-cost=10 edge=yes-discover
point-to-point=auto learn=auto horizon=none hw=no auto-isolate=no restricted-role=no restricted-tcn=no
pvid=10 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes
broadcast-flood=yes tag-stacking=no bpdu-guard=yes trusted=no multicast-router=temporary-query fast-leave=no
1 ;;; rp2
interface=ether3 bridge=br0 priority=0x80 path-cost=10 internal-path-cost=10 edge=yes-discover
point-to-point=auto learn=auto horizon=none hw=no auto-isolate=no restricted-role=no restricted-tcn=no
pvid=10 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes
broadcast-flood=yes tag-stacking=no bpdu-guard=yes trusted=no multicast-router=temporary-query fast-leave=no
2 ;;; rp3
interface=ether4 bridge=br0 priority=0x80 path-cost=10 internal-path-cost=10 edge=yes-discover
point-to-point=auto learn=auto horizon=none hw=no auto-isolate=no restricted-role=no restricted-tcn=no
pvid=10 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes
broadcast-flood=yes tag-stacking=no bpdu-guard=yes trusted=no multicast-router=temporary-query fast-leave=no
3 ;;; rp4
interface=ether5 bridge=br0 priority=0x80 path-cost=10 internal-path-cost=10 edge=yes-discover
point-to-point=auto learn=auto horizon=none hw=no auto-isolate=no restricted-role=no restricted-tcn=no
pvid=10 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes
broadcast-flood=yes tag-stacking=no bpdu-guard=yes trusted=no multicast-router=temporary-query fast-leave=no
4 ;;; rt1
interface=ether1 bridge=br0 priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto
learn=auto horizon=none hw=no auto-isolate=no restricted-role=no restricted-tcn=no pvid=10
frame-types=admit-only-untagged-and-priority-tagged ingress-filtering=yes unknown-unicast-flood=yes
unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=yes
multicast-router=temporary-query fast-leave=no
And these bridge settings:
/interface/bridge/print detail
Flags: X - disabled, R - running
0 R name="br0" mtu=auto actual-mtu=1500 l2mtu=1598 arp=enabled arp-timeout=auto mac-address=CC:2D:E0:81:0A:BE protocol-mode=mstp fast-forward=yes igmp-snooping=no auto-mac=no admin-mac=CC:2D:E0:81:0A:BE ageing-time=5m priority=0x8000
max-message-age=20s forward-delay=15s transmit-hold-count=6 region-name="" region-revision=0 max-hops=20 vlan-filtering=yes ether-type=0x8100 pvid=10 frame-types=admit-all ingress-filtering=yes dhcp-snooping=yes
add-dhcp-option82=no
But would it make sense to also mix it with these /interface ethernet switch port settings? Like these to harden the VLAN configuration?
/interface ethernet switch port set ether1 vlan-mode=secure vlan-header=always-strip
/interface ethernet switch port set ether2 vlan-mode=secure
/interface ethernet switch port set ether3 vlan-mode=secure
/interface ethernet switch port set ether4 vlan-mode=secure
/interface ethernet switch port set ether5 vlan-mode=secure
/interface ethernet switch port set sw1-cpu vlan-mode=secure
Or can I just as well use /interface bridge vlan options for this that have a similar or exactly the same?
In any case, I have hardware offloading disabled on my Hex PoE because I’m using a combination of settings which don’t allow me to enable hardware offloading. So that makes me wonder, since hardware offloading is off, can I use /interface ethernet switch port?
So in summary, my questions come down to this.
- Can I mix
/interface ethernet switchand/interface bridge vlanto set VLANs up? Also when hardware offloading is disabled (or will that just make things very slow?). - Is one of these two superior?
- See code block below, I see more VLANs than I’ve configured, such as VLAN 1280, and 0 and 1. How can this be?
# tshark -r dump -e vlan.id -Tfields | sort -u
Running as user "root" and group "root". This could be dangerous.
0
1
11
12
1280
13