Community discussions

MikroTik App
 
mangust
Member Candidate
Member Candidate
Topic Author
Posts: 224
Joined: Thu Jun 14, 2007 11:14 am

check-gateway more than each 10s.

Fri Feb 25, 2011 5:28 pm

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? :roll:
 
mangust
Member Candidate
Member Candidate
Topic Author
Posts: 224
Joined: Thu Jun 14, 2007 11:14 am

Re: check-gateway more than each 10s.

Mon Feb 28, 2011 10:07 am

AnyOne?
 
User avatar
mishaM
Frequent Visitor
Frequent Visitor
Posts: 84
Joined: Sun Oct 25, 2009 1:48 pm
Location: Georgia

Re: check-gateway more than each 10s.

Mon Feb 28, 2011 9:01 pm

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.
 
mangust
Member Candidate
Member Candidate
Topic Author
Posts: 224
Joined: Thu Jun 14, 2007 11:14 am

Re: check-gateway more than each 10s.

Tue Mar 01, 2011 10:22 pm

hi mangust .
i use that ,
...
and put on scheduler wich 25s interval.
THX, will try to use it.

Who is online

Users browsing this forum: No registered users and 23 guests