Dual WAN Automatic Failover Steps
- Remove ether2 from bridge. Add ether2 to WAN interface list
- Set ether1 Add Default Route = no, uncheck Use Peer DNS
Add DCHP Client ether2, same config as ether1 - Add the following DCHP Client Scripts
- Add routes
- Add DNS Servers, check “Allow Remote Requests”
SCRIPTS:
DHCP Clients
ether 1
:if ($bound=1) do={
/ip route set [find comment="wan1-rec-target"] gateway=$"gateway-address" check-gateway=ping;
}
ether 2
:if ($bound=1) do={
/ip route set [find comment="wan2-rec-target"] gateway=$"gateway-address" check-gateway=ping;
}
add routes script
/ip route
add dst-address=1.1.1.1 distance=1 scope=10 target-scope=10 comment=wan1-rec-target
add dst-address=0.0.0.0/0 gateway=1.1.1.1 distance=1 scope=10 target-scope=11 check-gateway=pingcomment=wan1-default
add dst-address=8.8.8.8 distance=1 scope=10 target-scope=10 comment=wan2-rec-target
add dst-address=0.0.0.0/0 gateway=8.8.8.8 distance=2 scope=10 target-scope=11 check-gateway=pingcomment=wan2-default