Community discussions

MikroTik App
 
Frostbyte
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Mon Dec 25, 2017 1:42 am

Ideas/Features for detnet

Mon Dec 25, 2017 3:19 am

Seeing the new detect-internet feature introduced on v6.41, I couldn't help but think how it can be further tooled to assist with WAN Failover mechanisms.
  • Introduce a GUI for it, in winbox.
  • Don't lock interfaces to states after X amount of time.
  • Allow the user to specify try (we have internet, and we check if we still have it) and retry (we don't have internet, and we check if it came back) intervals in seconds.
  • Allow the user to specify an IP/FQDN and port (optional) for testing, not just "8.8.8.8" or "cloud.mikrotik.com:30000"
  • Make on-event handlers, so users can execute scripts when the state changes. (e.g. Check for 3 consecutive failures, then alter the corresponding route distance)
  • Optional environment consisting of variables like: the ID of the 0.0.0.0 route associated with the interface we're checking internet connectivity for.
These are just a few ideas that I've already scripted in my own (home) infrastructure, if I think of any more, I'll be sure to follow-up.
 
marting
Member Candidate
Member Candidate
Posts: 172
Joined: Thu Aug 21, 2014 2:07 pm

Re: Ideas/Features for detnet

Thu Feb 15, 2018 1:24 pm

I also have three questions/suggestions for this feature:
1. How stable is cloud.mikrotik.com. If this address is unreachable it doesn´t mean there really is no internet.
2. Will it be possible to have another Mikrotik router as check partner in future?
3. Which data is transmitted to cloud.mikrotik.com. Had a look into with packetsniffer and saw 32bytes but could not recognize pattern. As there is a bugfix of detect-internet with a too long Router identitiy I guess at least Routername is being transmitted.
 
manuelm
newbie
Posts: 36
Joined: Sat Feb 15, 2014 10:37 pm

Re: Ideas/Features for detnet

Wed Feb 27, 2019 6:46 pm

Thank you for Sharing your script, I noticed that your last commit was about two months ago, so I'm assuming that it will work with my router.
I'm trying to used your script on a RB3011UiAS (arm) router v6.43.12, but when I run the command $provision auto. I get the following errors.

[Pwhismadmn@HISM-Backup] > $provision auto
[Provision][Info]: Provisioning all available modules.
[Provision][Info]: Provisioning gateways.
[Provision][Error]: The configuration variable WANNames cannot be left empty or co
ntain an invalid value.
[Provision][Error]: The configuration variable WANGateways cannot be left empty or
contain an invalid value.
[Provision][Error]: The configuration variable WANGatewayPrefix cannot be left emp
ty or contain an invalid value.
[Provision][Error]: The configuration variable BalancingRulePrefix cannot be left
empty or contain an invalid value.
[Provision][Error]: The gateways configuration is invalid, please check the config
file and try again.
[Provision][Info]: Provisioning failover.
[Provision][Error]: The failover module depends on the gateway selector module, pl
ease provision it and try again.
[Provision][Info]: Provisioning dyndns.
[Provision][Error]: The configuration variable DDNSService cannot be left empty or
contain an invalid value.
[Provision][Error]: The configuration variable DDNSUsername cannot be left empty o
r contain an invalid value.
[Provision][Error]: The configuration variable DDNSPassword cannot be left empty o
r contain an invalid value.
[Provision][Error]: The configuration variable DDNSHostname cannot be left empty o
r contain an invalid value.
[Provision][Error]: The dyndns configuration is invalid, please check the config f
ile and try again.
[Provision][Info]: Provisioning resolver.
[Provision][Info]: Provisioning livestream.
[Provision][Error]: The configuration variable LVStreamList cannot be left empty o
r contain an invalid value.
[Provision][Error]: The configuration variable LVStreamFQDN cannot be left empty o
r contain an invalid value.
[Provision][Error]: The configuration variable LVStreamRulePrefix cannot be left e
mpty or contain an invalid value.
[Provision][Error]: The livestream configuration is invalid, please check the conf
ig file and try again.
[Provision][Error]: Completed with errors.

This is the configuration settings I'm using to test your script. I edited the original cfg file.

[Gateways]
WANNames=WAN1,WAN2
WANGateways=172.31.31.1,10.20.20.1
WANGatewayPrefix=Default route
BalancingRulePrefix=LDBLNCR

[Failover]
FailoverTarget=8.8.8.8
FailoverThreshold=1
FailoverInterval=1

[DynDNS]
DDNSService=NoIP
DDNSInterval=3600
DDNSUsername=username
DDNSPassword=password123
DDNSHostname=hostname.no-ip.org

[Livestream]
LVStreamList=Livestream
LVStreamFQDN=livestream.com
LVStreamRulePrefix=LVSTRM

Any help will be greatly appreciated.

Thank you,

Jose

Who is online

Users browsing this forum: eworm, mbovenka, next111 and 74 guests