云计算学习路线教程大纲课件客户端查询:

====================================================================================

nslookup,host,dig

客户端指定本地DNS

[root@tianyun ~]# cat /etc/resolv.conf

nameserver 192.168.2.115

[root@tianyun ~]# dig www.baidu.com

[root@tianyun ~]# nslookup www.baidu.com

[root@tianyun ~]# host www.baidu.com

dig (Linux)

[root@tianyun ~]# dig www.126.com //使用/etc/resolv.conf设置的DNS

[root@tianyun ~]# dig @192.168.2.168 www.126.com //使用指定的DNS

[root@tianyun ~]# dig @192.168.2.100 www.126.com //使用指定的DNS

host (Linux)

[root@tianyun ~]# host -t A www.baidu.com //正向解析,查询A记录

[root@tianyun ~]# host 192.168.5.100 //反向解析,查询PTR记录

[root@tianyun ~]# host www.baidu.com 192.168.5.240 //使用DNS服务器192.168.5.240解析

[root@tianyun ~]# host -t SOA baidu.com //查询某个域的SOA

baidu.com has SOA record ns.baidu.com. root.baidu.com. 2013081303 3600 900 604800 86400

[root@tianyun ~]# host -t NS baidu.com //查询某个域的NS

baidu.com name server ns.baidu.com.

baidu.com name server ns2.baidu.com.

[root@tianyun ~]#

[root@tianyun ~]# host -t MX baidu.com //查询某个域的邮件服务器

baidu.com mail is handled by 10 mail.baidu.com.

nslookup (Linux/Windows)

[root@tianyun ~]# nslookup www.baidu.com

[root@tianyun ~]# nslookup 192.168.5.100

[root@tianyun ~]# nslookup

www.baidu.com

Server: 127.0.0.1

Address: 127.0.0.1#53

Name: www.baidu.com

Address: 192.168.5.100

192.168.5.2

Server: 127.0.0.1

Address: 127.0.0.1#53

2.5.168.192.in-addr.arpa name = www.baidu.com.

[root@tianyun ~]# nslookup

server 192.168.5.2 //使用临时指定的服务器解析

Default server: 192.168.5.2

Address: 192.168.5.2#53

[root@tianyun ~]# nslookup

set q=soa

baidu.com

Server: 127.0.0.1

Address: 127.0.0.1#53

baidu.com

origin = ns.baidu.com

mail addr = root.baidu.com

serial = 2013081303

refresh = 3600

retry = 900

expire = 604800

minimum = 86400

set q=ns

baidu.com

Server: 127.0.0.1

Address: 127.0.0.1#53

baidu.com nameserver = ns.baidu.com.

baidu.com nameserver = ns2.baidu.com.

[root@tianyun ~]# nslookup

set q=mx

baidu.com

Server: 127.0.0.1

Address: 127.0.0.1#53

baidu.com mail exchanger = 10 mail.baidu.com.

set q=a

www.baidu.com

Server: 127.0.0.1

Address: 127.0.0.1#53

Name: www.baidu.com

Address: 192.168.5.100

C:\>ipconfig /?