{"id":421,"date":"2024-10-19T11:46:37","date_gmt":"2024-10-19T03:46:37","guid":{"rendered":"https:\/\/cococat.top\/?p=421"},"modified":"2024-10-19T11:46:37","modified_gmt":"2024-10-19T03:46:37","slug":"dig-note","status":"publish","type":"post","link":"https:\/\/cococat.top\/index.php\/2024\/10\/19\/dig-note\/","title":{"rendered":"dig \u6742\u8bb0"},"content":{"rendered":"<h2>1. <code>+trace<\/code><\/h2>\n<p>\u4e0d\u5e26\u6709 <code>+trace<\/code> \u7684 <code>dig<\/code> \u5219\u662f\u76f4\u63a5\u5411 local dns \u670d\u52a1\u5668\u53d1\u8d77\u67e5\u8be2\u3002<\/p>\n<p>\u5e26\u6709 <code>+trace<\/code> \u7684 <code>dig<\/code> \u547d\u4ee4\u662f\u8d70\u7684\u8fed\u4ee3\u67e5\u8be2\uff0c\u5373\u5148\u83b7\u53d6\u6839 dns \u670d\u52a1\u5668\u5730\u5740\uff0c\u7136\u540e\u5411\u5176\u53d1\u8d77\u67e5\u8be2\u83b7\u53d6\u5bf9\u5e94\u7684\u9876\u7ea7\u57df\u540d dns \u670d\u52a1\u5668\u5730\u5740\uff0c\u5982\u6b64\u5faa\u73af\u4e0b\u53bb\u76f4\u5230\u6700\u7ec8\u67e5\u5230\u7ed3\u679c\u3002<\/p>\n<p>\u4e3e\u4e2a\u5b9e\u6d4b\u5bf9 cococat.top \u8fdb\u884c\u67e5\u8be2\u7684\u4f8b\u5b50\uff1a<\/p>\n<ol>\n<li>dig \u5411 local dns \u670d\u52a1\u5668\u53d1\u8d77\u67e5\u8be2\uff0c\u8bf7\u6c42\u6839\u57df\u540d\u670d\u52a1\u5668\u7684 <strong>NS<\/strong> \u8bb0\u5f55\u3002wireshark \u663e\u793a <code>Standard query 0x6a1c NS &lt;Root&gt; OPT<\/code> \u3002<\/li>\n<li>local dns \u670d\u52a1\u5668\u8fd4\u56de <code>&lt;Root&gt;<\/code> \u7684 NS \u8bb0\u5f55\u7ed3\u679c\uff0c\u5305\u542b a.root-servers.net ~ m.root-servers.net<\/li>\n<li>dig \u5411 local dns \u670d\u52a1\u5668\u53d1\u8d77\u67e5\u8be2\uff0c\u67e5\u8be2<strong>\u67d0\u4e9b<\/strong>\u6839\u57df\u540d\u670d\u52a1\u5668\u7684 A \u8bb0\u5f55\u3002wireshark \u663e\u793a <code>Standard query 0x1295 A k.root-servers.net<\/code> \u3002\u6ce8\u610f\u89c2\u5bdf\u53d1\u73b0 dig \u4f1a\u4e00\u6b21\u6027\u5bf9\u8bb8\u591a\u4e0d\u540c\u7684 root server \u7684 A \u8bb0\u5f55\u53d1\u8d77\u67e5\u8be2\uff0c\u5b9e\u6d4b\u89c2\u5bdf\u5230 a~m \u90fd\u88ab\u67e5\u4e86\u3002<\/li>\n<li>local dns \u670d\u52a1\u5668\u9010\u4e00\u8fd4\u56de\u6839\u57df\u540d\u670d\u52a1\u5668\u7684 A \u8bb0\u5f55\u5730\u5740\u3002<\/li>\n<li>dig \u5411\u5176\u4e2d\u67d0\u4e9b\u6839\u57df\u540d\u670d\u52a1\u5668\u53d1\u8d77 cococat.top \u7684 A \u8bb0\u5f55\u67e5\u8be2\u3002\u5b9e\u6d4b\u89c2\u5bdf\u5230 dig \u4f1a\u5148\u540e\u627e\u4e24\u4e2a\u6839\u57df\u540d\u670d\u52a1\u5668\u90fd\u53d1\u8d77\u67e5\u8be2\u3002wireshark \u663e\u793a <code>Standard query 0xa8c1 A cococat.top OPT<\/code><\/li>\n<li>\u6839\u57df\u540d\u670d\u52a1\u5668\u5e76\u6ca1\u6709 cococat.top \u7684 A \u8bb0\u5f55\uff0c\u4f46\u662f\u6709 NS \u8bb0\u5f55\uff0c\u9042\u8fd4\u56de\u4e4b\u3002Wireshark \u663e\u793a  <code>Standard query response 0xa8c1 A cococat.top NS i.zdnscloud.com NS b.zdnscloud.com ...<\/code>\u3002\u8fd9\u91cc\u8fd4\u56de\u4e86\u4e00\u5806\u9876\u7ea7 NS \u670d\u52a1\u5668\u3002<\/li>\n<li>dig \u5411 local dns \u670d\u52a1\u5668\u53d1\u8d77\u67e5\u8be2\uff0c\u67e5\u8be2\u67d0\u4e9b\u9876\u7ea7 NS \u670d\u52a1\u5668\u7684 A \u8bb0\u5f55<\/li>\n<li>local dns \u9010\u4e00\u8fd4\u56de\u9876\u7ea7 NS \u670d\u52a1\u5668\u7684 A \u8bb0\u5f55\u5730\u5740\u3002<\/li>\n<li>dig \u5411\u67d0\u4e9b\u9876\u7ea7 NS \u670d\u52a1\u5668\u53d1\u8d77 cococat.top \u7684 A \u8bb0\u5f55\u67e5\u8be2<\/li>\n<li>\u9876\u7ea7 NS \u670d\u52a1\u5668\u6ca1\u6709 A \u8bb0\u5f55\uff0c\u4f46\u662f\u8fd4\u56de\u4e86 dns25.hichina.com \u3001dns26.hichina.com \u7684 NS \u8bb0\u5f55\u3002<\/li>\n<li>dig \u5411 local dns \u67e5 dns25.hichina.com dns26.hichina.com \u7684 A \u8bb0\u5f55<\/li>\n<li>local dns \u9010\u4e00\u8fd4\u56de\u5730\u5740<\/li>\n<li>dig \u5411 dns25.hichina.com \u53d1\u8d77\u67e5\u8be2\uff0c\u67e5\u8be2 cococat.top \u7684 A \u8bb0\u5f55<\/li>\n<li>\u7ec8\u4e8e\u8fd4\u56de\u7ed3\u679c\u4e86\uff01<\/li>\n<\/ol>\n<h2>2. \u8bb0\u8f7d local dns ip \u7684\u6587\u4ef6\u4f4d\u7f6e<\/h2>\n<p><code> \/etc\/resolv.conf<\/code> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. +trace \u4e0d\u5e26\u6709 +trace \u7684 dig \u5219\u662f\u76f4\u63a5\u5411 local dns \u670d\u52a1\u5668\u53d1\u8d77\u67e5\u8be2\u3002 \u5e26\u6709  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,11],"tags":[20,31],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-linux","category-11","tag-linux","tag-31"],"_links":{"self":[{"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":0,"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"wp:attachment":[{"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cococat.top\/index.php\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}