Community discussions

 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

How to configure multiple vlan with hw-offload

Fri May 18, 2018 8:35 am

I have not fully understood how to configure multiple vlan with the new hw-offload implementation.

Can someone put a configuration for the RB3011 or 2011 code on this forum?

Mikrotik is unclear about it.

Thank you in advance
 
User avatar
artz
MikroTik Support
MikroTik Support
Posts: 81
Joined: Tue Oct 17, 2017 5:51 pm
Location: Riga
Contact:

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 11:13 am

You can find examples with the new hardware offloading feature as well as for pre-6.41 here:
https://wiki.mikrotik.com/wiki/Manual:S ... s_Ports.29
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 1:07 pm

Hello
What about RB3011?
How should multiple VLANS be configured on this RB3011?
Does this make sense?
I would like to have more explanation for this routerboard in terms of VLAN with hw-offload
 
User avatar
CZFan
Forum Veteran
Forum Veteran
Posts: 968
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa
Contact:

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 1:16 pm

If you follow / apply the link as provided by @artz, it is actually quite easy. Read the whole document, then apply/test on device, any questions, come back and we will help
MTCNA, MTCTCE, MTCRE & MTCINE
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 4:14 pm

Hello,

I want on the vlan 200, 300, 400 individual IP ranges with dhcp-server on it.

vlan-200 = 192.168.100.0/24
vlan-300 = 192.168.101.0/24
vlan-400 = 192.168.102.0/24

How do I configure that with the hw-offload?
Router 3011 = router with the 3 different IP ranges
Trunk ether2 as in this example goes to RB 260GS (SwOS

I think with this example like Mikrotik examples that this is not possible
But I can be wrong

Greatings and thanks for your reply
 
pe1chl
Forum Guru
Forum Guru
Posts: 4734
Joined: Mon Jun 08, 2015 12:09 pm

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 4:21 pm

It is still possible but you have to keep your bridge without VLANs (and vlan-filtering=off) and put the VLANs on the switch chip.
This is confusing. A bridge with VLAN filtering and hw-offload should translate into the proper switch config automatically.
However, once you know it and you stay away from VLAN filtering on the bridge itself, it is still possible to do it on the switch.
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 4:50 pm

I still do not understand.
The examples are indeed without IP addresses.
On my RB3011
This is my export
/interface bridge
add name=bridge1 protocol-mode=none
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
/interface ethernet switch vlan
add independent-learning=yes ports=ether2,ether3 switch=switch1 vlan-id=200
add independent-learning=yes ports=ether2,ether4 switch=switch1 vlan-id=300
add independent-learning=yes ports=ether2,ether5 switch=switch1 vlan-id=400
/ip address
add address=192.168.100.1/24 network=192.168.100.0
add address=192.168.101.1/24 network=192.168.101.0
add address=192.168.102.1/24 network=192.168.102.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1 protocol=tcp src-address=192.168.100.0/24
add action=masquerade chain=srcnat out-interface=ether1 protocol=tcp src-address=192.168.101.0/24
add action=masquerade chain=srcnat out-interface=ether1 protocol=tcp src-address=192.168.102.0/24
/system routerboard settings
set silent-boot=no
 
almdandi
newbie
Posts: 36
Joined: Sun May 03, 2015 5:22 pm

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 5:04 pm

Hallo,

i think you need a vlan interface for each for your vlans under the bridge, so the cpu can access the traffic and can NAT it. Then assign your ip address to the vlan interfaces.
 
pe1chl
Forum Guru
Forum Guru
Posts: 4734
Joined: Mon Jun 08, 2015 12:09 pm

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 5:07 pm

You need to add a VLAN interface for each of your VLANs with parent "bridge1",
and with the correct vlan-id for each. I use names like bridge1.vlan200 so they are
easier to remember. That will be the router-side of each VLAN.
You also need to add the cpu port as a member on each of your vlans in the switch.
The IP addresses should be assigned to the above 3 VLAN interfaces.
 
RoadkillX
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun Apr 22, 2018 6:00 pm
Location: Spain

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 5:33 pm

This works for me, but am sure there are better ways to do it though and it's still a work in process.

RB750Gr3
/interface bridge
add admin-mac= auto-mac=no name=bridge protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] name=ether1.HUG
set [ find default-name=ether2 ] name=ether2.CRS112
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1.HUG max-mru=1492 max-mtu=1492 name=Movistar use-peer-dns=yes user=adslppp@telefonicanetpa
/interface vlan
add interface=ether2.CRS112 name=vlan10_PC vlan-id=10
add interface=ether2.CRS112 name=vlan12_WiFi vlan-id=12
add interface=ether2.CRS112 name=vlan14_TV vlan-id=14
add interface=ether2.CRS112 name=vlan15_MGMT vlan-id=15
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface bridge port
add bridge=bridge interface=ether2.CRS112
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=ether5
/interface ethernet switch vlan
add independent-learning=no ports=ether5,switch1-cpu switch=switch1 vlan-id=10
add independent-learning=no ports=ether5,switch1-cpu switch=switch1 vlan-id=12
add independent-learning=no ports=ether5,switch1-cpu switch=switch1 vlan-id=15
add independent-learning=no ports=ether5,switch1-cpu switch=switch1 vlan-id=14
/interface list member
add interface=bridge list=LAN
add interface=ether1.HUG list=WAN

hAP AC
/interface bridge
add admin-mac= auto-mac=no name=bridge
/interface ethernet
set [ find default-name=ether3 ] name=ether3.GabrielPC
set [ find default-name=ether4 ] name=ether4.TV
set [ find default-name=ether5 ] name=ether5.CRS112
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce disabled=no distance=indoors frequency=auto mode=ap-bridge ssid=MOVISTAR_62DF \
    vlan-id=12 vlan-mode=use-tag wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee disabled=no distance=indoors frequency=auto mode=ap-bridge ssid=MOVISTAR_62DF \
    vlan-id=12 vlan-mode=use-tag wireless-protocol=802.11
/interface vlan
add interface=ether5.CRS112 name=vlan15 vlan-id=15
/interface ethernet switch port
set 0 default-vlan-id=1 vlan-header=always-strip vlan-mode=secure
set 1 default-vlan-id=1 vlan-header=always-strip vlan-mode=secure
set 2 default-vlan-id=10 vlan-header=always-strip vlan-mode=secure
set 3 default-vlan-id=14 vlan-header=always-strip vlan-mode=secure
set 4 default-vlan-id=1 vlan-mode=fallback
set 5 vlan-mode=fallback
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys supplicant-identity=MikroTik
/interface bridge port
add bridge=bridge interface=ether2
add bridge=bridge interface=ether3.GabrielPC
add bridge=bridge interface=ether4.TV
add bridge=bridge interface=ether5.CRS112
add bridge=bridge interface=sfp1
add bridge=bridge interface=wlan1
add bridge=bridge interface=wlan2
/interface ethernet switch vlan
add independent-learning=no ports=ether5.CRS112,switch1-cpu switch=switch1 vlan-id=15
add independent-learning=no ports=ether4.TV,ether5.CRS112 switch=switch1 vlan-id=14
add independent-learning=no ports=ether3.GabrielPC,ether5.CRS112 switch=switch1 vlan-id=10
add independent-learning=no ports=ether5.CRS112 switch=switch1 vlan-id=20
/interface list member
add interface=bridge list=LAN
add interface=ether1 list=WAN
There is a CRS112 between them but its config is not relevant to the question. RB3011 has 2 switch chip 1-5 and 6-10 https://wiki.mikrotik.com/wiki/Manual:S ... p_Features you could create 2 bridges and do the vlan config in /interface ethernet switch you'll get hw-offload on all interfaces in both bridges.Don't know if adding them all to 1 bridge and doing the vlans would enable hw-offload on all interfaces, @CZFan can clear that up for you.
 
User avatar
CZFan
Forum Veteran
Forum Veteran
Posts: 968
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa
Contact:

Re: How to configure multiple vlan with hw-offload

Fri May 18, 2018 5:49 pm

Hello,

I want on the vlan 200, 300, 400 individual IP ranges with dhcp-server on it.

vlan-200 = 192.168.100.0/24
vlan-300 = 192.168.101.0/24
vlan-400 = 192.168.102.0/24

How do I configure that with the hw-offload?
Router 3011 = router with the 3 different IP ranges
Trunk ether2 as in this example goes to RB 260GS (SwOS

I think with this example like Mikrotik examples that this is not possible
But I can be wrong

Greatings and thanks for your reply

Reading the above, you should use config what they call "Router on a Stick" for the VLAN's, i.e. the VLAN's are on the switch (RB250GS) with a trunk uplink port to RB3011(Ether2)
In this case, ether2 on RB2011 should not be part of a Bridge but standalone, with VLAN's 200, 300 400 attached to ether2.

Have a look at this example:

https://wiki.mikrotik.com/wiki/SwOS/Router-On-A-Stick
MTCNA, MTCTCE, MTCRE & MTCINE
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 12:32 am

This configuration work perfect.
See on my website to the result.
https://www.wirelessinfo.be/port-based- ... otik-swos/

Tis working like i want.
My question is this correct?
 
sindy
Forum Guru
Forum Guru
Posts: 2249
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 11:15 am

The link currently returns 404 and I cannot see a post with that title in the Mikrotik section. Work in progress?
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace each occurrence of any public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 2:03 pm

Hello, I know, I've updated Social Warfare and there were bugs.
That's why I had to put back an earlier backup.
I will return the article as soon as possible
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 6:23 pm

 
sindy
Forum Guru
Forum Guru
Posts: 2249
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 6:32 pm

I've double-checked but I can still see the topic to deal with configuration of RB750 (hence RouterOS) and your article to deal with configuration of RB260GS (hence SwOS). So what kind of feedback you actually expect from the forum at this stage :) ?
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace each occurrence of any public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 6:43 pm

I found the solution, with this configuration works everything fine.
But if i set "use service tag" on the RB3011 it don't work anymore.
Strange, because the trunk should normally support vlan-tagging
Thanks for your quick responce to all people here on this Mikrotik forum.
 
anav
Forum Veteran
Forum Veteran
Posts: 721
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 8:38 pm

Nice site plisken! Luckily I have learned how to google translate the pages. :-)
 
sindy
Forum Guru
Forum Guru
Posts: 2249
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 9:02 pm

if i set "use service tag" on the RB3011 it don't work anymore.
Strange, because the trunk should normally support vlan-tagging
I'm afraid it is just a misunderstanding. The "use service tag" option actually means "apply VLAN tags with ethertype value of 0x88A8 instead of the 'normal' ethertype value of 0x8100" and is used at places where the context implies that the frames are always tagged. Where both tagless and tagged packets are plausible, there is a choice between "no tag, use tag, use service tag".

So if there is a checkbox "use service tag" and it is not checked, the packets are tagged with the normal VLAN tag.

The idea behind is that "service tag" is used by service providers to provide "transparent L2" services for customers, where the service provider tags everything with a service VLAN ID at ingress and removes the service tag at egress, regardless whether the customer packets are tagless or tagged with normal VLAN tags.
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace each occurrence of any public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
RoadkillX
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun Apr 22, 2018 6:00 pm
Location: Spain

Re: How to configure multiple vlan with hw-offload

Sat May 19, 2018 9:10 pm

@sindy you beat me to it.

if you enable service tag (s-tag) you'd just be tagging with 802.1ad which is a tag isp uses to switch traffic and to indicate that their is another vlan tag inside it, the actual (c-tag) customer tag that comes out to the customer. So that wouldn't work unless some one is prepared to receive it on the other side with matching s-tag and c-tag.
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Sun May 20, 2018 1:59 am

Nice site plisken! Luckily I have learned how to google translate the pages. :-)
Thanks anav for the positive reply.
I think that the tutorials in Dutch are needed for Belgium and the Netherlands.
Unfortunately, I am not fluent in the English language, and I also use Google translate.
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Sun May 20, 2018 2:03 am

Thanks to all Mikrotik friends who have brought me clarification here.
 
Jamesits
just joined
Posts: 21
Joined: Thu Jul 13, 2017 10:15 am

Re: How to configure multiple vlan with hw-offload

Tue May 22, 2018 1:09 pm

Thinks there are some information missing here.

If you need inter-vlan routing (i.e. layer 3 feature) on bridge:
bridge must disable VLAN filtering
create VLAN interfaces on bridge interface
then use these VLAN interfaces to config layer 3 features (IP, routing, etc.)
this will NOT be hw-offloaded

If you need only L2 VLAN on bridge:
config VLANs on bridge menu (not VLAN interfaces), set current tagged port to be all of your trunk port on every VLAN entry
config per port VLAN on bridge menu (if you need access port)
enable VLAN filtering on your bridge interface
this MAY be hw-offloaded (hw feature differs)
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2271
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: How to configure multiple vlan with hw-offload

Tue May 22, 2018 1:28 pm

Hello Jamesits, Does this configuration have to be performed on the RB3011?
Can you illustrate that more with screenshots please?
I appreciate your help, which results in a better tutorial.
regards
 
User avatar
CZFan
Forum Veteran
Forum Veteran
Posts: 968
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa
Contact:

Re: How to configure multiple vlan with hw-offload

Tue May 22, 2018 1:46 pm

Thinks there are some information missing here.

If you need inter-vlan routing (i.e. layer 3 feature) on bridge:
bridge must disable VLAN filtering
create VLAN interfaces on bridge interface
then use these VLAN interfaces to config layer 3 features (IP, routing, etc.)
this will NOT be hw-offloaded

If you need only L2 VLAN on bridge:
config VLANs on bridge menu (not VLAN interfaces), set current tagged port to be all of your trunk port on every VLAN entry
config per port VLAN on bridge menu (if you need access port)
enable VLAN filtering on your bridge interface
this MAY be hw-offloaded (hw feature differs)

You need to read the whole thread / topic here, he has a separate switch connected to a router, which uses a different config.

What you are explaining is when you have only one device, i.e. router
MTCNA, MTCTCE, MTCRE & MTCINE
 
sindy
Forum Guru
Forum Guru
Posts: 2249
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to configure multiple vlan with hw-offload

Tue May 22, 2018 3:56 pm

If you need inter-vlan routing (i.e. layer 3 feature) on bridge:
bridge must disable VLAN filtering
create VLAN interfaces on bridge interface
then use these VLAN interfaces to config layer 3 features (IP, routing, etc.)
this will NOT be hw-offloaded
The above is not fully accurate - the sentence highlighted in red in particular is wrong, vlan-filtering does not interfere with inter-vlan routing. The rest is true - to route packets between VLANs, you have to deliver them to the CPU which performs the routing, so this functionality cannot be hardware offloaded. But that does not mean that forwarding frames within each VLAN between physical interfaces cannot be hardware offloaded.
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace each occurrence of any public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
pe1chl
Forum Guru
Forum Guru
Posts: 4734
Joined: Mon Jun 08, 2015 12:09 pm

Re: How to configure multiple vlan with hw-offload

Tue May 22, 2018 4:07 pm

The above is not fully accurate - the sentence highlighted in red in particular is wrong, vlan-filtering does not interfere with inter-vlan routing. The rest is true - to route packets between VLANs, you have to deliver them to the CPU which performs the routing, so this functionality cannot be hardware offloaded. But that does not mean that forwarding frames within each VLAN between physical interfaces cannot be hardware offloaded.
But in most MikroTik router models, you cannot have hardware accellerated switching between ports when you have migrated to the new "bridge with VLAN support" introduced in 6.41!
Before that (using master-port on ethernet interfaces, which refers to switching) that was easily possible.
It is still unclear to me why a bridge with VLAN filtering and no spanning tree protocol cannot be internally translated to a switch config with hardware acceleration in RouterOS.
 
cdbiassio
just joined
Posts: 4
Joined: Mon Apr 23, 2018 10:57 pm

Re: How to configure multiple vlan with hw-offload

Fri May 25, 2018 7:45 pm

Hi,
If i need to use the multiple VLANs tagged in the same interfaces, Mikrotik will use only one Bridge interface?
I tried to add the same interface in two bridge under "/interface bridge port" and the Mikrotik return the message "failure: device already added as bridge port".
PS: Mikrotik running Router OS x86 version 6.42.2.

Thanks in advanced.
 
sindy
Forum Guru
Forum Guru
Posts: 2249
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to configure multiple vlan with hw-offload

Sat May 26, 2018 12:18 pm

Look here and if it does not make things clear, come back again.
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace each occurrence of any public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
cdbiassio
just joined
Posts: 4
Joined: Mon Apr 23, 2018 10:57 pm

Re: How to configure multiple vlan with hw-offload

Thu May 31, 2018 10:52 pm

Thanks Sindy.
 
polyfaces
just joined
Posts: 1
Joined: Wed Aug 01, 2018 9:55 am

Re: How to configure multiple vlan with hw-offload

Wed Aug 01, 2018 9:59 am

I would like to know whether RB750Gr3 (hEX) supports hw-offload for vlan tagging / untagging on the interfaces.

I saw from earlier post that it may implment it in the "future" and see if it currently supports now. Thanks.

viewtopic.php?t=113724&start=50#p567533

Who is online

Users browsing this forum: No registered users and 30 guests