Hi,
I tried to find the solution myself but I have no ideas what may be wrong. I have 3 WAN connections, the last is temporarily off. Everything worked well before the change.
WAN1:
Before change: FTTH with dynamic IP by an additional router from the internet provider (double NAT)
After change: FTTH by ONT adapter with dynamic IP, VLAN, changed MTU and PPPoE
WAN2: TV Cable provider with dynamic IP, modem with ethernet interface.
WAN3: temporarily off
Before the change, the load balance was worked correctly. After the change almost the entire load goes out through WAN2. When I turn off one of the connections, everything goes through the other, so each of the connections works properly.
I changed all the rules for Firewall - NAT and mangle. I changed the ether1_WAN interface to ether1_WAN_PPPoE. I did not change anything in the marking.
I have additional scripts to change the routing after the IP change, and I think I have changed the getting of IP from the appropriate sources everywhere.
Configuration below with most of the irrelevant fragments removed and remote IPs changed.
/interface ethernet
set [ find default-name=ether1 ] comment="Orange ONT" l2mtu=1598 name=\
ether1_WAN
set [ find default-name=ether2 ] comment="UPC 1000/40" name=ether2_WAN
set [ find default-name=ether3 ] comment="Play LTE" disabled=yes name=\
ether3_WAN
/interface vlan
add arp=disabled interface=ether1_WAN mtu=1492 name=vlan-orange vlan-id=35
/interface pppoe-client
add comment="Orange 1000/100 TX-upload, RX-download" disabled=no interface=\
vlan-orange keepalive-timeout=disabled name=ether1_WAN_PPPoE password=\
pass user=login
/ip address
add address=192.168.4.1/24 interface=LAN_BRIDGE network=192.168.4.0
/ip dhcp-client
add add-default-route=no interface=ether1_WAN use-peer-dns=no use-peer-ntp=no
add add-default-route=no disabled=no interface=ether2_WAN use-peer-dns=no \
use-peer-ntp=no
add add-default-route=no disabled=no interface=ether3_WAN use-peer-dns=no \
use-peer-ntp=no
/ip firewall filter
add action=accept chain=input comment="Pakiety z ustawionych polaczen" \
connection-state=established,related
add action=accept chain=input comment="Wszystko dla lokalnych" src-address=\
192.168.4.0/24
add action=accept chain=input comment="DNS dla lokalnych" disabled=yes \
src-address=192.168.4.0/24
add action=drop chain=input comment="Odrzucenie wszystkiego innego"
/ip firewall mangle
add action=accept chain=prerouting comment="Do podsieci i VPN'ow" \
dst-address=192.168.0.0/16 in-interface=LAN_BRIDGE
add action=mark-connection chain=prerouting comment=\
"Load Balance https://wiki.mikrotik.com/wiki/Manual:PCC" connection-mark=\
no-mark in-interface=ether1_WAN_PPPoE new-connection-mark=ether1_conn \
passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=ether2_WAN new-connection-mark=ether2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=ether3_WAN new-connection-mark=ether3_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=LAN_BRIDGE new-connection-mark=\
ether1_conn passthrough=yes per-connection-classifier=both-addresses:3/0
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=LAN_BRIDGE new-connection-mark=\
ether2_conn passthrough=yes per-connection-classifier=both-addresses:3/1
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=LAN_BRIDGE new-connection-mark=\
ether3_conn passthrough=yes per-connection-classifier=both-addresses:3/2
add action=mark-routing chain=prerouting connection-mark=ether1_conn \
in-interface=LAN_BRIDGE new-routing-mark=to_ether1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ether2_conn \
in-interface=LAN_BRIDGE new-routing-mark=to_ether2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ether3_conn \
in-interface=LAN_BRIDGE new-routing-mark=to_ether3 passthrough=yes
add action=mark-routing chain=output connection-mark=ether1_conn \
new-routing-mark=to_ether1 passthrough=yes
add action=mark-routing chain=output connection-mark=ether2_conn \
new-routing-mark=to_ether2 passthrough=yes
add action=mark-routing chain=output connection-mark=ether3_conn \
new-routing-mark=to_ether3 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="Hairpin NAT" dst-address=\
192.168.4.0/24 out-interface=LAN_BRIDGE src-address=192.168.4.0/24
add action=masquerade chain=srcnat comment="Masquerade WANs" out-interface=\
ether1_WAN_PPPoE
add action=masquerade chain=srcnat out-interface=ether2_WAN
add action=masquerade chain=srcnat out-interface=ether3_WAN
/ip route
add check-gateway=ping comment="ether1_WAN routing gateway" distance=1 \
gateway=80.80.80.87 routing-mark=to_ether1
add check-gateway=ping comment="ether2_WAN routing gateway" distance=1 \
gateway=90.90.90.1 routing-mark=to_ether2
add check-gateway=ping comment="ether3_WAN routing gateway" distance=10 \
gateway=192.168.14.1 routing-mark=to_ether3
add comment=ether1_WAN distance=1 gateway=80.80.80.87
add comment=ether2_WAN distance=1 gateway=90.90.90.1
add comment=ether3_WAN distance=10 gateway=192.168.14.1
add distance=1 dst-address=192.168.16.0/24 gateway=ether2_WAN
/system scheduler
add interval=30s name=LoadBalanceDynamicIP on-event=\
"/system script run LoadBalanceDynamicIP" policy=read,write,test \
start-date=feb/23/2019 start-time=14:51:08
/system script
add dont-require-permissions=no name=LoadBalanceDynamicIP owner=admin policy=\
read,write,test source="#:global newgw [/ip address get [find interface=\"\
ether1_WAN_PPPoE\"] address]\r\
\n:global newgw [/ip address get [find interface=\"ether1_WAN_PPPoE\"] net\
work]\r\
\n#:set newgw [:pick \$newgw 0 [:find \$newgw \"/\"]]\r\
\n:global activegw [/ip route get [/ip route find comment=\"ether1_WAN\"] \
gateway ]\r\
\n:if ([:len \$newgw]>0 and \$newgw != \$activegw) do={\r\
\n/ip route set [find comment=\"ether1_WAN\"] gateway=\$newgw\r\
\n/ip route set [find comment=\"ether1_WAN routing gateway\"] gateway=\$ne\
wgw\r\
\n}\r\
\n\r\
\n:global newgw [/ip dhcp-client get [find interface=\"ether2_WAN\" ] gate\
way ]\r\
\n:global activegw [/ip route get [/ip route find comment=\"ether2_WAN\"] \
gateway ]\r\
\n:if ([:len \$newgw]>0 and \$newgw != \$activegw) do={\r\
\n/ip route set [find comment=\"ether2_WAN\"] gateway=\$newgw\r\
\n/ip route set [find comment=\"ether2_WAN routing gateway\"] gateway=\$ne\
wgw\r\
\n}\r\
\n\r\
\n:global newgw [/ip dhcp-client get [find interface=\"ether3_WAN\" ] gate\
way ]\r\
\n:global activegw [/ip route get [/ip route find comment=\"ether3_WAN\"] \
gateway ]\r\
\n:if ([:len \$newgw]>0 and \$newgw != \$activegw) do={\r\
\n/ip route set [find comment=\"ether3_WAN\"] gateway=\$newgw\r\
\n/ip route set [find comment=\"ether3_WAN routing gateway\"] gateway=\$ne\
wgw\r\
\n}"