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

Christian Schoenebeck christian.schoenebeck at gmail.com
Thu Jan 15 15:28:17 EST 2015


Am 15.01.2015 um 06:17 schrieb Catalin Patulea:
> On Tue, Jan 13, 2015 at 8:56 AM, Christian Schoenebeck
> <christian.schoenebeck at gmail.com> wrote:
>> from my point of view 10 seconds to wait before sending an update to the ddns provider is not a big deal because it takes up to 5 minutes until "nslookup [yourhost] 8.8.8.8" gives you back a static answer after a change.
>> So Google's mameserver need up to 5 Minutes to sync themselves.
> How did you conclude about the 5 minutes? Technically caching DNS
> servers should respect the TTL of the original record. RFC 1035 even
> allows zero TTL to prevent caching. I agree that some servers may
> actually impose a minimum TTL, but ddns-scripts should not make any
> assumptions about this.
> 
> In my case, I have DDNS records which are rarely accessed (are not
> likely to be cached by intermediate DNS servers). When a client makes
> a DNS request for my DDNS name, it will be forwarded the entire way to
> the authoritative DNS server. So the openwrt update latency dominates
> the delay, not TTL expiration, so it's useful for me to update ASAP
> after the interfaces gets an address.
> 
> Are you still planning on running some tests on your side?
> 
I did some quick test. You are right that netifd calls hotplug now if ip-setup finished.
I also looked into my email history and found the point where this sleep comes into the script.
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.

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.
_______________________________________________
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