Dns correct sequency in /etc/resolv.conf

BsDjUsTbSd

Member

Reaction score: 3
Messages: 44

Hello,

in /etc/resolv.conf should i put ipv6 and then ipv4 with nameserver or ipv4 first and ipv6.
or it doesn't matter?
 

Phishfry

Son of Beastie

Reaction score: 1,735
Messages: 4,811

Whether /etc/resolv.conf is even needed to be setup is depending on your connection type.
DHCP connections use the resolvconf service to store settings in /etc/resolv.conf
So unless you use static IP on your ethernet interface this step is not even needed.
/etc/resolv.conf is automatically populated on DHCP connections.

The ordering of /etc/resolv.conf does not matter to answer your question.
Only if you have two identical keywords does it matter.
For instance:
Code:
nameserver 1.1.1.1
nameserver 8.8.8.8
In this case the first value is used first and waits 5 seconds before moving to the second value if no connection is available on the first value.
Code:
options timeout:1
This would reduce the keyword value to one second before rolling over to the second value.

You only need to use this to override your DHCP server settings on individual machines.
Like changing the DNS nameserver.

So it goes like this.
dhclient receives the information from the DHCP server and passes it to resolvconf which stores the info in /etc/resolv.conf.
 
OP
BsDjUsTbSd

BsDjUsTbSd

Member

Reaction score: 3
Messages: 44

`The ordering of /etc/resolv.conf does not matter to answer your question.`
Thanks for actually answering my question
 
Top