4 DNS. |
4 DNS. |
5 ====== |
5 ====== |
6 .. contents:: |
6 .. contents:: |
7 :local: |
7 :local: |
8 |
8 |
9 About DNS resolving protocol. |
9 About DNS resolving protocol |
10 ============================= |
10 ============================ |
11 |
11 |
12 Default port for name resolving is ``53``:: |
12 Default port for name resolving is ``53``:: |
13 |
13 |
14 $ nslookup -port=53 microsoft.com |
14 $ nslookup -port=53 microsoft.com |
15 |
15 |
16 Debugging name resolution. |
16 Debugging name resolution |
17 ========================== |
17 ========================= |
18 :: |
18 :: |
19 |
19 |
20 $ nslookup -debug microsoft.com |
20 $ nslookup -debug microsoft.com |
21 |
21 |
22 Dumping all available resords:: |
22 Dumping all available resords:: |
32 chicken/egg ptoblem when you request name resolution but asked to resolve |
32 chicken/egg ptoblem when you request name resolution but asked to resolve |
33 another name). To see IP addressed use ``+additional`` option:: |
33 another name). To see IP addressed use ``+additional`` option:: |
34 |
34 |
35 $ dig +trace +additional google.com |
35 $ dig +trace +additional google.com |
36 |
36 |
37 IP from host name. |
37 IP from host name |
38 ================== |
38 ================= |
39 |
39 |
40 This request is for the ``A`` record and default for ``nslookup`` command:: |
40 This request is for the ``A`` record and default for ``nslookup`` command:: |
41 |
41 |
42 $ nslookup defun.work |
42 $ nslookup defun.work |
43 $ nslookup -type=a defun.work |
43 $ nslookup -type=a defun.work |
58 4.4.8.8.in-addr.arpa. 21599 IN PTR google-public-dns-b.google.com. |
58 4.4.8.8.in-addr.arpa. 21599 IN PTR google-public-dns-b.google.com. |
59 |
59 |
60 $ host 8.8.4.4 |
60 $ host 8.8.4.4 |
61 4.4.8.8.in-addr.arpa domain name pointer google-public-dns-b.google.com. |
61 4.4.8.8.in-addr.arpa domain name pointer google-public-dns-b.google.com. |
62 |
62 |
63 List authoritative NS for domain. |
63 List authoritative NS for domain |
64 ================================= |
64 ================================ |
65 :: |
65 :: |
66 |
66 |
67 $ dig ns defun.work |
67 $ dig ns defun.work |
68 $ nslookup -type=ns defun.work |
68 $ nslookup -type=ns defun.work |
69 |
69 |
70 List MX records for domain. |
70 List MX records for domain |
71 =========================== |
71 ========================== |
72 :: |
72 :: |
73 |
73 |
74 $ dig mx mail.google.com |
74 $ dig mx mail.google.com |
75 $ nslookup -type=mx mail.google.com |
75 $ nslookup -type=mx mail.google.com |
76 |
76 |
77 Query for TXT records. |
77 Query for TXT records |
78 ====================== |
78 ===================== |
79 :: |
79 :: |
80 |
80 |
81 $ dig -t TXT google.com |
81 $ dig -t TXT google.com |
82 $ dig google.com TXT |
82 $ dig google.com TXT |
83 $ nslookup -type=txt google.com |
83 $ nslookup -type=txt google.com |
84 $ nslookup -q=txt google.com |
84 $ nslookup -q=txt google.com |
85 $ host -t txt google.com |
85 $ host -t txt google.com |
86 |
86 |
87 List SOA records for domain. |
87 List SOA records for domain |
88 ============================ |
88 =========================== |
89 |
89 |
90 SOA ("Start Of Authority") Record for a domain provides technical information |
90 SOA ("Start Of Authority") Record for a domain provides technical information |
91 about the domain:: |
91 about the domain:: |
92 |
92 |
93 $ dig soa defun.work |
93 $ dig soa defun.work |
121 ... |
121 ... |
122 dp.gov.ua. 3600 IN MX 200 relay2.giknpc.com.ua. |
122 dp.gov.ua. 3600 IN MX 200 relay2.giknpc.com.ua. |
123 dp.gov.ua. 3600 IN A 195.64.190.1 |
123 dp.gov.ua. 3600 IN A 195.64.190.1 |
124 adm.dp.gov.ua. 3600 IN A 195.64.190.1 |
124 adm.dp.gov.ua. 3600 IN A 195.64.190.1 |
125 |
125 |
126 Get info about NS. |
126 Get info about NS |
127 ================== |
127 ================= |
128 |
128 |
129 Version of running NS:: |
129 Version of running NS:: |
130 |
130 |
131 $ dig @4.2.2.1 version.bind chaos txt |
131 $ dig @4.2.2.1 version.bind chaos txt |
132 $ nslookup -q=txt -class=CHAOS version.bind. 4.2.2.1 |
132 $ nslookup -q=txt -class=CHAOS version.bind. 4.2.2.1 |