My setup is as follows:
- HEX at 192.168.178.1, bridge mode, DHCP server enabled, acts as gateway
- Fritz5G at 192.168.178.3, DHCP server disabled, static IP
- FritzDSL at 192.168.178.4, DHCP server disabled, static IP, acts as wifi hotspot (for traditional reasons)
Solution inspired by "Simpler Failover for two Gateways I found working"(viewtopic.php?t=198999)
I have two routes:
Code: Select all
/ip route
add check-gateway=none comment=WAN disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.178.3 pref-src="" routing-table=main suppress-hw-offload=no
add comment=5G-Ping disabled=no distance=1 dst-address=1.1.1.2/32 gateway=192.168.178.3 pref-src="" routing-table=main suppress-hw-offload=no
Basically, the 5G-Ping rule forces all traffic to 1.1.1.2 to always go through the Fritz5G.
I have a Netwatch rule that monitors 1.1.1.2 via ICMP and modifies the gateway of WAN depending on the 5G state:
Code: Select all
/tool netwatch
add disabled=no down-script="/ip route set [find comment=WAN] gateway=192.168.178.4" host=1.1.1.2 interval=30s test-script="" timeout=5s type=icmp up-script="/ip route set [find comment=WAN] gateway=192.168.178.3"
WARNING: With this setup, you get the dreaded router triangle (client -> 192.168.178.1 -> 192.168.178.3 -> example.com -> 192.168.178.3 -> client), i.e. packets delivered downstream skip 192.168.178.1. I had massive issues (latency ~5s, low bandwidth) with the default stateful-firewall configuration and removed ALL rules since my HEX is anyway only living in the LAN.