Community discussions

MikroTik App
 
markdutton
newbie
Topic Author
Posts: 36
Joined: Fri Sep 24, 2010 4:59 am

VLANS and switch ports

Tue Aug 19, 2014 4:00 am

Hello.

I am trying to wrap my head around where I need to actively configure vlan settings on the switch ports.

Most commonly, if I want to create a VLAN trunk to an external switch, I simply create multiple VLAN interfaces and assign them all to the same physical port on the Mikrotik. I end up with a trunk that has a layer 3 interface per VLAN and an untagged interface on the physical port itself. I can do this on a port that is part of an Atheros chipset, or any other. I use this a lot.

Now, say I want to utilise the vlan capability in the switch. In my case, I want to create a slave port which is untagged in one of my vlans so I can plug a non-vlan aware device directly into my router and not an upstream switch.

I will use ether1 as master (and my vlan trunk to the remote switch) and ether2 as slave (and access port to my device) in this case. I will define vlan interfaces 2,3 and 4. Vlan2 will be the vlan I want to supply to ether2 untagged.

I create my vlans and assign them to ether1 as normal. I then go into switch settings and define vlan 2. I assign this vlan to my ether1 and ether2. I then go to the ports tab on the switch and set ether1 to fallback, leave as is and ether2 to secure, always strip, default vlan 2.

This seems to be all I need to do. The other vlans (vlans 3 and 4) seem to travel around the switch OK untouched.

Am I doing this right? Do I need to define all vlans on the switch to match the vlan interfaces I have created?

Mark
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: VLANS and switch ports

Tue Aug 19, 2014 7:51 am

You would also assign those VLANs to the switch's CPU port so that the interface seen by RouterOS can see them.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
markdutton
newbie
Topic Author
Posts: 36
Joined: Fri Sep 24, 2010 4:59 am

Re: VLANS and switch ports

Tue Aug 19, 2014 9:45 am

OK. Thanks for that. So in relation to multiple VLANS. I only need to define a vlan to ports and CPU if I want to manipulate the VLAN as in my example? The other vlans can be left unassigned at the switch level?

It all works fine this way and I have done a million tests, but I don't want to have it break on a future upgrade of firwmare because I am doing it wrong today. It is not that difficult to assign all VLANS to the switch. I can just see it being forgotten somewhere down the track because the vlan config of the switch is not linked in any way to the vlan interfaces.

Who is online

Users browsing this forum: vasilaos and 82 guests