Community discussions

 
Tal
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed Jun 17, 2015 2:17 am

How do Switch VLANs work?

Tue Jul 26, 2016 5:35 pm

I know you can setup VLANs through bridging, but I'm trying to set them up through the switch chip on RouterOS just to figure out how to do it.
When I login to my router through Winbox, under the "Switch" menu, there is a menu for:
  • VLAN
  • VLAN Tagging
  • In VLAN Trans
  • Eg VLAN Trans
Please correct me if I'm wrong, but from what I understand:
  • The VLAN Tagging tab is where you define a trunk by specifying a VLAN ID, and every port where traffic with that VLAN ID gets tagged
  • The In VLAN Trans tab is for ingress traffic. Here, you specify that untagged traffic coming in on port etherX (probably from some end user device) needs to be tagged with some specific VLAN ID so that the router knows what layer 2 network the traffic belongs to
  • The Eg VLAN Trans tab is for egress traffic. Here, you specify that tagged traffic coming from say a trunk is to remove the tag before going out on a particular interface.
This seems to cover the requirements of VLAN tagging. In fact, I was able to create a trunk between my RouterOS device and a Cisco switch with 2 VLANs on it using just the above 3 tabs. I was then able to communicate between devices attached to Cisco switch and devices attached to the RouterOS in the same VLAN, but not across the VLANs, as expected. What does the VLAN tab do then if things can work without it?
Does it replace the above tabs or something?
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: How do Switch VLANs work?

Tue Jul 26, 2016 6:04 pm

VLANs are intended to ISOLATE the traffic for different purposes, appearing on the same cable.
So what you observe is how it should work: with different VLAN tags, only equipment within the ports covered by the same tag can communicate.

When you want communication between VLANs, you need to configure routing.
How this is done depends on the platform (cisco or mikrotik) but it starts with assigning an address within the IP subnet used on that VLAN
to the different VLAN interfaces inside the device where you want that routing to take place.
Then, the surrounding devices also need to know that this address is the gateway to the other VLAN.
So, this normally requires some planning.
 
Tal
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed Jun 17, 2015 2:17 am

Re: How do Switch VLANs work?

Tue Jul 26, 2016 6:18 pm

I mentioned the words "as expected" because not being able to communicate across VLANs was expected.
The example was meant to illustrate that everything WAS working when NOT using the VLAN tab.
The question was what the VLAN tab was for if everything works without it, not how VLANs work.

Thanks for the quick summary though.
 
w0lt
Member
Member
Posts: 484
Joined: Wed Apr 02, 2008 2:12 pm
Location: Minnesota USA

Re: How do Switch VLANs work?

Tue Jul 26, 2016 6:29 pm

Configuring VLAN's seem to be complicated in a way due to the approach Mikrotik has gone when compared with CISCO.  Because of the different "switch chips" that are designed into different RouterBoards, this can be even more confusing.  There has been quite a few write-ups regarding this, with a few web videos and some fairly good documentation when you understand the type of "switch chip" the presentation is focused on.
I have found the "Cloud Core Switch" devices such as the CRS-125 and the CRS-109 to be the most confusing, but when understood, can be very powerful.  now I prefer those.
I have used the following link as a reference on how to configure the "Switch Chips".  There has also been presentations at the last US MUM as well.  I would suggest you take a look to them.

http://www.breekeenbeen.nl/2014/12/11/m ... -bridging/
https://www.youtube.com/watch?v=LoZzt04Ixw0

-tp
MTCNA - 2011

" The Bitterness of Poor Quality Remains Long After the Sweetness of Low Price is Forgotten "

Image
 
Tal
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed Jun 17, 2015 2:17 am

Re: How do Switch VLANs work?

Tue Jul 26, 2016 6:33 pm

I'm dealing with a CRS125 :)
I'll check out those links - thanks.

Who is online

Users browsing this forum: No registered users and 88 guests