0

According to the documentation for interface configuration files in RHEL 6, an interface can specify which name server it would like to use by including the directive DNS{1,2}=address . The documentation states,

where address is a name server address to be placed in /etc/resolv.conf if the PEERDNS directive is set to yes

Let's say I define this line for two different interfaces. Which one will appear in resolv.conf? Each time a different interface is used, will resolv.conf be overwritten once again?

In general, in the circumstance of multiple interfaces, is there a good resource to determine which name server will be used by which interface?

Thanks.

ChaimKut
  • 191
  • 4
  • 9

1 Answers1

3

The network interface is not used to determine which name server to query. (It can't be done anyway, because you don't know which interface is going to be used until you know the IP.)

If you specify DNS entries for multiple interfaces they will all appear in resolv.conf, probably in the order in which the interfaces were brought up. By default name servers are queried in order, unless you've set options rotate in resolv.conf.

mgorven
  • 30,615
  • 7
  • 79
  • 122