Dual WAN Automatic Failover Steps

  1. Remove ether2 from bridge. Add ether2 to WAN interface list
  2. Set ether1 Add Default Route = no, uncheck Use Peer DNS
    Add DCHP Client ether2, same config as ether1
  3. Add the following DCHP Client Scripts
  4. Add routes
  5. 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=ping
comment=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=ping
comment=wan2-default

Leave a Reply

Your email address will not be published. Required fields are marked *