I am managing a particular host machine, and I would like to locally add a new name server for it to query (i.e. not changing its name server settings via the dhcp server). It seems that there are multiple ways to add a new name server.
- Adding a 'nameserver ' directive directly to the resolv.conf file
- Adding a 'DNS{1,2}=address' directive to a ifcfg-ethX file
- Adding a 'append domain-name-servers' directive to a dhclient.conf file. (Let's assume the host is using dhcp).
Perhaps there are even more ways...
Which way is preferred? If I want the name server address to be persisted following restarts, and also be available for use immediately in the next lookup by the host, which option is best?
Thanks