Solaris11配置dns

来源:互联网 发布:me342lla支持什么网络 编辑:程序博客网 时间:2024/05/22 15:08

Solaris11配置dns-两步曲

root@solaris:~# svccfg -s dns/client
svc:/network/dns/client> list
:properties
default
svc:/network/dns/client> help
General commands:        help set repository end
Manifest commands:       inventory validate import export
Profile commands:        apply extract
Entity commands:         list select unselect add delete describe
Snapshot commands:       listsnap selectsnap revert
Instance commands:       refresh
Property group commands: listpg addpg delpg
Property commands:       listprop setprop delprop editprop
Customization commands:  listcust delcust
Property value commands: addpropvalue delpropvalue setenv unsetenv
Notification parameters: listnotify setnotify delnotify
svc:/network/dns/client> setprop config/nameserver = (202.106.0.20 8.8.8.8)
svc:/network/dns/client> 11stprop config
Unknown command "11stprop".
svc:/network/dns/client> listprop config
config                      application        
config/value_authorization astring     solaris.smf.value.name-service.dns.client
config/nameserver          net_address 202.106.0.20 8.8.8.8
svc:/network/dns/client> exit
root@solaris:~# svcadm refresh dns/client
root@solaris:~# svcadm restart dns/client
root@solaris:~# ping www.baidu.com
ping: unknown host www.baidu.com
root@solaris:~# nslookup www.baidu.com
Server:        202.106.0.20
Address:    202.106.0.20#53

Non-authoritative answer:
www.baidu.com    canonical name = www.a.shifen.com.
Name:    www.a.shifen.com
Address: 61.135.169.125
Name:    www.a.shifen.com
Address: 61.135.169.105

root@solaris:~#
root@solaris:~#
root@solaris:~# svccfg -sname-server/switch
svccfg: Pattern 'name-server/switch' doesn't match any instances or services
root@solaris:~# svccfg -s name-service/switch
svc:/system/name-service/switch>
svc:/system/name-service/switch>
svc:/system/name-service/switch> listprop config
config                      application        
config/default             astring     files
config/value_authorization astring     solaris.smf.value.name-service.switch
config/printer             astring     "user files"
svc:/system/name-service/switch> setprop config/host = "files dns"
svc:/system/name-service/switch> listprop config
config                      application        
config/default             astring     files
config/value_authorization astring     solaris.smf.value.name-service.switch
config/printer             astring     "user files"
config/host                astring     "files dns"
svc:/system/name-service/switch>
svc:/system/name-service/switch>
svc:/system/name-service/switch>
svc:/system/name-service/switch> exit
root@solaris:~#
root@solaris:~# reboot


原创粉丝点击