Community discussions

MikroTik App
 
sorehead
just joined
Topic Author
Posts: 8
Joined: Mon Nov 21, 2005 2:41 pm
Location: Latvia

[Solved] Trunk ports and vlan routing

Tue Aug 09, 2011 2:40 pm

Hi!

I have two Mikrotik routerboards MT750GL (5 port) with routerOS 5.6. I am trying to pass trunk (vlan10 and vlan11) between two Mikrotik routerboards MT750GL.

To better explain what I'm trying to achieve, i've configured my two Cisco switches for the exact task. Is there anyone who could write this configuration for MT RouterOS? Thanks!
vlan 10
 name vlan_10
!
vlan 11
 name vlan_11
!
interface FastEthernet0/1
 description trunk_port
 switchport trunk native vlan 10
 switchport trunk allowed vlan 10,11
 switchport mode trunk
!
interface FastEthernet0/2
 description vlan10_port
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/3
 description vlan11_port
 switchport access vlan 11
 switchport mode access
!
interface Vlan10
 description mgmnt-ip
 ip address 192.168.10.10 255.255.255.0
 no ip route-cache
!
ip default-gateway 192.168.10.254
You do not have the required permissions to view the files attached to this post.
Last edited by sorehead on Tue Oct 27, 2015 12:46 pm, edited 1 time in total.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Trunk ports and vlan routing

Tue Aug 09, 2011 5:15 pm

Why are you trying to use routers to do the work of switches? RouterBOARDs make rather poor switches. Use one router with the following configuration:
/interface vlan
add disabled=no interface=ether1 name=vlan10 vlan-id=10
add disabled=no interface=ether1 name=vlan11 vlan-id=11
/ip address
add address=192.168.10.1/24 interface=vlan10
add address=192.168.11.1/24 interface=vlan11
And connect ether1 to a Cisco switch port configured as a trunk. The router will route between VLANs on a stick and do what it's good at, and the Cisco switch will switch traffic, doing what it's good at. If you don't want to use a Cisco switch you can use an RB250GS, which is also a switch. I definitely wouldn't use two routers. You'd have to bridge things in software, which is just ugly.
 
User avatar
dasiu
Trainer
Trainer
Posts: 231
Joined: Fri Jan 30, 2009 11:41 am
Location: Reading, UK
Contact:

Re: Trunk ports and vlan routing

Wed Aug 10, 2011 3:24 am

1. By using MikroTik bridging - it is simple, but the trunk must not have a native vlan - all should be tagged. And - the worst part - it consumes CPU and the bandwidth will be low - wasting the gigabit ports. Then:
/interface vlan add name=ether1vlan10 interface=ether1 vlan-id=10
/interface bridge add name=vlan10
/interface bridge port add bridge=vlan10 interface=ether1vlan10
/interface bridge port add bridge=vlan10 interface=ether2
/interface vlan add name=ether1vlan11 interface=ether1 vlan-id=11
/interface bridge add name=vlan11
/interface bridge port add bridge=vlan10 interface=ether1vlan11
/interface bridge port add bridge=vlan10 interface=ether3
/ip address add address=192.168.10.10/24 interface=vlan10
/ip route add gateway=192.168.10.254
The only difference is that both vlans are tagged on the trunk link.

2. I wish I had a 750GL to play with... See http://wiki.mikrotik.com/wiki/Manual:Sw ... p_Features - I think that Atheros8327 switch chip in 750GL is better than 8316 - and will allow you to do everything... And using it - you could have the trunk working without using CPU (with wire speed) :). See the example on wiki - and if You would like to have a native vlan on the trunk link - you should modify it a bit (not to tag certain frames).
Having a router IP configured in the vlan could be more problematic (setting copy-to-cpu in proper "rules", I think...) - so I can't help with this without having a playground to test :). But I think it would be the best solution when configured properly.
If you don't want to use a Cisco switch you can use an RB250GS, which is also a switch. I definitely wouldn't use two routers. You'd have to bridge things in software, which is just ugly.
I think that's why MikroTik makes routerboards with those funny switching chips - not to bridge in software, and not to need another device :).
 
sorehead
just joined
Topic Author
Posts: 8
Joined: Mon Nov 21, 2005 2:41 pm
Location: Latvia

Re: Trunk ports and vlan routing

Wed Aug 10, 2011 10:25 pm

Thanks for your comments. I totally agree with you both, everyone should use dedicated switch instead of MT RB for such task. I just wanted to know, if MT RB could be used for such tasks, where data TX/RX rates are not high and simple VLAN solution needed.

dasiu, i tried your suggested solution and it works like a charm! Although I found a slight typo in your sample code (as far as I understand).
/interface bridge port add bridge=vlan10 interface=ether1vlan11
/interface bridge port add bridge=vlan10 interface=ether3
Interfaces "ether1vlan11" and "ether3" should have been added to bridge "vlan11".

Thanks! :)
 
User avatar
dasiu
Trainer
Trainer
Posts: 231
Joined: Fri Jan 30, 2009 11:41 am
Location: Reading, UK
Contact:

Re: Trunk ports and vlan routing

Wed Aug 10, 2011 10:52 pm

dasiu, i tried your suggested solution and it works like a charm! Although I found a slight typo in your sample code (as far as I understand).
Yeah, exactly - your understanding is absolutely correct! I just went easy and copy-pasted the vlan10 and changed interface - but forgot to change this (yeah, it was late night) :).
And thx for my first karma ;).
And I DON'T agree, that everyone should use dedicated switch, when MikroTik puts those switching Atheros 8316 and 8327 chipsets. They allow you to switch and translate many vlans without using CPU - so that you don't need a separate switch :). Only software bridging is bad (and slowing down the RB).
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Trunk ports and vlan routing

Wed Aug 10, 2011 11:24 pm

And yet he's bridging in software now.

Use the switch chip when it works for you, sure. It's just severely limited in what it can do with VLANs. For an example, see: http://forum.mikrotik.com/viewtopic.php?f=17&t=45721
 
jerryroy1
Member Candidate
Member Candidate
Posts: 168
Joined: Sat Mar 17, 2007 4:55 am
Location: LA and OC USA
Contact:

Re: Trunk ports and vlan routing

Tue May 07, 2013 1:34 am

OK, So how do I enable the 750 to use the switch chip? I have a Cisco 1811 router that has Fa2 trunked to a MT750. The Vlan interfaces are assigned on the 1811 and Phy interfaces on the MT750 are assigned to the correct vlan. I can't pass any tagged traffic from traffic between the 750 and 1811.

Any ideas?
 
samsung172
Forum Guru
Forum Guru
Posts: 1191
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: Trunk ports and vlan routing

Tue May 07, 2013 3:04 am

Do it simple. Make a bridge. If MTU is big enough. its like. whats goes in, goes out.
 
darcwing
just joined
Posts: 1
Joined: Tue Jun 13, 2017 6:31 am

Re: [Solved] Trunk ports and vlan routing

Tue Jun 13, 2017 6:34 am

https://wiki.mikrotik.com/wiki/Manual:C ... AN_Routing

This link is to a post that looks like you can do what you want with a rule that tags inbound traffic if it isn't tagged...
 
ifast
newbie
Posts: 43
Joined: Sun Sep 14, 2014 11:27 am
Location: Pakistan
Contact:

Re: Trunk ports and vlan routing

Mon Aug 21, 2017 9:43 pm

1. By using MikroTik bridging - it is simple, but the trunk must not have a native vlan - all should be tagged. And - the worst part - it consumes CPU and the bandwidth will be low - wasting the gigabit ports. Then:
/interface vlan add name=ether1vlan10 interface=ether1 vlan-id=10
/interface bridge add name=vlan10
/interface bridge port add bridge=vlan10 interface=ether1vlan10
/interface bridge port add bridge=vlan10 interface=ether2
/interface vlan add name=ether1vlan11 interface=ether1 vlan-id=11
/interface bridge add name=vlan11
/interface bridge port add bridge=vlan10 interface=ether1vlan11
/interface bridge port add bridge=vlan10 interface=ether3
/ip address add address=192.168.10.10/24 interface=vlan10
/ip route add gateway=192.168.10.254
The only difference is that both vlans are tagged on the trunk link.

2. I wish I had a 750GL to play with... See http://wiki.mikrotik.com/wiki/Manual:Sw ... p_Features - I think that Atheros8327 switch chip in 750GL is better than 8316 - and will allow you to do everything... And using it - you could have the trunk working without using CPU (with wire speed) :). See the example on wiki - and if You would like to have a native vlan on the trunk link - you should modify it a bit (not to tag certain frames).
Having a router IP configured in the vlan could be more problematic (setting copy-to-cpu in proper "rules", I think...) - so I can't help with this without having a playground to test :). But I think it would be the best solution when configured properly.
If you don't want to use a Cisco switch you can use an RB250GS, which is also a switch. I definitely wouldn't use two routers. You'd have to bridge things in software, which is just ugly.
I think that's why MikroTik makes routerboards with those funny switching chips - not to bridge in software, and not to need another device :).
Hi and sorry for revoking such a old post. I am also stuck with the almost same issue. I have CCR1036 on Point A where I am having 100 Mbps bandwidth, to add more bandwidth to CCR1036 we got another 50 Mbps on Point B. We have RB750GL on Point B. I want to use its 2 physical ports, one for sending back the 50 Mbps to CCR1036 and the other port to receive required bandwidth from CCR1036 via VLAN.

Now if i create 2 vlans in CCR1036 under 1 physical network which is connected to RB750GL via PtP link, then how to merge those 2 ports together ? Should I need to configure the Bridge ? Or can I use the Switch option in ROS and go for Port Based Vlan ?

If you are thinking that why 2 ports at RB750GL, then let me tell you that Port 1 is already connected and serving the clients at Point B, now as we got extra BW there so it is plugged into Port 2, which is now required to transfer the bandwidth to Core Router.

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], raiser and 75 guests