云计算学习路线教程大纲课件客户端查询:
====================================================================================
nslookup,host,dig
客户端指定本地DNS
[[email protected] ~]# cat /etc/resolv.conf
nameserver 192.168.2.115
[[email protected] ~]# dig www.baidu.com
[[email protected] ~]# nslookup www.baidu.com
[[email protected] ~]# host www.baidu.com
dig (Linux)
[[email protected] ~]# dig www.126.com //使用/etc/resolv.conf设置的DNS
[[email protected] ~]# dig @192.168.2.168 www.126.com //使用指定的DNS
[[email protected] ~]# dig @192.168.2.100 www.126.com //使用指定的DNS
host (Linux)
[[email protected] ~]# host -t A www.baidu.com //正向解析,查询A记录
[[email protected] ~]# host 192.168.5.100 //反向解析,查询PTR记录
[[email protected] ~]# host www.baidu.com 192.168.5.240 //使用DNS服务器192.168.5.240解析
[[email protected] ~]# host -t SOA baidu.com //查询某个域的SOA
baidu.com has SOA record ns.baidu.com. root.baidu.com. 2013081303 3600 900 604800 86400
[[email protected] ~]# host -t NS baidu.com //查询某个域的NS
baidu.com name server ns.baidu.com.
baidu.com name server ns2.baidu.com.
[[email protected] ~]#
[[email protected] ~]# host -t MX baidu.com //查询某个域的邮件服务器
baidu.com mail is handled by 10 mail.baidu.com.
nslookup (Linux/Windows)
[[email protected] ~]# nslookup www.baidu.com
[[email protected] ~]# nslookup 192.168.5.100
[[email protected] ~]# 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.
[[email protected] ~]# nslookup
server 192.168.5.2 //使用临时指定的服务器解析
Default server: 192.168.5.2
Address: 192.168.5.2#53
[[email protected] ~]# 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.
[[email protected] ~]# 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 /?
原文地址:https://blog.51cto.com/14489558/2444229