49、linux shell命令,host,nslookup,dig
2011-09-29 10:23
821 查看
1、host
1)DNS lookup utility
host option {name} [server]
使用 /etc/resolv.conf 中server来作为 DNS 服务器的来源选择
2)option
-a :列出该主机详细的各项主机名称设定资料
3)示例
host www.google.com
2、nslookup -
query Internet name servers interactively。和host差不多。
nslookup [-query=[type]] [hostname|IP]
type有mx,cname等。
nslookup -query=mx www.google.com
3、dig
1) dig [@dns_server] [option] name [type]
dns_server为DNS服务器,未指定使用系统默认DNS服务器(/etc/resolv.conf的nameserver);type指定查询类型,可用的值为 ANY | A | MX | SOA | PTR| TXT | NS | CNAME等。
2)option
-x 反向解析,查询指定IP的PTR记录(即域名)
-b 指定发送查询时使用的源IP地址
3)示例
dig -x 192.168.0.1
dig www.baidu.com
参考
【1】 对dig进行参考进行了简述
http://hi.baidu.com/test/blog/item/b728c65c1ad28c4bfbf2c091.html
【2】 http://linux.vbird.org/linux_server/0140networkcommand.php#host
【3】 对dig参考进行了详述
http://bbs.linuxsky.org/thread-3054-1-1.html
1)DNS lookup utility
host option {name} [server]
使用 /etc/resolv.conf 中server来作为 DNS 服务器的来源选择
2)option
-a :列出该主机详细的各项主机名称设定资料
3)示例
host www.google.com
2、nslookup -
query Internet name servers interactively。和host差不多。
nslookup [-query=[type]] [hostname|IP]
type有mx,cname等。
nslookup -query=mx www.google.com
3、dig
1) dig [@dns_server] [option] name [type]
dns_server为DNS服务器,未指定使用系统默认DNS服务器(/etc/resolv.conf的nameserver);type指定查询类型,可用的值为 ANY | A | MX | SOA | PTR| TXT | NS | CNAME等。
2)option
-x 反向解析,查询指定IP的PTR记录(即域名)
-b 指定发送查询时使用的源IP地址
3)示例
dig -x 192.168.0.1
dig www.baidu.com
参考
【1】 对dig进行参考进行了简述
http://hi.baidu.com/test/blog/item/b728c65c1ad28c4bfbf2c091.html
【2】 http://linux.vbird.org/linux_server/0140networkcommand.php#host
【3】 对dig参考进行了详述
http://bbs.linuxsky.org/thread-3054-1-1.html
相关文章推荐
- CentOS用host、dig、nslookup查询DNS命令
- host、nslookup、dig命令(转载)
- nslookup,dig,host等工具命令实例
- linux安装nslookup,dig,host命令
- host、nslookup和dig命令的使用
- DNS的正、反解查询命令:host、nslookup、dig
- DNS相关命令ping、host、nslookup、dig、nsupdate学习
- host、nslookup、dig命令的使用
- centos中没有host dig nslookup命令的解决办法
- host、dig、nslookup 查询DNS命令
- linux中与域名解析和反解相关的命令host|nslookup|dig
- windows下的dig 命令和nslookup的用法及详例
- DNS正、反解析查询指令host、dig、nslookup
- DNS查询指令:host 、nslookup 、dig 详解
- Install dns-utils(dig, nslookup, host) On iPhone
- windows 系统下安装 dig 命令和nslookup的用法及详例
- DNS查询工具:host、nslookup、dig
- linux下dig和nslookup命令的安装
- DNS查询指令:host 、nslookup 、dig 详解
- windows 系统下安装 dig 命令和nslookup的用法及详例