Community discussions

MikroTik App
 
hofi76
newbie
Topic Author
Posts: 33
Joined: Tue Oct 13, 2020 11:01 am

VLAN packet loss

Fri Jun 03, 2022 10:44 am

Hi All,
I wanated to configure a device for manage 3 vlans, I mean ether1 trunk for three VLANs, and 2-3-4 ports for vlans untagged ports.
However it is done and working I have 6 percent of packet loss. Maybe somebody can relaise what mistake i did. (On the other end of the trunk all is fine.)
/interface bridge
add name=Bridge_PCs
add name=Bridge_Prod
add name=Bridge_Trunk
add name=bridge_Management
/interface ethernet
set [ find default-name=ether1 ] name=ether1_trunk
set [ find default-name=ether2 ] name=ether2_management
set [ find default-name=ether3 ] name=ether3_pcs
set [ find default-name=ether4 ] name=ether4_prod
/interface vlan
add interface=Bridge_Trunk name=vlan_Management vlan-id=21
add interface=Bridge_Trunk name=vlan_PCs vlan-id=26
add interface=Bridge_Trunk name=vlan_prod vlan-id=28
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=DHCP_Pool ranges=192.168.5.1-192.168.5.50
/port
set 0 name=serial0
/interface bridge port
add bridge=Bridge_Trunk interface=ether1_trunk
add bridge=bridge_Management interface=ether2_management
add bridge=Bridge_PCs interface=ether3_pcs
add bridge=Bridge_Prod interface=ether4_prod
add bridge=bridge_Management interface=vlan_Management
add bridge=Bridge_PCs interface=vlan_PCs
add bridge=Bridge_Prod interface=vlan_prod
/interface bridge settings
set use-ip-firewall=yes
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=10.36.8.105/23 interface=Bridge_Prod network=10.36.8.0
/ip dns
set servers=10.36.2.11,10.36.2.12
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.36.9.254 pref-src=\
    "" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
/system clock
set time-zone-name=Europe/Budapest
 
pe1chl
Forum Guru
Forum Guru
Posts: 10233
Joined: Mon Jun 08, 2015 12:09 pm

Re: VLAN packet loss

Fri Jun 03, 2022 11:06 am

What is your "a device"?
Are you trying to push max ethernet speed through a toy router?
 
hofi76
newbie
Topic Author
Posts: 33
Joined: Tue Oct 13, 2020 11:01 am

Re: VLAN packet loss

Fri Jun 03, 2022 11:27 am

The device is RB750Gr3 and I test it with pings only. The CPU is running on a few percent, too.
 
tdw
Forum Guru
Forum Guru
Posts: 1851
Joined: Sat May 05, 2018 11:55 am

Re: VLAN packet loss

Fri Jun 03, 2022 11:32 am

Additionally the configuration has more than one of these https://wiki.mikrotik.com/wiki/Manual:L ... figuration, use a single VLAN-aware bridge.

use-ip-firewall=yes impacts performance, it is not necessary in most use cases.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10233
Joined: Mon Jun 08, 2015 12:09 pm

Re: VLAN packet loss

Fri Jun 03, 2022 11:42 am

That, and also on the RB750Gr3 there is no hardware acceleration when using VLANs. So all packets are forwarded by the CPU.
And the ethernet ports have a funny connection to the CPU, which is not even predictable because there are two modes and the criteria for selecting the mode are unclear.

Of course this all should not affect operation when the network is idle and you are just pinging 1/second.
But it certainly will not hold up to full 1Gbit traffic between random ports in this configuration.
 
hofi76
newbie
Topic Author
Posts: 33
Joined: Tue Oct 13, 2020 11:01 am

Re: VLAN packet loss

Fri Jun 03, 2022 12:53 pm

I have fallowed tdw’s idea and I re-think the entire concept.
The original problem was solved but a new appeared.
With the config below the ping is like a charm, but I cannot reach the device via IP 10.36.8.105. 10.36.8.0/23 is the prod vlan IP range and I added the device IP to that interface but not reachable.
Actually I cannot reach it at all, only from ether5 which is not configured at the moment.
Are there any way to reach the device via IP?

/interface bridge
add name=bridge1 vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] name=ether1_trunk
set [ find default-name=ether2 ] name=ether2_management
set [ find default-name=ether3 ] name=ether3_pcs
set [ find default-name=ether4 ] name=ether4_prod
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=DHCP_Pool ranges=192.168.5.1-192.168.5.50
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether1_trunk
add bridge=bridge1 interface=ether2_management pvid=21
add bridge=bridge1 interface=ether3_pcs pvid=26
add bridge=bridge1 interface=ether4_prod pvid=28
/interface bridge settings
set use-ip-firewall=yes
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface bridge vlan
add bridge=bridge1 tagged=ether1_trunk untagged=ether2_management vlan-ids=21
add bridge=bridge1 tagged=ether1_trunk untagged=ether3_pcs vlan-ids=26
add bridge=bridge1 tagged=ether1_trunk untagged=ether4_prod vlan-ids=28
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=10.36.8.105/23 interface=ether4_prod network=10.36.8.0
/ip dns
set servers=10.36.2.11,10.36.2.12
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.36.9.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
/system clock
set time-zone-name=Europe/Budapest
 
tdw
Forum Guru
Forum Guru
Posts: 1851
Joined: Sat May 05, 2018 11:55 am

Re: VLAN packet loss

Fri Jun 03, 2022 1:12 pm

You do not add IP addresses to bridge members. To make ether4 untagged reachable with IP:

/interface vlan
add interface=bridge1 name=vlan_prod vlan-id=28

...
/interface bridge vlan
add bridge=bridge1 tagged=bridge1,ether1_trunk untagged=ether4_prod vlan-ids=28
...
/ip address
add address=10.36.8.105/23 interface=ether4_prodvlan_prod network=10.36.8.0


@pe1chl AFAIK VLAN-aware bridge hardware offload support was added for MT7621 and RTL8367 in the 7.1 betas. The wiki describes the RouterOS 6 implementation, the new help pages (currently offline, likely due to https://www.theregister.com/2022/06/03/ ... _attacked/) describes the RouterOS 7 implementation.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10233
Joined: Mon Jun 08, 2015 12:09 pm

Re: VLAN packet loss

Fri Jun 03, 2022 1:42 pm

Ok I know that bridge VLAN hw accel now works on my 4011 but I did not know it was also implemented for the RB750Gr3.
(which historically was behind w.r.t. switch chip support rather than ahead)
 
hofi76
newbie
Topic Author
Posts: 33
Joined: Tue Oct 13, 2020 11:01 am

Re: VLAN packet loss

Fri Jun 03, 2022 1:57 pm

Thanks tdw operate fine.

Who is online

Users browsing this forum: Bing [Bot], dj23, flapviv, kevinlukas, ToTheFull and 48 guests