Setting Static IP Address on Solaris 11

From DHCP to static IP address

netadm list
netadm enable -p ncp DefaultFixed
dladm show-phys
ipadm create-ip net0
ipadm create-addr -T static -a local=192.168.1.141/24 net0/v4
ipadm show-addr
dladm show-link
route -p add default 192.168.1.1

DNS

svccfg -s network/dns/client setprop config/nameserver = 192.168.1.1
svccfg -s network/dns/client listprop config
svcadm refresh /network/dns/client
svcadm restart /network/dns/client

nsswitch.conf

svccfg -s name-service/switch setprop config/host = astring: '("files dns")'
svccfg -s name-service/switch listprop config
svcadm refresh name-service/switch
svcadm restart name-service/switch