In Solaris 11, /etc/resolv.conf
is managed via SMF (Service Management Framework).
root@solaria:~# cat /etc/resolv.conf # # _AUTOGENERATED_FROM_SMF_V1_ # # WARNING: THIS FILE GENERATED FROM SMF DATA. # DO NOT EDIT THIS FILE. EDITS WILL BE LOST. # See resolv.conf(4) for details. nameserver 8.8.8.8
View existing DNS configuration
svccfg -s network/dns/client listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address 8.8.8.8
Update existing DNS configuration
svccfg -s network/dns/client setprop config/nameserver = net_address: "(208.67.222.222 208.67.220.220)"
Export DNS configuration
svcadm refresh dns/client
This command will build a new /etc/resolv.conf
based on the new settings:
nscfg export svc:/network/dns/client:default