Configuring DNS services in Solaris 11

Modifying /etc/nsswitch.conf and /etc/resolv.conf to configure naming services is depricated in Solaris 11, This task is now managed under SMF.

This short article provides the key steps needed to configure DNS services within Solaris 11.

Configure name-service switch (nsswitch.conf)

root@sol11# svccfg -s name-service/switch "setprop config/host = astring: \"files dns\""
root@sol11# svcadm restart name-service/switch

Define new DNS settings (resolv.conf)

root@sol11# svccfg -s dns/client "setprop config/nameserver = net_address:"
root@sol11# svccfg -s dns/client "setprop config/domain = astring:"
root@sol11# svccfg -s dns/client "setprop config/search = astring:"
root@sol11# svcadm enable dns/client