dig命令詳解

來源:互聯網
上載者:User

dig命令詳解 1.查看網域名稱的A記錄        # dig yahoo.com; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <<>> yahoo.com      ;; global options: +cmd      ;; Got answer:      ;; ->>HEADER<        2.查看網域名稱的ip        # dig yahoo.com +short        98.139.183.24      72.30.38.140      98.138.253.109    3.查看網域名稱的MX 記錄        # dig yahoo.com MX        ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <> yahoo.com MX      ;; global options: +cmd      ;; Got answer:      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31450      ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 24        ;; QUESTION SECTION:      ;yahoo.com.                     IN      MX        ;; ANSWER SECTION:      yahoo.com.              33      IN      MX      1 mta6.am0.yahoodns.net.      yahoo.com.              33      IN      MX      1 mta7.am0.yahoodns.net.      yahoo.com.              33      IN      MX      1 mta5.am0.yahoodns.net.        4.查看網域名稱的SOA記錄        # dig yahoo.com SOA        ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <> yahoo.com SOA      ;; global options: +cmd      ;; Got answer:      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2197      ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 7, ADDITIONAL: 7        ;; QUESTION SECTION:      ;yahoo.com.                     IN      SOA        ;; ANSWER SECTION:      yahoo.com.              1800    IN      SOA     ns1.yahoo.com. hostmaster.yahoo-inc.com. 2012081409 3600 300 1814400 600        5.查詢網域名稱的TTL記錄        # dig yahoo.com TTL        ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.2 <> yahoo.com TTL      ;; global options: +cmd      ;; Got answer:      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56156      ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0        ;; QUESTION SECTION:      ;yahoo.com.                     IN      A        ;; ANSWER SECTION:      yahoo.com.              3589    IN      A       98.138.253.109      yahoo.com.              3589    IN      A       98.139.183.24      yahoo.com.              3589    IN      A       72.30.38.140        6.查看內容資訊        # dig yahoo.com +nocomments +noquestion +noauthority +noadditional +nostats        ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6 <<>> yahoo.com +nocomments +noquestion +noauthority +noadditional +nostats      ;; global options: +cmd      yahoo.com.              3442    IN      A       72.30.38.140      yahoo.com.              3442    IN      A       98.138.253.109      yahoo.com.              3442    IN      A       98.139.183.24        7.查詢所有的DNS記錄類型        # dig yahoo.com ANY +noall +answer        ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6 <<>> yahoo.com ANY +noall +answer      ;; global options: +cmd      yahoo.com.              3509    IN      A       72.30.38.140      yahoo.com.              3509    IN      A       98.138.253.109      yahoo.com.              3509    IN      A       98.139.183.24      yahoo.com.              1709    IN      MX      1 mta5.am0.yahoodns.net.      yahoo.com.              1709    IN      MX      1 mta6.am0.yahoodns.net.      yahoo.com.              1709    IN      MX      1 mta7.am0.yahoodns.net.      yahoo.com.              43109   IN      NS      ns2.yahoo.com.      yahoo.com.              43109   IN      NS      ns8.yahoo.com.      yahoo.com.              43109   IN      NS      ns3.yahoo.com.      yahoo.com.              43109   IN      NS      ns1.yahoo.com.      yahoo.com.              43109   IN      NS      ns4.yahoo.com.      yahoo.com.              43109   IN      NS      ns5.yahoo.com.      yahoo.com.              43109   IN      NS      ns6.yahoo.com.        8.DNS反向查詢        # dig -x 72.30.38.140 +short        ir1.fp.vip.sp2.yahoo.com.        9.查詢多個DNS記錄        # dig yahoo.com mx +noall +answer redhat.com ns +noall +answer        ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6 <<>> yahoo.com mx +noall +answer redhat.com ns +noall +answer      ;; global options: +cmd      yahoo.com.              1740    IN      MX      1 mta6.am0.yahoodns.net.      yahoo.com.              1740    IN      MX      1 mta7.am0.yahoodns.net.      yahoo.com.              1740    IN      MX      1 mta5.am0.yahoodns.net.      redhat.com.             132     IN      NS      ns1.redhat.com.      redhat.com.             132     IN      NS      ns4.redhat.com.      redhat.com.             132     IN      NS      ns3.redhat.com.      redhat.com.             132     IN      NS      ns2.redhat.com.  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.