Friday, 20 May 2016

FAIL OVER for 2 Wan Links

/ip address
add address=192.168.10.1/24 disabled=no interface=Lan network=192.168.10.0
add address=192.168.1.2/24 disabled=no interface=Wan_1 network=192.168.1.0
add address=192.168.2.2/24 disabled=no interface=Wan_2 network=192.168.2.0

/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB \
max-udp-packet-size=512 servers=192.168.1.1,192.168.2.1


/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=WAN_1
add action=masquerade chain=srcnat disabled=no out-interface=WAN_2

/ip route
add check-gateway=ping comment="Wan 1 Primary Link" distance=1 gateway=\
    8.8.8.8
add check-gateway=ping comment="Wan 2 Sesondary Link" distance=2 gateway=\
    216.58.218.174
add comment="Wan 1 Primary Link " distance=1 dst-address=8.8.8.8/32 gateway=\
    192.168.1.1 scope=10
add comment="Wan 2 Sesondary Link" distance=1 dst-address=216.58.218.174/32 \
    gateway=192.168.2.1 scope=10

No comments:

Post a Comment