Community discussions

MikroTik App
 
fusa
just joined
Topic Author
Posts: 15
Joined: Wed Jun 06, 2012 5:12 am
Location: Belgium
Contact:

CRS VLAN tagged / untagged (trunk)

Thu Nov 07, 2013 8:19 pm

Hello,

There is not a lot of CRS documentation.
I've tried next setup with other managed switches, and this is easy as tagging , untagging....

Also, I don't want this traffic passing the CPU... So Switch mode.

Image

Setup:
VLAN 400 = private network - no internet
VLAN 0 (default) = internet

Left switch:
Ether2 = trunk (default vlan 0 and vlan 400) - tagged
Ether7 = vlan 0 (default)
Ether8 = vlan 400 - untagged

Right switch:
Ether2 = trunk (default vlan 0 and vlan 400) - tagged
Ether7 = vlan 0 (default)
Ether8 = vlan 400 - untagged

Router:
This device has internet access on the default vlan (0). One interface created with vlan 400 to pass the traffic between the left and the right switch.

Does anyone has an idea to create such a simple setup?

Thank you,
 
CTrain
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Thu Nov 07, 2013 4:41 am

Re: CRS VLAN tagged / untagged (trunk)

Fri Nov 08, 2013 2:57 am

Left Switch First

So first you must create a switch of ports you can add all the switches ports here
/interface ethernet
set ether7 master-port=ether2
set ether8 master-port=ether2
Tag Traffic
/interface ethernet switch ingress-vlan-translation
add port=ether8 customer-vid=0 new-customer-vid=400
Untag Traffic
/interface ethernet switch ingress-vlan-translation
add port=ether2 customer-vid=400 new-customer-vid=0
Now Right Hand Side switch

Ports for Wirespeed switching
/interface ethernet
set ether7 master-port=ether2
set ether8 master-port=ether2
Tag Traffic
/interface ethernet switch ingress-vlan-translation
add port=ether8 customer-vid=0 new-customer-vid=400
Untag Traffic
/interface ethernet switch ingress-vlan-translation
add port=ether2 customer-vid=400 new-customer-vid=0
As VLAN0 is the default you should not have to do any tags

See for more information
http://wiki.mikrotik.com/wiki/Manual:CRS_examples

Let me know if this works.
 
fusa
just joined
Topic Author
Posts: 15
Joined: Wed Jun 06, 2012 5:12 am
Location: Belgium
Contact:

Re: CRS VLAN tagged / untagged (trunk)

Fri Nov 08, 2013 3:53 am

Thank you, that did the trick.

So tagged traffic (trunk)
 /interface ethernet switch ingress-vlan-translation
 add port=ether8 customer-vid=400 new-customer-vid=0
and for untagged traffic (access)
 /interface ethernet switch ingress-vlan-translation
 add port=ether2 customer-vid=0 new-customer-vid=400
 
kitt1977
just joined
Posts: 3
Joined: Mon Nov 11, 2013 4:32 pm

Re: CRS VLAN tagged / untagged (trunk)

Mon Nov 11, 2013 5:08 pm

I tryed a similar setup ..

http://i.imgur.com/TPXOkUH.png

My tagged vlans are working fine , but can't seem get access port working ...

I want ether8 in vlan81 instead of default vlan0 ...

When i put a device in ether8 with dhcp it gets a lease from the default vlan0 .. instead of vlan81 ( dhcp on other routerboard ) .

with vlan aware setup no problems ( esxi server on port 23 all vlans working fine when defined in VSwitch of Esxi )

I tryed with the ingress rules .. but this seems to give strange behaviour .. i connected another routerboard ( rb433 ) on port 8 with dhcpclient .

I random get a lease from VLAN0 / VLAN81 ( it flaps betweend 2 vlans ) .


http://i.imgur.com/AOGTrEv.png

For now i temporily fixed it by putting vlan81 in to a bridge and removing ether8 from switch and put it in the bridge .
 
CTrain
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Thu Nov 07, 2013 4:41 am

Re: CRS VLAN tagged / untagged (trunk)

Wed Nov 20, 2013 11:55 am

In your first image, the bottom left corner ether8 is receiving traffic from the computer with VLAN ID 0 and not altering the VLAN ID, it should be configured such that the Customer VID = 0 and New Customer VID = 81, if you are working on another router board connected to ether8 the VLANs should be configured on it for best practice.

ros code

/interface ethernet switch ingress-vlan-translation
add port=ether8 customer-vid=0 new-customer-vid=81
The post by fusa thanking me, had the tagging and untaging confused

Let me know if this doesn't work
 
Gr0ove
just joined
Posts: 20
Joined: Thu Apr 03, 2014 6:58 pm

Re: CRS VLAN tagged / untagged (trunk)

Tue Sep 16, 2014 6:49 pm

I'm a bit confused here...

So, to make a port untagged/access is, for example:
/interface ethernet switch ingress-vlan-translation
add ports=ether6 customer-vid=0 new-customer-vid=200 sa-learning=yes
And to make a port tagged/trunk for it to have multiple vlan tagging is, for example:
/interface ethernet switch ingress-vlan-translation
add ports=ether10 customer-vid=200 new-customer-vid=0 sa-learning=yes
add ports=ether10 customer-vid=300 new-customer-vid=0 sa-learning=yes
add ports=ether10 customer-vid=400 new-customer-vid=0 sa-learning=yes
Is this it?

Because has I saw it here, to configure a tagged port with multiple vlan's, it's done in other way:
/interface ethernet switch egress-vlan-tag
add tagged-ports=ether2,ether7,ether8 vlan-id=200
add tagged-ports=ether2,ether6,ether8 vlan-id=300
add tagged-ports=ether2,ether6,ether7 vlan-id=400
What a mess this CRS's are...

Thanks
 
raymonvdm
Member Candidate
Member Candidate
Posts: 155
Joined: Mon Jan 31, 2005 7:47 pm

Re: CRS VLAN tagged / untagged (trunk)

Tue Jun 30, 2015 11:55 pm

Is there also a way to tag all untagged traffic with a vlan tag (110) and to let tagged traffic be passed (4 and 15) arround the ingress translation. The ingress translation is now tagging all traffic and not only untagged

I want to achieve a access vlan (untagged) and voice vlan (tagged) like cisco style

Ingress Translation
Ports: ether08
Service VLAN Lookup for ANY
Customer VLAN Lookup for ANY
New Customer VID: 110

Does not let VLAN4 be passed tagged,
 
kraic
Frequent Visitor
Frequent Visitor
Posts: 76
Joined: Tue Oct 19, 2010 10:31 am
Location: Croatia
Contact:

Re: CRS VLAN tagged / untagged (trunk)

Sun Aug 20, 2017 2:21 pm

I'm trying to set up next thing. On UBNT Gateway I created 2 LAN networks 192.168.1.0/24 with VLAN ID=1 and 192.168.2.0/24 with VLAN ID=2. Final destination are 20 devices of UniFi. Between these devices I have CRS212 and CRS226 connected with optic cabel. Direct connection of Ubnt GW and UniFi works nice.

I tried to use this: https://wiki.mikrotik.com/wiki/Manual:C ... 8Q-in-Q.29
using settings for CR1 and CR3. I can't get my VLAN ID=1 and VLAN ID=2 to get trought this.
Can somebody explain a little bit about VLAN tunneling for my case. Becouse I don't know where is my mistake.
I didn't put any IP addresses on VLANs. Should I ?
Untagged traffic is going nice, but tagged not

Who is online

Users browsing this forum: Google [Bot] and 156 guests