check-gateway more than each 10s.

check-gateway:
“Periodically (every 10 seconds) check gateway by sending either ICMP echo request (ping) or ARP request (arp). If no response from gateway is received for 10 seconds, request times out. After two timeouts gateway is considered unreachable. After receiving reply from gateway it is considered reachable and timeout counter is reset.”

So, for some reason this is very fast for me.
Is there any way to check gateway and change it only if there is no “channel” more then 1 min. (the same for coming back).

May be somebody has a script for that.
Is it possible to share it with me? :unamused:

AnyOne?

hi mangust .


i use that ,

after 5 requset , if averge of request less a 1 , set gateway to disable and automatic get next gateway for use . what principle that : I get icmp request on ns server of that isp from the same ip range what i use from that isp , what exclude it not work if use next gateway the another ip range .


script:

:local Repeat 5
:local Count1 [/ping 172.16.77.2  src-address=172.16.0.77 count=$Repeat size=64 interval=1000ms];

:log info  $Count1
# Check if not reachable
:if (([/ip route get [find comment="that_ISP"] disabled]=false) \
&& (($Count1 = 0) )) do={
  /ip route set [find comment="that_ISP"] disabled=yes
  :log error "that_ISP gateway is dead"
}

# Check if reachable
:if (([/ip route get [find comment="that_ISP"] disabled]=true) \
&& (($Count1 >=1 ) )) do={
  /ip route set [find comment="that_ISP"] disabled=no
  :log error "that_ISP gateway up"
}

and put on scheduler wich 25s interval.

THX, will try to use it.