
I've been using Mikrotik and RouterOS for quite some years now.
I've always load-balanced 2 lines (ISPs) up to 5 lines together using almost same configurations, same script, both in RouterOS v6 and v7.
Recently, I did setup a router with 2 (PPPoE), but the traffic keeps going to one line, ignoring the route-mark.
Here is basic configurations export:
Code: Select all
/interface ethernet
set [ find default-name=ether1 ] name=out1
set [ find default-name=ether2 ] name=out2
set [ find default-name=ether5 ] name=wan1
set [ find default-name=ether6 ] name=wan2
/interface list
add name=LAN
/interface list member
add interface=out1 list=LAN
add interface=out2 list=LAN
/ip pool
add name=dhcp_pool0 ranges=172.16.0.2-172.16.0.254
/ip dhcp-server
add address-pool=dhcp_pool0 interface=out2 name=dhcp1
/routing table
add fib name=to-wan1
add fib name=to-wan2
/ip address
add address=172.16.0.1/24 interface=out2 network=172.16.0.0
/ip dhcp-server network
add address=172.16.0.0/24 dns-server=192.168.8.1 gateway=172.16.0.1
/ip dns
set cache-size=20480KiB max-concurrent-queries=200 \
max-concurrent-tcp-sessions=50
/ip firewall address-list
add address=192.168.0.0/16 list=LOCAL-IP
add address=172.16.0.0/12 list=LOCAL-IP
add address=10.0.0.0/8 list=LOCAL-IP
/ip firewall mangle
add action=mark-connection chain=input in-interface=wan1 new-connection-mark=\
cm-wan1 passthrough=yes
add action=mark-connection chain=input in-interface=wan2 new-connection-mark=\
cm-wan2 passthrough=yes
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface-list=LAN new-connection-mark=cm-wan1 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface-list=LAN new-connection-mark=cm-wan2 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=cm-wan1 \
in-interface-list=LAN new-routing-mark=to-wan1 packet-mark="" \
passthrough=yes
add action=mark-routing chain=prerouting connection-mark=cm-wan2 \
in-interface-list=LAN new-routing-mark=to-wan2 passthrough=yes
add action=mark-routing chain=output connection-mark=cm-wan1 \
new-routing-mark=to-wan1 passthrough=yes
add action=mark-routing chain=output connection-mark=cm-wan2 \
new-routing-mark=to-wan2 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
add action=masquerade chain=srcnat out-interface=pppoe-out2
/ip route
add check-gateway=ping distance=1 gateway=pppoe-out1 routing-table=to-wan1
add check-gateway=ping distance=1 gateway=pppoe-out2 routing-table=to-wan2
Help is more than appreciated..!!