[CentOS] how to increase DNS reliability?

Thu Jul 25 20:42:26 UTC 2019
Paul Heinlein <heinlein at madboa.com>

On Thu, 25 Jul 2019, hw wrote:

>>  On Linux systems, you can set the timeout in /etc/resolv.conf, e.g.,
>> #  I think the default nameserver timeout is 5; use rotate
>> #  option if you prefer round-robin queries rather than
>> #  always using the first-listed first
>>  nameserver timeout:2 rotate
>>  nameserver timeout:2 rotate
>>  I'll admit that I'm not sure if those options are configurable on
>>  Mac and/or Windows workstations.
> It was those showing problems.
> Only 5 seconds isn't long enough that I would expect any problems. 
> What do I need to put into the ifcf files or tell nmcli to set these 
> options?

If you're using dhclient to manage addresses, then you can add the 
RES_OPTIONS variable to /etc/sysconfig/network:

# /etc/sysconfig/network
RES_OPTIONS="timeout:2 rotate"

Or, with even less patience:

RES_OPTIONS="timeout:1 retries:1 rotate"

Grep for RES_OPTIONS in /sbin/dhclient-script for the gory details.

Paul Heinlein
heinlein at madboa.com
45°38' N, 122°6' W