/ip firewall address-list
add address=192.168.10.0/24 list=Local-Subnet
add address=192.168.10.122 list=WAN-1
add address=192.168.10.102 list=WAN-1
add address=192.168.10.182 list=WAN-1
add address=192.168.10.132 list=WAN-1
add address=192.168.10.108 list=WAN-2
add address=192.168.10.115 list=WAN-2
add address=192.168.10.242 list=WAN-2
/ip firewall mangle
add action=mark-connection chain=input in-interface=ether1 \
new-connection-mark=From-WAN-1 passthrough=yes
add action=mark-routing chain=output connection-mark=From-WAN-1 \
new-routing-mark=To-WAN-1 passthrough=yes
add action=mark-connection chain=input in-interface=ether2 \
new-connection-mark=From-WAN-2 passthrough=yes
add action=mark-routing chain=output connection-mark=From-WAN-2 \
new-routing-mark=To-WAN-2 passthrough=yes
add action=mark-routing chain=prerouting dst-address-list=!Local-Subnet \
new-routing-mark=To-WAN-1 passthrough=yes src-address-list=WAN-1
add action=mark-routing chain=prerouting dst-address-list=!Local-Subnet \
new-routing-mark=To-WAN-2 passthrough=yes src-address-list=WAN-2
add action=mark-packet chain=forward dst-address-list=WAN-1 new-packet-mark=\
To-WAN-1-Down passthrough=yes
add action=mark-packet chain=forward new-packet-mark=To-WAN-1-Up passthrough=\
yes src-address-list=WAN-1
add action=mark-packet chain=forward dst-address-list=WAN-2 new-packet-mark=\
To-WAN-2-Down passthrough=yes
add action=mark-packet chain=forward new-packet-mark=To-WAN-2-Up passthrough=\
yes src-address-list=WAN-2
/ip route
add distance=1 gateway=81.21.12.1%ether1 routing-mark=To-WAN-1
add distance=1 gateway=81.21.12.1%ether2 routing-mark=To-WAN-2
add distance=1 gateway=81.21.12.1%ether2,81.21.12.1%ether1
/queue simple
add dst=ether1 max-limit=95M/95M name=Queue-WAN-1 target=192.168.10.0/24
add dst=ether2 max-limit=95M/95M name=Queue-WAN-2 target=\
192.168.10.0/24,192.168.11.0/24
add dst=ether1 limit-at=0/60M max-limit=0/95M name=WAN-1-Down packet-marks=\
To-WAN-1-Down parent=Queue-WAN-1 priority=7/7 target=192.168.10.0/24
add dst=ether2 limit-at=0/60M max-limit=0/95M name=WAN-2-Down packet-marks=\
To-WAN-2-Down parent=Queue-WAN-2 priority=6/6 target=192.168.10.0/24
add dst=ether1 limit-at=60M/0 max-limit=95M/0 name=WAN-1-Up packet-marks=\
To-WAN-1-Up parent=Queue-WAN-1 priority=7/7 target=192.168.10.0/24
add dst=ether2 limit-at=60M/0 max-limit=95M/0 name=WAN-2-Up packet-marks=\
To-WAN-2-Up parent=Queue-WAN-2 priority=6/6 target=192.168.10.0/24
add dst=ether1 limit-at=35M/35M max-limit=95M/95M name=WAN-1-Other parent=\
Queue-WAN-1 target=192.168.10.0/24
add dst=ether2 limit-at=35M/35M max-limit=95M/95M name=WAN-2-Other parent=\
Queue-WAN-2 priority=7/7 target=192.168.10.0/24
add dst=ether2 max-limit=10M/10M name=WAN-2-Guest parent=Queue-WAN-2 target=\
192.168.11.0/24