Hi.
What I have:
- WAN 1 (DHCP via provider’s router, i.e. double NAT)
WAN 2 (connected to 5G router, 5G router in a bridge mode)
single LAN
What I want:
Split traffic into 2 group: first group should prefer WAN 1, second - WAN 2 (in both cases with failover).
How am I supposed to achieve this:
Create 2 routing table. Each has two default routes with different distance.
Table “main”:
- WAN 1 has distance 1
WAN 2 has distance 2
Table “prefer-mobile”
- WAN 1 has distance 2
WAN 2 has distance 1
In mangle prerouting mark second type of traffic with routing mark “prefer-mobile”.
What works fine
Without separating second type of traffic (i.e. without marking some traffic with “prefer-mobile” routing mark) all works as expected, including WAN’s failover.
Problem
As soon as I enable traffic separation, at least this separated traffic stops working.
What is missing/wrong?
/ip route
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
192.168.120.1 routing-table=prefer-mobile suppress-hw-offload=no
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
1.2.3.4 pref-src="" routing-table=prefer-mobile suppress-hw-offload=\
no
/ip firewall mangle
add action=mark-routing chain=prerouting comment=\
"Prefer routing HTTP(s) via WAN-Mobile" disabled=yes dst-address-type=\
!local dst-port=80,443 in-interface-list=LAN new-routing-mark=\
prefer-mobile passthrough=yes protocol=tcp