Community discussions

MikroTik App
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Help with config

Wed Oct 12, 2016 10:21 pm

Who can help me with the following (simple) config:

- RB941-2nD acting as a switch (no wireless, no routing)
- port 2 is the input port: untagged traffic + tagged VLAN200 traffic
- this traffic should be split up: untagged traffic to port 3, and VLAN200 traffic (but now untagged) to port 4

I tried and tried... can't get it to work...

HELP, from a beginner :-)

Thanks!
 
alger
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Tue Dec 19, 2006 12:35 pm
Location: Russia
Contact:

Re: Help with config

Thu Oct 13, 2016 2:46 pm

I think you can make two bridges, and the first to combine untaged & port 3, the second vlan200 & port 4
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Re: Help with config

Sat Oct 15, 2016 1:33 pm

Thanks,it worked, with this config:
/interface bridge
add name=bridge-guest
add name=bridge-main

/interface vlan
add interface=ether2 mac-address=xx:xx:xx:xx:xx:xx name=vlan200-P2 vlan-id=200

/interface bridge port
add bridge=bridge-main interface=ether2
add bridge=bridge-main interface=ether3
add bridge=bridge-guest interface=vlan200-P2
add bridge=bridge-guest interface=ether4
But, how can I do this using the switch chip?

Thanks!
 
magchiel
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Jan 06, 2014 2:13 pm

Re: Help with config

Sat Oct 15, 2016 2:23 pm

Try
/interface ethernet
set ether3 master-port=ether2
set ether4 master-port=ether2

/interface ethernet switch vlan
add vlan-id=1 switch=switch1 ports=ether2,ether3
add vlan-id=200 switch=switch1 ports=ether2,ether4

/interface ethernet switch port
set ether2 vlan-mode=secure default-vlan-id=1
set ether3 vlan-mode=secure default-vlan-id=1
set ether4 vlan-mode=secure default-vlan-id=200
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Re: Help with config

Sat Oct 15, 2016 8:06 pm

I'm sorry, but this doesn't work...
 
magchiel
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Jan 06, 2014 2:13 pm

Re: Help with config

Sun Oct 16, 2016 10:03 am

Sorry, I'm doing this from memory as I currently have no switch-based VLANs running on my routers and have no spare hardware I can test with, so bear with me here.
I went through exports of my old configuration where I did use switch based VLAN and found I had explicitly set the vlan-header attribute (RB1100AHx2, different chip but it should work on yours as well).

I used 'vlan-header=always-strip' on access ports. On the the trunk port I used 'vlan-header=add-if-missing' but I believe you should be tagging it as a hybrid by using by using 'vlan-header=leave-as-is'.

So try
/interface ethernet
set ether3 master-port=ether2
set ether4 master-port=ether2

/interface ethernet switch vlan
add vlan-id=1 switch=switch1 ports=ether2,ether3
add vlan-id=200 switch=switch1 ports=ether2,ether4

/interface ethernet switch port
set ether2 vlan-mode=secure default-vlan-id=1 vlan-header=leave-as-is
set ether3 vlan-mode=secure default-vlan-id=1 vlan-header=always-strip
set ether4 vlan-mode=secure default-vlan-id=200 vlan-header=always-strip
EDIT:

Reading the Wiki more closely, http://wiki.mikrotik.com/wiki/Manual:Sw ... d_Ports.29 states:
VLAN Hybrid ports which can forward both tagged and untagged traffic are supported only by some Gigabit switch chips (QCA8337, AR8327)
Your RB941-2nD uses the AR8227, so according to this information, it can't do hybrid ports.
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Re: Help with config

Mon Oct 17, 2016 9:50 pm

OK, thanks for the info!

So, if all traffic would be tagged (*), it would be possible? Does Hybrid means tag+untagged, or also tag1+tag2 ?

(*) say all currently untagged traffic would be VLAN100 (so port 2 = VLAN100+VLAN200, port 3=VLAN100 untagged, port 4=VLAN200 untagged)
 
magchiel
Member Candidate
Member Candidate
Posts: 131
Joined: Mon Jan 06, 2014 2:13 pm

Re: Help with config

Wed Oct 19, 2016 7:36 pm

No, all tagged traffic would be 'trunk' and should work. 'vlan-header=add-if-missing' should sort that for you (on your model anyway; on Gbit models apparently this attribute is ignored when 'vlan-mode=secure' is used and all traffic is treated as 'vlan-header=leave-as-is').

Who is online

Users browsing this forum: Syn and 51 guests