DNS測試工具的使用(了解)


  • dig命令, host命令, nslookup命令,rndc命令
  • dig命令(直接測試DNS性能,不會查詢/etc/hosts文件)
    • dig [-t RR_TYPE] name [@SERVER] [query options] 如果[@SERVER]不寫,那就使用本地指定的dns服務器,如果指定了就不會讀本地的dns服務器
      • 其中 [query options]為查詢選項,可以使用
        • +[no]trace :跟蹤解析過程
          • dig -t A www.baidu.com +trace
        • +[no]recurse:進行遞歸解析
          • dig -t A www.baidu.com +recurse
        • 用於測試dns系統,因此其不會查詢hosts文件
          • 注意反向解析使用: dig -x ip
            • dig -x 115.239.210.176
          • 模擬區域傳送
            • dig -t axfr DOMAIN [@SERVER]
  • host命令:直接返回解析結果
    • host [-t RR_TYPE] name SERVER_IP
    • host -t A www.baidu.com
    • host -t NS baidu.com
    • host -t MX baidu.com
  • nslookup命令
    • nslookup [ -options ] [ name ] [server]
[root@nds1 etc]# nslookup
> server 192.168.23.10
Default server: 192.168.23.10
Address: 192.168.23.10#53
> set q=A
> www.sina.com
Server: 192.168.23.10
Address: 192.168.23.10#53

Non-authoritative answer:
www.sina.com canonical name = us.sina.com.cn.
us.sina.com.cn canonical name = spool.grid.sinaedge.com.
Name: spool.grid.sinaedge.com
Address: 222.76.214.60
  • rndc命令:用於named服務控制命令
    • rndc status :查看狀態
    • rndc flush :清空緩存服務器緩存
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM