O comportamento padrão do resolv.conf e do resolvedor é tentar os servidores na ordem listada. O resolvedor tentará apenas o próximo servidor de nomes se o primeiro servidor de nomes expirar. A página de manual do resolv.conf diz:
nameserver Name server IP address
Internet address (in dot notation) of a name server that the resolver should query. Up to MAXNS (currently 3, see ) name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed.
E:
(The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.)
Veja também a página de manual do resolvedor (5) para obter mais informações.
Você pode alterar o comportamento do resolvedor usando rotate
, que consultará os Nameservers em uma ordem round-robin:
rotate sets RES_ROTATE in _res.options, which causes round robin selection of nameservers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.
No entanto, o nslookup usará o segundo servidor de nomes se receber um SERVFAIL
do primeiro servidor de nomes. A partir da página mans do nslookup :
[no]fail Try the next nameserver if a nameserver responds with SERVFAIL or a referral (nofail) or terminate query (fail) on such a response.
(Default = nofail)