Hi there,
I'm still trying to figure out how to correctly set up VLANs in RouterOS. I did a project last year ago where I basically followed this tutorial (https://administrator.de/tutorial/mikro ... 67186.html), but with a less detailed configuration, as routing and administration from every VLAN wasn't necessary.
I started from the standard configuration of the two CRS328-24P-4S+RM in the setup. Goal was to have Ports 1-16 in the native VLAN 1 (untagged on my trunk ports SFP1 + SFP2) and ports 17-24 in VLAN 100 (tagged on trunks).
So the only thing I did was to set up the PVIDs of the ethernet interfaces in bridge port settings, assigned the SFP ports as "tagged" to the VLAN 100 under Bridge -> VLANs and enabled Bridge VLAN filtering. Management IP still assigned to the bridge. Bridge itself was an untagged member of VLAN 1. That's it. This worked as expected. Web interface was reachable only from VLAN 1, also as expected.
I didn't create any VLANs under "Interfaces".
Now, we have a new project were a colleague of mine started to setup VLANs, also following the tutorial more strictly, including setting up the VLAN interfaces, but ended up locking himself out from WebFig (IPs not reachable anymore).
So I took a deeper look at what's the idea behind the method of the tutorial, tried some things out and it got more and more confusing for me. Seems I had a bit of luck that my setup in the other projekt even worked correctly.
At the moment I have a CRS112-8G-4S-IN in my test setup.
What I tried to achieve: Ports 1-4 VLAN1, Ports 5-6 VLAN2, Ports 7-8 Trunk with VLAN1 untagged and VLAN2 tagged BUT management interface reachable from both VLANs.
So here comes the first thing which confuses me: What exactly is the purpose of the interfaces "vlan1" and "vlan2" that I have to create? Does this really have something to do with the actual terminus "VLAN" as a virtual network consisting of logical ports, or is this just a virtual internal interface (like a virtual ethernet port) that I create to be able to assign a management IP to it and add it to a bridge? I believe the latter, but what confused me here is that the interface itself already gets set a VLAN ID on creation. Other ports get the PVID set up when added as a bridge port, which seems absolutely logically to me. Also, why is there a drop down menu where I assign the "vlan" to an interface, when it is handled as an interface itself and added to a bridge in a later step, like the ethernet ports? What exactly do I set with this? Maybe VLAN ID has not the same purpose as PVID?
I assigned one managment IP to vlan1 and another to vlan2. That's the next point where I get lost. Do I need to add everything as tagged under "Bridge -> VLANs"? Shouldn't it also work if I assign vlan1 and the bridge itself as untagged members of VLAN 1? In my understanding, this is the obvious way to handle it as the native VLAN.
Does the vlan-adapter itself add a vlan tag, even if it is an untagged member (I hope you understand what confuses me here)?
I tried several constellations and never was able to reach the switch from every port under the expected IPs corresponding to the VLANs. But I will try this another time from scratch.
As it didn't work as expected with the management IPs bound to vlan1 and vlan2, i tried to recreate the configuration from my other project, but with a second IP that was assigned directly to ethernet5 which has the PVID 100. Again I didn't create any vlan interfaces. Bridge has PVID 1 and is an untagged member of VLAN1. As expected, the management IP assigned to the bridge wasn't reachable from ethernet5. But neither was the address assigned directly to ethernet5. Both were reachable from the ports that had the same PVID as the bridge! How is this possible? Because ethernet5 is also a member of the bridge? So the PVID is ignored here when the management IP is bound to any port that is a bridge member?
I know by myself that I have massive problems of understanding how all of this is handled in RouterOS, but still looking for the best tutorial which explains the background to get rid of them...