- 论坛徽章:
- 0
|
Solaris网络管理(原创)
相应斑竹的号召,增加DNS的内容
三、DNS
1)DNS客户端的配置
文件:etc/resolv.conf
举例:
# more /etc/resolv.conf
nameserver 192.16.25.3
domainname xiaojg.com.cn
文件:/etc/nsswitch.conf
举例:# more /etc/nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: xiaojg
group: xiaojg
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: xiaojg dns
ipnodes: xiaojg
…
命令:nslookup
描述:
用于查询DNS服务器
用于验证客户端的设置
用于下载DNS数据库
举例:
# nslookup
Default Server: ns.zjhzptt.net.cn
Address: 202.96.96.68
>; www.sun.com
Server: ns.shptt.net.cn
Address: 202.96.96.68
Non-authoritative answer:
Name: www.sun.com
Address: 192.18.97.241 |
|