Configure resolv.conf and nsswitch.conf

Hi,

I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf.

I used below to configure both settings:

# svccfg -s dns/client
svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa xx.xx.xx.bb)
svc:/network/dns/client> setprop config/domain = domain.com
svc:/network/dns/client> listprop config
config                      application
config/value_authorization astring     solaris.smf.value.name-service.dns.client
config/nameserver          net_address xx.xx.xx.aa xx.xx.xx.bb
config/domain       astring domain.com
svc:/network/dns/client> exit
# svcadm refresh dns/client
# svcadm restart dns/client
# svccfg -s name-service/switch
svc:/system/name-service/switch> setprop config/host = "files dns"
svc:/system/name-service/switch> setprop config/ipnode = astring: "files dns"
svc:/system/name-service/switch> listprop config
config                      application
config/default             astring     files
config/value_authorization astring     solaris.smf.value.name-service.switch
config/printer             astring     "user files"
config/host                astring     "files dns"
config/ipnode              astring     "files dns"
svc:/system/name-service/switch> exit
# svcadm refresh name-service/switch
# svcadm restart name-service/switch

Kindly advice. Thank you

---------- Post updated at 02:43 AM ---------- Previous update was at 01:52 AM ----------

Please disregard. Issue has been fixed by switching from automatic network to manual.

Thank you

Just for the record. there is an easier way to do this.

http://www.timwort.org/sol11tips/Configuring\_Sol11\_DNS_Client.pdf

the short story is that /etc/resolv.conf and nsswitch.conf are placeholders and will get overwritten by the svccfg on reboot. if you used the procedure outlined in the link above it will import the contents of those files into the svccfg and make it persistent across a reboot.