named UDP retransmit timeouts ?

Jason Vas Dias jason.vas.dias at gmail.com
Fri Jul 23 12:52:10 UTC 2021


Good day bind experts -

 Please can anyone advise the best way to optimize named's
 UDP timeout settings for caching-only local resolver usage
 over a slow network link - I can't seem to find any in the
 Bv9ARM document specifically describing how named
 implements UDP re-transmits - please could someone
 point me at the right pages or place to look, besides
 the source code, which I am reading now, if there are any ?

 My problem is that at home my whole internet goes through
 one 100M CAT-6 ethernet cable to a GSM 3G/4G modem (90% 3G WCDMA) ,
 it seems no more than about 128 kilobyte/sec download & less upload
 bandwidth is available, whenever my browser decides to download
 something large (like a JavaScript blob) , then DNS requests
 start timing out, the browser keeps re-issuing its requests,
 and similar nasty feedback situations occur when the GSM
 modem's DHCP lease expires and it has to re-setup its NAT for
 the ethernet link, so all UDP requests time out for about
 10 seconds, building up quite a backlog.

 I have tried playing around with named.conf settings:
   resolver-retry-interval 8;
   resolver-retry-time    32;
   max-retry-time         32;
 but they don't seem to help - I still get a 'DNS freeze'
 situation for about 10-30 seconds when the GSM modem
 renegotiates its DHCP lease, during a yum / dnf 'update',
 during large browser downloads or stream playing ...

 My Linux v5.12.17 (Fedora-34) x86_64 box runs named 9.6.18
 from the Fedora RPM, and hosts a Windows 10 VM, which is quite a
 chatty DNS user, and runs a hostapd instance through which traffic from a
 local network of 3 Android mobile phones use as their default
 data connection, which also use the laptop's DNS server,
 and send SIP voice traffic through my company's SIP server which I
 maintain , so the Linux box does NAT for the Windows VM and for the
 Android mobile clients, the laptop named instance serves authorative
 zones for my localhost, local VMs and DMZ Android Mobile phone units, 
 and ALL hosts, including the windows host, use BIND named running
 on the Linux laptop gateway, which is the default route endpoint
 for all hosts, and which has a 'forwarders { ... };'  clause in
 named.conf containing my Cellular Network provider's DNS server IP
 addresses . These remote Cellular DNS servers can respond very slowly at peak
 internet usage times. It is nice to be able to see all packets from the
 android mobile phones with tcpdump, and to be able to receive
 the voice traffic that they send to our cloud SIP server
 (which I can see being NAT-ed), and the SIP server sends
 back, which get NAT-ed to the Windows VM Dispatcher and
 audio playback GUI running on the laptop which I also maintain .
 My BIND named server also implements an RBL blacklist kindly made available
 as a hosts file, which I convert to a Response Policy Zone file,
 at https://someonewhocares.org/hosts . DNSSEC is also enabled
 by default.
 
 My named.conf has a clause:

     allow-query { localhost; 192.168.W.0/24; 192.168.M.0/24;
                   192.168.V.0/24;
                 };
 where W is Windows VM network, M is mobile device network,
 and V is my corporate L2TP/IPSEC VPN network, also doing NAT,
 and one 'localhost-resolver' "View" with
     match-clients { /* same as above */ } ;
 and
     recursion yes;

 This setup works great on a normal office LAN , where there
 are multiple hops to the internet available, but not on my
 home slow single ethernet connection to the whole ethernet,
 through a modem that must peridically renegotiate a DHCP lease.
 When the modem renegotiates its DHCP lease every hour, I typically
 have to restart named and hostapd . 

 I just want named to notice that the response times to
 the forwarders are increasing , and to increase its
 number of UDP re-transmit attempts and timeout time (time
 between attempts ) accordingly, and vice versa
 (decrease them back to defaults when forwarder responsiveness
 improves).
 
 Before I start hacking the named udp.c server code , please
 could anyone advise if there are ways through configuration
 settings to adjust the named UDP re-transmit timeout & number
 of attempts strategy for slow networks ?

 I can't believe there aren't any ?

Thanks in advance for any informative replies,
Best Regards,
Jason Vas Dias



 

 
 
 


More information about the bind-users mailing list