[OpenWrt-Devel] ddns-scripts "sleep 10" before updating?

Christian Schoenebeck christian.schoenebeck at gmail.com
Fri Jan 16 04:36:38 EST 2015


Am 16.01.2015 um 03:07 schrieb Catalin Patulea:
> On Thu, Jan 15, 2015 at 3:28 PM, Christian Schoenebeck
> <christian.schoenebeck at gmail.com> wrote:
>> I did a lot of testing with a user using satellite Internet connection.
>> He quickly gets his IP from the modem but he needs to use a global dns server to verify his registered ip via tcp
>> because the modem buffers all udp dns requests not looking for any timeouts.
>> For him it takes same seconds until the connection was established to the web after getting his ip from the modem.
> Let me see if I understand.. so after his interface comes up,
> dynamic_dns_updater was getting stuck on "get_registered_ip" because
> the connection to the web is not yet up? Perhaps this could be handled
> by a timeout on the host/nslookup command?
> 
> I also think this is an edge case - in most cases, you can call
> get_registered_ip immediately and it will work.
> 
>> The "5 minutes" I tested the easy way.
>> On my ubuntu box I ran nslookup for my own ddns-address against Google's public dns in an endless loop.
>> Then I send out a new ip to my ddns provider via ddns-scripts and wait.
>> The longest time it takes to have a stable answer from nslookup was 4 minutes 10 seconds.
>> Plus reserve = 5 minutes. Also the reason why check_interval minimum is set to 5 minutes = 300 seconds
>> in line 176 of dynamic_dns_updater.sh.
> 
> I understand that the latency through Google public dns is 5 minutes,
> but not everyone uses Google public dns, and your test is not
> representative of queries for cache-cold records.
> 
> I tried adding a new record to my domain to see what happens on a
> query that is not already in the cache. This is the same case as
> updating an existing DDNS entry that hasn't been accessed in a long
> time.
> 
> The record was immediately (<15 seconds, while I typed the commands)
> available in my DNS provider's server, my ISP's server, and 8.8.8.8.
> The intermediate servers didn't even know if the record exists, so
> they had to contact the authoritative server. Probably if I update the
> IP now, it will take a long time to propagate, but this is not a
> common case for me.
> 
> What I want is that if I get a new IP/router crashes/power outage, for
> my IP to be updated in the authoritative DNS server as soon as
> possible. It is rare that I access my DDNS just before this
> (crash/power outage/etc.) happens, so the record will not be cached,
> so if I access it now, I will see the fresh IP in any DNS server. In
> this case the "sleep 10" is the limiting factor.
> 
> I think probably this is the case for most DDNS users - they probably
> access their records very rarely, so they are not cached, so "sleep
> 10" is the biggest factor to how quickly their new address is visible.
> But I can't speak definitively about any but my case.
> 
> Perhaps the sleep could be a configuration option which defaults to 0.
> Specific users can set it if they need it.
> 
Did you really ever run into problems because of 10 seconds delay after an outage of thousands of seconds ?
What do your ddns provider think about multiple updates per minute, if the connection toggle due to errors on your wan connection. Most providers start blocking for hours after to many updates.
For the moment please comment out the 4 lines starting at line 219 of dynamic_dns_updater.sh
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list