3
I'm having a name resolution problem in Solaris 11. According to the online Solaris guide, Chapter 12 Setting Up DNS Clients:
Client Set Up
Setting up DNS on a client machine involves two tasks:
Creating the /etc/resolv.conf file, as described in"Creating the resolv.conf File".
Modifying the /etc/nsswitch.conf file, as described in "Enabling a Machine to Use DNS".
...
However, when I open the file to make the change:
#
# _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.
domain home.pvt
So, the manual tells me to create and modify resolv.conf
, but resolv.conf
tells me not to modify it. When I attempt to modify it with svccfg
, the settings are not used.
How to add a nameserver to Solaris 11?
$ sudo cat /etc/nsswitch.conf
#
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
# DO NOT EDIT THIS FILE. EDITS WILL BE LOST.
# See nsswitch.conf(4) for details.
hosts: files dns mdns
ipnodes: files dns mdns
networks: files
protocols: files
rpc: files
ethers: files
...
And trying the svcconfig
tool:
$ sudo su -
Oracle Corporation SunOS 5.11 11.3 September 2015
# svccfg -s network/dns/client
svc:/network/dns/client> setprop config/nameserver = net_address: (172.16.1.1)
svc:/network/dns/client> exit
# ping www.google.com
ping: getaddrinfo: temporary name resolution failure
ping: unknown host www.google.com
Another try with OpenDNS and Google:
svc:/network/dns/client> setprop config/nameserver = net_address: (208.67.222.222 208.67.220.220 8.8.8.8)
exit
# ping www.google.com
ping: getaddrinfo: temporary name resolution failure
ping: unknown host www.google.com
# cat /etc/resolv.conf
...
domain home.pvt
How does your system get its IP address(es)? – Andrew Henle – 2016-07-18T10:03:53.197