Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
For example:
$ svccfg -s network/dns/client svc:/network/dns/client> setprop config/search = astring: ("domain1" "domain2") svc:/network/dns/client> setprop config/nameserver = net_address: (address1 address2) svc:/network/dns/client> select network/dns/client:default svc:/network/dns/client:default> refresh svc:/network/dns/client:default> validate
domain* refers to domain names such as example.com, sales.my-example.com, and so on. address* are IP addresses of your DNS servers.
svc:/network/dns/client:default> select name-service/switch svc:/system/name-service/switch> setprop config/host = astring: "files dns" svc:/system/name-service/switch> select system/name-service/switch:default svc:/system/name-service/switch:default> refresh svc:/system/name-service/switch:default> validate svc:/system/name-service/switch:default> quit
$ svcadm enable dns/client $ svcadm enable name-service/switch
Various methods are available. The following list is only partial.
Check for known domains.
$ dig knownserver.example.com
Start a lookup process of known domains.
$ nslookup > www.oracle.com information displayed > exit $
Open a browser and type a known URL to access a site.
The following example shows how to set multiple /etc/resolv.conf options simultaneously.
$ svccfg svc:> select /network/dns/client svc:/network/dns/client> setprop config/options = "ndots:2 retrans:3 retry:1" svc:/network/dns/client> listprop config/options config/options astring ndots:2 retrans:3 retry:1 svc:/network/dns/client> exit $ svcadm refresh dns/client $ grep options /etc/resolv.conf options ndots:2 retrans:3 retry:1