2017-02-24

Replacing DNS Nameserver in Oracle Solaris 11

Reference: https://docs.oracle.com/cd/E23824_01/html/821-1455/dnsref-31.html#dnsref-36

root@lyon:~# svccfg -s system/name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: "files dns"
svc:/system/name-service/switch>exit
root@lyon:~# nscfg export svc:/network/dns/client:default
root@lyon:~# svcadm enable network/dns/client
root@lyon:~# svcadm enable system/name-service/switch

root@lyon:~# 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.
domain  localdomain
search  mondragon.dk
nameserver      8.8.8.8
nameserver      208.67.222.123

root@lyon:~# svcadm refresh dns/client && svcadm restart dns/client

No comments:

Post a Comment