i have 4 dsl lines, if one or route stopped how redirect to second route or third....
many thx
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1
add disabled=no distance=3 dst-address=0.0.0.0/0 gateway=pppoe-out2
add disabled=no distance=5 dst-address=0.0.0.0/0 gateway=pppoe-out3
add disabled=no distance=7 dst-address=0.0.0.0/0 gateway=pppoe-out4
working for me ....not working?
route with 192.168.1.1 will become invalid, so next valid route (based on distance) will be used ...how goes the line from gateway=192.168.1.1 to gateway=192.168.2.1
if 192.168.1.1 stopped
Specific answers require specific questions. When in doubt, post the output of "/ip address print detail", "/ip route print detail", "/interface print", "/ip firewall export", and an accurate network diagram.
:global ping1 [/ping 192.168.2.1 count=3 routing-table=ether1_traffic]
:global ping2 [/ping 192.168.3.1 count=3 routing-table=ether2_traffic]
:global gw1 [/ip route get number=0 gateway-status]
:global gw2 [/ip route get number=1 gateway-status]
:if (($ping1=0) && ($ping2=3) && ($gw1="192.168.2.1 reachable ether1")) do={/ip route disable numbers=[find gateway=192.168.2.1]; [:log info "disabling route 2.1"];}
:if (($ping1=3) && ($ping2=3) && ($gw1!="192.168.2.1 reachable ether1")) do={/ip route enable numbers=[find gateway=192.168.2.1]; [:log info "enabling route 2.1"];}
:if (($ping1=3) && ($ping2=0) && ($gw2="192.168.3.1 reachable ether2")) do={/ip route disable numbers=[find gateway=192.168.3.1]; [:log info "disabling route 3.1"];}
:if (($ping1=3) && ($ping2=3) && ($gw2!="192.168.3.1 reachable ether2")) do={/ip route enable numbers=[find gateway=192.168.3.1]; [:log info "enabling route 3.1"];}
:if (($ping1=0) && ($ping2=0)) do={[/ip route enable numbers=[find gateway=192.168.2.1]]; [/ip route enable numbers=[find gateway=192.168.3.1]]; [:log info "fail safe enabling 2.1 and 3.1"];}
and what about ARP:Actually, I can not use PING for gateway checking as my ISP will selectively filter out ICMP echo requests in case of "network overload" and they insist that PINGing the default gateway for network condition checking is bad thing to have.