1 .\" Automatically generated by Pandoc 2.17.1.1
3 .\" Define V font for inline verbatim, using C font in formats
4 .\" that render this, and otherwise B font.
5 .ie "\f[CB]x\f[]"x" \{\
17 .TH "dog" "1" "" "v0.1.0" ""
21 dog \[em] a command-line DNS client
24 \f[V]dog [options] [domains...]\f[R]
26 \f[B]dog\f[R] is a command-line DNS client.
27 It has colourful output, supports the DNS-over-TLS and DNS-over-HTTPS
28 protocols, and can emit JSON.
31 \f[V]dog example.net\f[R]
32 Query the \f[V]A\f[R] record of a domain using default settings
34 \f[V]dog example.net MX\f[R]
35 \&...looking up \f[V]MX\f[R] records instead
37 \f[V]dog example.net MX \[at]1.1.1.1\f[R]
38 \&...using a specific nameserver instead
40 \f[V]dog example.net MX \[at]1.1.1.1 -T\f[R]
41 \&...using TCP rather than UDP
43 \f[V]dog -q example.net -t MX -n 1.1.1.1 -T\f[R]
44 As above, but using explicit arguments
47 \f[V]-q\f[R], \f[V]--query=HOST\f[R]
48 Host name or domain name to query.
50 \f[V]-t\f[R], \f[V]--type=TYPE\f[R]
51 Type of the DNS record being queried (\f[V]A\f[R], \f[V]MX\f[R],
54 \f[V]-n\f[R], \f[V]--nameserver=ADDR\f[R]
55 Address of the nameserver to send packets to.
57 \f[V]--class=CLASS\f[R]
58 Network class of the DNS record being queried (\f[V]IN\f[R],
59 \f[V]CH\f[R], \f[V]HS\f[R])
61 By default, dog will request A records using the system default
63 At least one domain name must be passed \[em] dog will not automatically
64 query the root nameservers.
66 Query options passed in using a command-line option, such as
67 `\f[V]--query lookup.dog\f[R]' or `\f[V]--type MX\f[R]', or as plain
68 arguments, such as `\f[V]lookup.dog\f[R]' or `\f[V]MX\f[R]'.
69 dog will make an intelligent guess as to what plain arguments mean
70 (\f[V]MX\f[R] is quite clearly a type), which makes it easier to compose
71 ad-hoc queries quickly.
72 If precision is desired, use the long-form options.
74 If more than one domain, type, nameserver, or class is specified, dog
75 will perform one query for each combination, and display the combined
77 For example, passing three type arguments and two domain name arguments
78 will send six requests.
80 DNS traditionally uses port 53 for both TCP and UDP.
81 To use a resolver with a different port, include the port number after a
82 colon (\f[V]:\f[R]) in the nameserver address.
85 \f[V]--edns=SETTING\f[R]
86 Whether to opt in to DNS.
87 This can be `\f[V]disable\f[R]', `\f[V]hide\f[R]', or `\f[V]show\f[R]'.
89 \f[V]--txid=NUMBER\f[R]
90 Set the transaction ID to a specific value.
93 Set uncommon protocol-level tweaks.
96 \f[V]-U\f[R], \f[V]--udp\f[R]
97 Use the DNS protocol over UDP.
99 \f[V]-T\f[R], \f[V]--tcp\f[R]
100 Use the DNS protocol over TCP.
102 \f[V]-S\f[R], \f[V]--tls\f[R]
103 Use the DNS-over-TLS protocol.
105 \f[V]-H\f[R], \f[V]--https\f[R]
106 Use the DNS-over-HTTPS protocol.
108 By default, dog will use the UDP protocol, automatically re-sending the
109 request using TCP if the response indicates that the message is too
111 Passing \f[V]--udp\f[R] will only use UDP and will fail in this case;
112 passing \f[V]--tcp\f[R] will use TCP by default.
114 The DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH) protocols are available
115 with the \f[V]--tls\f[R] and \f[V]--https\f[R] options.
116 Bear in mind that the system default resolver is unlikely to respond to
117 requests using these protocols.
119 Note that if a hostname or domain name is given as a nameserver, rather
120 than an IP address, the resolution of that host is performed by the
121 operating system, \f[I]not\f[R] by dog.
123 Unlike the others, the HTTPS transport type requires an entire URL,
124 complete with protocol, domain name, and path.
127 \f[V]-1\f[R], \f[V]--short\f[R]
128 Short mode: display nothing but the first result.
130 \f[V]-J\f[R], \f[V]--json\f[R]
131 Display the output as JSON.
133 \f[V]--color\f[R], \f[V]--colour=WHEN\f[R]
134 When to colourise the output.
135 This can be `\f[V]always\f[R]', `\f[V]automatic\f[R]', or
139 Do not format durations as hours and minutes; instead, display them as
143 Print how long the response took to arrive.
147 Displays an overview of the command-line options.
150 Displays the version of dog being invoked.
151 .SH ENVIRONMENT VARIABLES
153 dog responds to the following environment variables:
154 .SS \f[V]DOG_DEBUG\f[R]
156 Set this to any non-empty value to have dog emit debugging information
158 For more in-depth output, set this to the exact string
162 dog understands and can interpret the following record types:
171 permitted certificate authorities
174 canonical domain aliases
177 system information and, sometimes, forbidden request explanations
183 e-mail server addresses
192 extensions to the DNS protocol
195 pointers to canonical names, usually for reverse lookups
198 administrative information about zones
201 IP addresses with port numbers
207 TLS certificates, public keys, and hashes
210 arbitrary textual information
212 When a response DNS packet contains a record of one of these known
213 types, dog will display it in a table containing the type name and a
214 human-readable summary of its contents.
216 Records with a type number that does not map to any known record type
217 will still be displayed.
218 As they cannot be interpreted, their contents will be displayed as a
219 series of numbers instead.
221 dog also contains a list of record type names that it knows the type
222 number of, but is not able to interpret, such as \f[V]IXFR\f[R] or
223 \f[V]ANY\f[R] or \f[V]AFSDB\f[R].
224 These are acceptable as command-line arguments, meaning you can send an
225 AFSDB request with `\f[V]dog AFSDB\f[R]'.
226 However, their response contents will still be displayed as numbers.
227 They may be supported in future versions of dog.
230 The \f[V]-Z\f[R] command-line argument can be used one or more times to
231 set some protocol-level options in the DNS queries that get sent.
232 It accepts the following values:
235 Sets the \f[V]AA\f[R] (Authoritative Answers) bit in the query.
238 Sets the \f[V]AD\f[R] (Authentic Data) bit in the query.
240 \f[V]bufsize=NUM\f[R]
241 Sets the UDP payload size field in the OPT field in the query.
242 This has no effect if EDNS is diabled.
245 Sets the \f[V]CD\f[R] (Checking Disabled) bit in the query.
249 If everything goes OK.
252 If there was a network, I/O, or TLS error during operation.
255 If there is no result from the server when running in short mode.
256 This can be any received server error, not just NXDOMAIN.
259 If there was a problem with the command-line arguments.
262 dog is maintained by Benjamin `ogham' Sago.
264 \f[B]Website:\f[R] \f[V]https://dns.lookup.dog/\f[R]
268 \f[B]Source code:\f[R] \f[V]https://github.com/ogham/dog\f[R]