Bridge VLAN filtering incompatibility with one device

Hi everyone.
I have a strange issue with one device in my networks when i turning on Bridge VLAN filtering on my main routers(no matter it ROS 6 or ROS 7). Simplified schema:
Bitmap image (2).png
So i have main router (ROS 6 or ROS 7) i have switch attached to main router to bridge port. Clients are connected to the switch and also one cAP AC. I need to separate guest wifi clients from my lan network so i used bridge vlan filtering and isolated vlan for this clients. And everything works prfectly, PCs, laptops, wifi, TV’s and other devices except one - thermal receipt fiscal printer. This printer has problem connectivity to main router, about 60% packet loss, internet connection working just partially(only servers check but not sending any data). The main problem that this is more than one case, i have at least 5 location with different switches, different routers where this problem presist(only when bridge vlan filtering on). All devices using native vlan 1 except guest wifi clients. So i made a simple stand and what did i manage to find out:

  1. Even without any configuration on vlan but only with enabled option “bridge vlan filtering” - the printer has connectivity issues.
  2. After i disabling “bridge vlan filtering” problem still presist until i turning on and off interface on router that connected to switch. After that there’s no connectivity problems.
  3. Replacing the switch had no effect(used unmanaged TP-Link, CSS-326, router RB-951 with all bridged ports)
  4. Tried to manage vlans on switch, configured untagged port for printer and trunk on uplink - no effect.
  5. PC that connected to the same switch has no connectivity issues with this printer. Connectivity issue only between Mikrotik router(with bridge vlan filtering on) and this printer.
  6. I tried to hide this printer behind another router with NAT - no connectivity issues, everyting workin fine.
  7. I thought it might be problem with MTU, but pinging with any size of packet with “dont fragment” flag did not bring any result.
    Main settings on Mikrotik router just only with bridge vlan filtering on:
/interface bridge
add name=bridge1 vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] comment=ISP_primary
set [ find default-name=ether2 ] comment=ISP_secondary
set [ find default-name=ether3 ] comment=LAN
set [ find default-name=sfp1 ] comment=Retail
/interface list
add name=LAN
add name=WAN
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether10
add bridge=bridge1 disabled=yes interface=ether9
/ip firewall connection tracking
set udp-timeout=10s
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add interface=bridge1 list=LAN
add interface=ether1 list=WAN
add interface=ether2 list=WAN
/ip address
add address=172.20.0.1/22 interface=bridge1 network=172.20.0.0
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8
/ip firewall filter
add action=accept chain=input comment=established/related connection-state=\
    established,related,untracked
add action=accept chain=forward comment=established/related connection-state=\
    established,related,untracked
add action=accept chain=input comment=ICMP protocol=icmp
add action=accept chain=forward comment=IPSEC ipsec-policy=in,ipsec
add action=accept chain=forward comment=IPSEC ipsec-policy=out,ipsec
add action=accept chain=input comment=MNG in-interface-list=MNG_list
add action=accept chain=input comment=MNG_IP src-address-list=MNG_private
add action=drop chain=output comment="drop google for isp failover" \
    dst-address=8.8.4.4 out-interface=sfp1
add action=drop chain=input comment=invalid connection-state=invalid
add action=drop chain=forward comment=invalid connection-state=invalid \
    in-interface-list=WAN
add action=drop chain=forward comment="drop all except dstnat" \
    connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
add action=drop chain=input comment="drop all except LAN" in-interface-list=\
    !LAN
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip firewall raw
add action=drop chain=prerouting comment=DNS dst-port=53 in-interface-list=\
    WAN protocol=udp
add action=drop chain=prerouting comment=DNS dst-port=53 in-interface-list=\
    WAN protocol=tcp

Connectivity issue from main router to printer looks like this:
Bitmap image (3).png
I can understand that this is might be a problem with this printers, but i cant refuse to use this printers because they attached to tax service and at the same time i need vlans to isolate guests. I even dont know where to dig next to solve this problem. I will appreciate any advice. Thank you.

Can you provide some clarity on the diagram.
What is the product on the far left, is that your router??
Does it get a public IP from the ISP?
Does it provide DHCP for the entire network?

The device behind it, the switch, is actually an Access point with 5 ports, please confirm you are using this solely as a switch and why you use the word unmanaged is beyond me.
Its going to be a managed device.

With that said,
I need three configs. THe mt router, the switch(ap)< and the Capac.
/export file=anynameyouwish (minus device serial number, any public WANIP information, keys)



What is the product on the far left, is that your router??

Yes, i have CCR1009, RB3011, RB-951. CCR on ROS 6.49.13, RB3011 on ROS 7.15.2, RB951 on ROS 7.15.3, all in different locations all have same symptoms.

Does it get a public IP from the ISP?

Yes it did.

Does it provide DHCP for the entire network?

Yes

The device behind it, the switch, is actually an Access point with 5 ports, please confirm you are using this solely as a switch and why you use the word unmanaged is beyond me.

Main router → switch(no matter what swtich CSS-326, RB-951 with bridged ports or TP-LINK TL-SF1008D(unmanaged) tried all of them - nothing changed). PC/Laptop/TV/printer/cAP AC conected to this switch.

With that said,
I need three configs. THe mt router, the switch(ap)< and the Capac.

cAP AC is for example to show why i need vlans. In my lab i excluded cAP AC and problem still presist.
Main router config(far left device, fow now i’m using it as a test lab):

/interface bridge
add name=bridge1 vlan-filtering=yes
/interface ethernet
set [ find default-name=ether1 ] comment=ISP_primary
set [ find default-name=ether2 ] comment=ISP_secondary
set [ find default-name=ether3 ] comment=LAN
set [ find default-name=sfp1 ]
/interface vlan
add comment=TEST interface=bridge1 name=vlan10 vlan-id=10
add comment=TEST1 interface=bridge1 name=vlan20 vlan-id=20
/interface list
add name=LAN
add name=WAN
add name=MNG_list
add name=Input_drop
/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 dhcp-server option
add code=66 name=boot-server value="'172.20.0.20'"
add code=67 name=boot-file value="'iventoy_loader_16000'"
/ip dhcp-server option sets
add name=PXE options=boot-server,boot-file
/ip pool
add name=dhcp_pool_lan ranges=172.20.1.1-172.20.3.254
add name=dhcp_pool1 ranges=192.168.70.10-192.168.70.254
add name=dhcp_pool2 ranges=10.100.100.2-10.100.100.254
add name=dhcp_pool3 ranges=10.200.200.2-10.200.200.254
/ip dhcp-server
add address-pool=dhcp_pool_lan dhcp-option-set=PXE interface=bridge1 \
    lease-time=1h name=dhcp1
add address-pool=dhcp_pool1 interface=ether9 name=dhcp2
add address-pool=dhcp_pool2 interface=vlan10 name=dhcp3
add address-pool=dhcp_pool3 interface=vlan20 name=dhcp4
/ip vrf
add interfaces=none name=vrf1
/port
set 0 name=serial0
/routing table
add disabled=no fib name=rtab-format
add disabled=no fib name=rtab-retail
/snmp community
set [ find default=yes ] addresses=192.168.10.70/32
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether10
add bridge=bridge1 disabled=yes interface=ether9
/ip firewall connection tracking
set udp-timeout=10s
/ip settings
set max-neighbor-entries=8192
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface bridge vlan
add bridge=bridge1 tagged=bridge1,ether3 vlan-ids=10
add bridge=bridge1 tagged=ether3,bridge1 vlan-ids=20
/interface list member
add interface=bridge1 list=LAN
add interface=ether1 list=WAN
add interface=ether2 list=WAN
/ip address
add address=172.20.0.1/22 interface=bridge1 network=172.20.0.0
add address=192.168.70.1/24 interface=ether9 network=192.168.70.0
add address=192.168.35.6/30 interface=sfp1 network=\
    192.168.35.4
add address=10.100.100.1/24 interface=vlan10 network=10.100.100.0
add address=10.200.200.1/24 interface=vlan20 network=10.200.200.0
/ip dhcp-client
add add-default-route=no interface=ether1 script=":if (\$bound=1) do={\r\
    \n  /ip route set [find where comment=\"ISP_primary\"] gateway=\$\"gateway\
    -address\" disabled=no\r\
    \n  /ip route set [find where comment=\"Google\"] gateway=\$\"gateway-addr\
    ess\" disabled=no\r\
    \n}" use-peer-dns=no use-peer-ntp=no
/ip dhcp-server alert
add disabled=no interface=bridge1 valid-server=78:9A:18:2E:99:4A
/ip dhcp-server network
add address=10.100.100.0/24 gateway=10.100.100.1
add address=10.200.200.0/24 gateway=10.200.200.1
add address=172.20.0.0/22 dns-server=172.20.0.1 gateway=172.20.0.1 \
    next-server=172.20.0.20
add address=192.168.70.0/24 dns-server=1.1.1.1,8.8.8.8 gateway=192.168.70.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8
/ip firewall address-list
add address=0.0.0.0/8 list=BOGONS
add address=10.0.0.0/8 list=BOGONS
add address=100.64.0.0/10 list=BOGONS
add address=127.0.0.0/8 list=BOGONS
add address=169.254.0.0/16 list=BOGONS
add address=172.16.0.0/12 list=BOGONS
add address=192.0.0.0/24 list=BOGONS
add address=192.0.2.0/24 list=BOGONS
add address=192.168.0.0/16 list=BOGONS
add address=198.18.0.0/15 list=BOGONS
add address=198.51.100.0/24 list=BOGONS
add address=203.0.113.0/24 list=BOGONS
add address=224.0.0.0/3 list=BOGONS
/ip firewall filter
add action=accept chain=input comment=established/related connection-state=\
    established,related,untracked
add action=accept chain=forward comment=established/related connection-state=\
    established,related,untracked
add action=drop chain=forward comment=TEST_DELETE disabled=yes dst-address=\
    !192.168.21.100 src-address=172.20.0.201
add action=drop chain=forward comment=TEST_DELETE disabled=yes dst-address=\
    !192.168.21.100 src-address=172.20.0.200
add action=accept chain=input comment=ICMP protocol=icmp
add action=accept chain=forward comment=IPSEC ipsec-policy=in,ipsec
add action=accept chain=forward comment=IPSEC ipsec-policy=out,ipsec
add action=accept chain=input comment=MNG in-interface-list=MNG_list
add action=accept chain=input comment=MNG_IP src-address-list=MNG_private
add action=drop chain=output comment="drop google for isp failover" \
    dst-address=8.8.4.4 out-interface=sfp1
add action=drop chain=input comment=invalid connection-state=invalid
add action=drop chain=forward comment=invalid connection-state=invalid \
    in-interface-list=WAN
add action=drop chain=forward comment="drop all except dstnat" \
    connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
add action=drop chain=input comment="drop all except LAN" in-interface-list=\
    !LAN
add action=drop chain=forward comment="public wifi" out-interface-list=!WAN \
    src-address=192.168.70.0/24
/ip firewall mangle
add action=mark-connection chain=prerouting comment=Format connection-mark=\
    no-mark in-interface=ether1 new-connection-mark=conn_format passthrough=\
    no
add action=mark-routing chain=prerouting comment=Format connection-mark=\
    conn_format dst-address-type=!local in-interface-list=!WAN \
    new-routing-mark=rtab-format passthrough=no
add action=mark-routing chain=output comment=Format connection-mark=\
    conn_format dst-address-type=!local new-routing-mark=rtab-format \
    passthrough=no
add action=mark-routing chain=prerouting comment=TEST_DELETE disabled=yes \
    dst-address-list=!BOGONS new-routing-mark=rtab-format passthrough=no \
    src-address=172.20.0.13
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip firewall raw
add action=drop chain=prerouting comment=DNS dst-port=53 in-interface-list=\
    WAN protocol=udp
add action=drop chain=prerouting comment=DNS dst-port=53 in-interface-list=\
    WAN protocol=tcp
/ip route
add comment=ISP_primary disabled=no distance=3 dst-address=0.0.0.0/0 gateway=\
    xxx.xxx.xxx.xxx routing-table=main scope=30 suppress-hw-offload=no \
    target-scope=10
add comment=Google disabled=no distance=1 dst-address=8.8.4.4/32 gateway=\
    xxx.xxx.xxx.xxx routing-table=main suppress-hw-offload=no
add check-gateway=ping disabled=no distance=200 \
    dst-address=192.168.30.0/24 gateway=172.16.54.2 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=200 \
    dst-address=192.168.10.0/24 gateway=172.16.51.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.131.0/24 gateway=172.16.53.2 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.0.0/24 gateway=172.16.51.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 dst-address=\
    10.17.16.0/24 gateway=172.16.51.5 pref-src=172.20.0.1 routing-table=main \
    scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.88.0/24 gateway=172.16.51.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=10.17.20.0/24 gateway=172.16.51.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=100 dst-address=\
    172.16.200.0/24 gateway=172.16.50.10 pref-src=172.20.0.1 routing-table=\
    main suppress-hw-offload=no
add disabled=no distance=100 dst-address=\
    172.16.252.0/24 gateway=172.16.50.10 pref-src=172.20.0.1 routing-table=\
    main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=100 dst-address=\
    172.16.253.0/24 gateway=172.16.50.10 pref-src=172.20.0.1 routing-table=\
    main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.20.0/24 gateway=172.16.50.10 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.21.0/24 gateway=172.16.52.9 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.23.0/24 gateway=172.16.52.9 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=100 dst-address=172.16.7.0/24 \
    gateway=172.16.52.9 routing-table=main suppress-hw-offload=no
add disabled=no distance=100 \
    dst-address=172.16.251.0/24 gateway=172.16.50.10 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.30.0/24 gateway=192.168.35.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping comment=ISP_secondary disabled=no distance=2 \
    dst-address=0.0.0.0/0 gateway=192.168.35.5 routing-table=main scope=30 \
    suppress-hw-offload=no target-scope=10
add comment=ISP_primary_marked disabled=no distance=1 dst-address=0.0.0.0/0 \
    gateway=82.117.240.1 routing-table=rtab-format scope=30 \
    suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=192.168.10.0/24 gateway=192.168.35.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=10.10.10.1/23 gateway=192.168.35.5 routing-table=main \
    suppress-hw-offload=no
add check-gateway=ping disabled=no distance=200 \
    dst-address=10.10.10.0/23 gateway=172.16.54.2 routing-table=main scope=30 \
    suppress-hw-offload=no target-scope=10
add disabled=no distance=100 dst-address=172.16.2.0/24 \
    gateway=172.16.52.9 routing-table=main scope=30 suppress-hw-offload=no \
    target-scope=10
add disabled=no distance=100 dst-address=\
    172.17.0.0/16 gateway=172.16.50.10 pref-src=172.20.0.1 routing-table=main \
    scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=100 \
    dst-address=10.20.20.0/24 gateway=172.16.52.9 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=\
    192.168.8.0/24 gateway=172.16.50.10 routing-table=main scope=30 \
    suppress-hw-offload=no target-scope=10
add disabled=no distance=100 dst-address=172.16.4.0/24 \
    gateway=172.16.52.9 routing-table=main scope=30 suppress-hw-offload=no \
    target-scope=10
add check-gateway=ping disabled=no distance=200 \
    dst-address=192.168.20.0/24 gateway=192.168.35.5 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=200 \
    dst-address=192.168.131.0/24 gateway=172.16.52.9 pref-src=172.20.0.1 \
    routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no dst-address=192.168.40.0/24 gateway=\
    192.168.35.5 routing-table=main suppress-hw-offload=no
add disabled=no distance=1 dst-address=10.10.20.0/23 \
    gateway=192.168.35.5 routing-table=main scope=30 suppress-hw-offload=no \
    target-scope=10
add disabled=no distance=100 dst-address=\
    0.0.0.0/0 gateway=82.117.240.1 routing-table=vrf1 scope=30 \
    suppress-hw-offload=no target-scope=10
add disabled=no dst-address=10.21.1.0/24 gateway=\
    172.16.52.9 routing-table=main suppress-hw-offload=no
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ppp aaa
set use-radius=yes
/routing bfd configuration
add disabled=no interfaces=all min-rx=200ms min-tx=200ms multiplier=5
/routing rule
add action=lookup disabled=yes dst-address=172.20.0.0/22 table=main
add action=lookup-only-in-table comment="from mikrotik to Format" disabled=no \
    src-address=xxx.xxx.xxx.xxx/32 table=rtab-format
/snmp
set enabled=yes
/system note
set show-at-login=no
/tool netwatch
add comment=ISP_check disabled=no down-script="/ip route enable [find comment=\
    \"ISP_secondary\"]\r\
    \n/ip/firewall/connection/print where (timeout>60) [remove \$\".id\"]\r\
    \n/log warning message=(\"ISP_primary DOWN\")" host=8.8.4.4 http-codes="" \
    interval=2m startup-delay=1m test-script="" timeout=10s type=simple \
    up-script="/ip route disable [find comment=\"ISP_secondary\"]\r\
    \n/ip/firewall/connection/print where (timeout>60) [remove \$\".id\"]\r\
    \n/log warning message=(\"ISP_primary UP\")"

Config for switch - default from the box CSS326, there’s no config to show…
cAP AC not connected for now cos I made sure that without it the same problems were observed.
So my lab now - RB-3011 interface ether3 → port 1-24(no matter) CSS326 → port 1-24(no matter) printer

So a dogs breakfast.
Okay if using bridge vlan filtering then please read: http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1

So take the bridge off any subnet duties, simply make it another vlan.
Then come back with that config.
You should consider which vlan is your trusted vlan (and if there is not one then you need a management or base vlan).
Typically you only need three interface lists
WAN-LAN-TRUSTED on the router…exceptions includeumerous vlans with complex firewall rule interactions

You have a mgmt address list but no such list on your config… just bogons
Suggest firewall filter keep chains together otherwise difficult to understand order and also to see errors.
YOur mangle rules are wrong and also not clear why you are using them.
Your routing rules seem very numerous WHY?? what are you trying to do???

Also you have routing rules and one must be very careful to mix them as there can be NO overlap… mangles take precedence over routing rules.

I do recommend taking one port OFF the bridge and doing all my configuration from that port.

Thank you for your reply.

So take the bridge off any subnet duties, simply make it another vlan.

I’ll make tests after weekend.

You should consider which vlan is your trusted vlan (and if there is not one then you need a management or base vlan).

Base vlan is 1 and its default configuration when enabling vlan filtering.

You have a mgmt address list but no such list on your config… just bogons

I have vpn tunnels that i dont want to show so i deleted them from config.

YOur mangle rules are wrong and also not clear why you are using them.

I have dual WAN and also one rule is disabled(used to redirect one clients traffic to specific routing table)

Your routing rules seem very numerous WHY?? what are you trying to do???

I have several ipsec tunnels that i also deleted from the config as it not affecting my problem.

Okay but if vlans are private IP addresses it matters little, and should be shown.
Public IP addresses should not identified.

Also, in bridge vlan filtering vlan1 is the default vlan on the bridge and is not to be used and works in the background.
If you have a bridge vlan now with DHCP simply make it vlan5 or vlan10, dont care but not vlan1.
Same goes with base or management vlan, should not be 1.

Thank you for reply.
So after some research and tests i found what was a problem. This type of equipment for some reason was blocked when Ingress Filtering was on in Bridge Vlan Filtering. I dunno why but with some advice in another community i changed my lan network to full vlan so i excluded default vlan 1 and then all worked fine. Thank you for your help.

Well, another confirmation that at least the first two rules are to be followed:
http://forum.mikrotik.com/t/the-twelve-rules-of-mikrotik-club/182164/1