]>
Commit | Line | Data |
---|---|---|
624993ac | 1 | <?xml version='1.0'?> |
3a54a157 ZJS |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
0307f791 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1+ --> |
624993ac | 5 | |
b69f810c | 6 | <refentry id="resolvectl" conditional='ENABLE_RESOLVE' |
624993ac LP |
7 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
8 | ||
9 | <refentryinfo> | |
b69f810c | 10 | <title>resolvectl</title> |
624993ac | 11 | <productname>systemd</productname> |
624993ac LP |
12 | </refentryinfo> |
13 | ||
14 | <refmeta> | |
b69f810c | 15 | <refentrytitle>resolvectl</refentrytitle> |
624993ac LP |
16 | <manvolnum>1</manvolnum> |
17 | </refmeta> | |
18 | ||
19 | <refnamediv> | |
b69f810c | 20 | <refname>resolvectl</refname> |
2eee2088 LP |
21 | <refname>resolvconf</refname> |
22 | <refpurpose>Resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services; introspect and reconfigure the DNS resolver</refpurpose> | |
624993ac LP |
23 | </refnamediv> |
24 | ||
25 | <refsynopsisdiv> | |
26 | <cmdsynopsis> | |
b69f810c | 27 | <command>resolvectl</command> |
624993ac | 28 | <arg choice="opt" rep="repeat">OPTIONS</arg> |
b69f810c YW |
29 | <arg choice="req">COMMAND</arg> |
30 | <arg choice="opt" rep="repeat">NAME</arg> | |
624993ac | 31 | </cmdsynopsis> |
624993ac LP |
32 | </refsynopsisdiv> |
33 | ||
34 | <refsect1> | |
35 | <title>Description</title> | |
36 | ||
b69f810c | 37 | <para><command>resolvectl</command> may be used to resolve domain names, IPv4 and IPv6 addresses, DNS resource |
624993ac LP |
38 | records and services with the |
39 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
40 | resolver service. By default, the specified list of parameters will be resolved as hostnames, retrieving their IPv4 | |
41 | and IPv6 addresses. If the parameters specified are formatted as IPv4 or IPv6 operation the reverse operation is | |
42 | done, and a hostname is retrieved for the specified addresses.</para> | |
43 | ||
cdfe156a LP |
44 | <para>The program's output contains information about the protocol used for the look-up and on which network |
45 | interface the data was discovered. It also contains information on whether the information could be | |
46 | authenticated. All data for which local DNSSEC validation succeeds is considered authenticated. Moreover all data | |
47 | originating from local, trusted sources is also reported authenticated, including resolution of the local host | |
38b38500 | 48 | name, the <literal>localhost</literal> hostname or all data from <filename>/etc/hosts</filename>.</para> |
624993ac LP |
49 | </refsect1> |
50 | ||
b69f810c YW |
51 | <refsect1> |
52 | <title>Commands</title> | |
53 | <variablelist> | |
54 | ||
55 | <varlistentry> | |
8eb6e6ed | 56 | <term><command>query</command> <replaceable>HOSTNAME|ADDRESS</replaceable>…</term> |
b69f810c YW |
57 | |
58 | <listitem><para>Resolve domain names, IPv4 and IPv6 addresses.</para></listitem> | |
59 | </varlistentry> | |
60 | ||
61 | <varlistentry> | |
8eb6e6ed ZJS |
62 | <term><command>service</command> |
63 | [[<replaceable>NAME</replaceable>] <replaceable>TYPE</replaceable>] | |
64 | <replaceable>DOMAIN</replaceable></term> | |
b69f810c YW |
65 | |
66 | <listitem><para>Resolve <ulink url="https://tools.ietf.org/html/rfc6763">DNS-SD</ulink> and | |
67 | <ulink url="https://tools.ietf.org/html/rfc2782">SRV</ulink> services, depending on the specified list of parameters. | |
68 | If three parameters are passed the first is assumed to be the DNS-SD service name, the second the SRV service type, | |
69 | and the third the domain to search in. In this case a full DNS-SD style SRV and TXT lookup is executed. If only two | |
70 | parameters are specified, the first is assumed to be the SRV service type, and the second the domain to look in. In | |
71 | this case no TXT RR is requested. Finally, if only one parameter is specified, it is assumed to be a domain name, | |
72 | that is already prefixed with an SRV type, and an SRV lookup is done (no TXT).</para></listitem> | |
73 | </varlistentry> | |
74 | ||
75 | <varlistentry> | |
8eb6e6ed | 76 | <term><command>openpgp</command> <replaceable>EMAIL@DOMAIN</replaceable>…</term> |
b69f810c YW |
77 | |
78 | <listitem><para>Query PGP keys stored as <ulink url="https://tools.ietf.org/html/rfc7929">OPENPGPKEY</ulink> | |
79 | resource records. Specified e-mail addresses are converted to the corresponding DNS domain name, and any | |
80 | OPENPGPKEY keys are printed.</para></listitem> | |
81 | </varlistentry> | |
82 | ||
624993ac | 83 | <varlistentry> |
8eb6e6ed ZJS |
84 | <term><command>tlsa</command> |
85 | [<replaceable>FAMILY</replaceable>] | |
86 | <replaceable>DOMAIN</replaceable>[:<replaceable>PORT</replaceable>]…</term> | |
624993ac | 87 | |
b69f810c YW |
88 | <listitem><para>Query TLS public keys stored as <ulink url="https://tools.ietf.org/html/rfc6698">TLSA</ulink> |
89 | resource records. A query will be performed for each of the specified names prefixed with the port and family | |
90 | (<literal>_<replaceable>port</replaceable>._<replaceable>family</replaceable>.<replaceable>domain</replaceable></literal>). | |
91 | The port number may be specified after a colon (<literal>:</literal>), otherwise <constant>443</constant> will be used | |
92 | by default. The family may be specified as the first argument, otherwise <constant>tcp</constant> will be used.</para></listitem> | |
93 | </varlistentry> | |
94 | ||
95 | <varlistentry> | |
8eb6e6ed | 96 | <term><command>status</command> [<replaceable>LINK</replaceable>…]</term> |
b69f810c | 97 | |
2c520df4 | 98 | <listitem><para>Shows the global and per-link DNS settings currently in effect. If no command is specified, |
b69f810c YW |
99 | this is the implied default.</para></listitem> |
100 | </varlistentry> | |
101 | ||
102 | <varlistentry> | |
8eb6e6ed | 103 | <term><command>statistics</command></term> |
b69f810c YW |
104 | |
105 | <listitem><para>Shows general resolver statistics, including information whether DNSSEC is | |
624993ac LP |
106 | enabled and available, as well as resolution and validation statistics.</para></listitem> |
107 | </varlistentry> | |
108 | ||
109 | <varlistentry> | |
8eb6e6ed | 110 | <term><command>reset-statistics</command></term> |
624993ac | 111 | |
8eb6e6ed | 112 | <listitem><para>Resets the statistics counters shown in <command>statistics</command> to zero. |
b69f810c | 113 | This operation requires root privileges.</para></listitem> |
624993ac LP |
114 | </varlistentry> |
115 | ||
ba35662f | 116 | <varlistentry> |
8eb6e6ed | 117 | <term><command>flush-caches</command></term> |
ba35662f | 118 | |
d55b0463 LP |
119 | <listitem><para>Flushes all DNS resource record caches the service maintains locally. This is mostly equivalent |
120 | to sending the <constant>SIGUSR2</constant> to the <command>systemd-resolved</command> | |
121 | service.</para></listitem> | |
122 | </varlistentry> | |
123 | ||
124 | <varlistentry> | |
8eb6e6ed | 125 | <term><command>reset-server-features</command></term> |
d55b0463 LP |
126 | |
127 | <listitem><para>Flushes all feature level information the resolver learnt about specific servers, and ensures | |
128 | that the server feature probing logic is started from the beginning with the next look-up request. This is | |
129 | mostly equivalent to sending the <constant>SIGRTMIN+1</constant> to the <command>systemd-resolved</command> | |
130 | service.</para></listitem> | |
ba35662f LP |
131 | </varlistentry> |
132 | ||
be371fe0 | 133 | <varlistentry> |
8eb6e6ed ZJS |
134 | <term><command>dns</command> [<replaceable>LINK</replaceable> [<replaceable>SERVER</replaceable>…]]</term> |
135 | <term><command>domain</command> [<replaceable>LINK</replaceable> [<replaceable>DOMAIN</replaceable>…]]</term> | |
136 | <term><command>default-route</command> [<replaceable>LINK</replaceable> [<replaceable>BOOL</replaceable>…]]</term> | |
137 | <term><command>llmnr</command> [<replaceable>LINK</replaceable> [<replaceable>MODE</replaceable>]]</term> | |
138 | <term><command>mdns</command> [<replaceable>LINK</replaceable> [<replaceable>MODE</replaceable>]]</term> | |
139 | <term><command>dnssec</command> [<replaceable>LINK</replaceable> [<replaceable>MODE</replaceable>]]</term> | |
140 | <term><command>dnsovertls</command> [<replaceable>LINK</replaceable> [<replaceable>MODE</replaceable>]]</term> | |
141 | <term><command>nta</command> [<replaceable>LINK</replaceable> [<replaceable>DOMAIN</replaceable>…]]</term> | |
b69f810c | 142 | |
74053ff2 | 143 | <listitem> |
8eb6e6ed ZJS |
144 | <para>Get/set per-interface DNS configuration. These commands may be used to configure various DNS |
145 | settings for network interfaces. These commands may be used to inform | |
146 | <command>systemd-resolved</command> or <command>systemd-networkd</command> about per-interface DNS | |
147 | configuration determined through external means. The <command>dns</command> command expects IPv4 or | |
148 | IPv6 address specifications of DNS servers to use. The <command>domain</command> command expects | |
149 | valid DNS domains, possibly prefixed with <literal>~</literal>, and configures a per-interface | |
150 | search or route-only domain. The <command>default-route</command> command expects a boolean | |
151 | parameter, and configures whether the link may be used as default route for DNS lookups, i.e. if it | |
152 | is suitable for lookups on domains no other link explicitly is configured for. The | |
153 | <command>llmnr</command>, <command>mdns</command>, <command>dnssec</command> and | |
154 | <command>dnsovertls</command> commands may be used to configure the per-interface LLMNR, | |
155 | MulticastDNS, DNSSEC and DNSOverTLS settings. Finally, <command>nta</command> command may be used | |
156 | to configure additional per-interface DNSSEC NTA domains.</para> | |
157 | ||
158 | <para>Commands <command>dns</command>, <command>domain</command> and <command>nta</command> can take | |
74053ff2 DKG |
159 | a single empty string argument to clear their respective value lists.</para> |
160 | ||
8eb6e6ed ZJS |
161 | <para>For details about these settings, their possible values and their effect, see the |
162 | corresponding settings in | |
74053ff2 | 163 | <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> |
14965b94 LP |
164 | </listitem> |
165 | </varlistentry> | |
166 | ||
167 | <varlistentry> | |
8eb6e6ed | 168 | <term><command>revert <replaceable>LINK</replaceable></command></term> |
b69f810c YW |
169 | |
170 | <listitem><para>Revert the per-interface DNS configuration. If the DNS configuration is reverted all | |
8eb6e6ed ZJS |
171 | per-interface DNS setting are reset to their defaults, undoing all effects of <command>dns</command>, |
172 | <command>domain</command>, <command>default-route</command>, <command>llmnr</command>, | |
173 | <command>mdns</command>, <command>dnssec</command>, <command>dnsovertls</command>, | |
174 | <command>nta</command>. Note that when a network interface disappears all configuration is lost | |
175 | automatically, an explicit reverting is not necessary in that case.</para></listitem> | |
14965b94 LP |
176 | </varlistentry> |
177 | ||
df957849 | 178 | <xi:include href="systemctl.xml" xpointer="log-level" /> |
624993ac LP |
179 | </variablelist> |
180 | </refsect1> | |
181 | ||
e1fac8a6 ZJS |
182 | <refsect1> |
183 | <title>Options</title> | |
184 | <variablelist> | |
185 | <varlistentry> | |
186 | <term><option>-4</option></term> | |
187 | <term><option>-6</option></term> | |
188 | ||
189 | <listitem><para>By default, when resolving a hostname, both IPv4 and IPv6 | |
190 | addresses are acquired. By specifying <option>-4</option> only IPv4 addresses are requested, by specifying | |
191 | <option>-6</option> only IPv6 addresses are requested.</para> | |
192 | </listitem> | |
193 | </varlistentry> | |
194 | ||
195 | <varlistentry> | |
196 | <term><option>-i</option> <replaceable>INTERFACE</replaceable></term> | |
197 | <term><option>--interface=</option><replaceable>INTERFACE</replaceable></term> | |
198 | ||
199 | <listitem><para>Specifies the network interface to execute the query on. This may either be specified as numeric | |
200 | interface index or as network interface string (e.g. <literal>en0</literal>). Note that this option has no | |
201 | effect if system-wide DNS configuration (as configured in <filename>/etc/resolv.conf</filename> or | |
202 | <filename>/etc/systemd/resolve.conf</filename>) in place of per-link configuration is used.</para></listitem> | |
203 | </varlistentry> | |
204 | ||
205 | <varlistentry> | |
206 | <term><option>-p</option> <replaceable>PROTOCOL</replaceable></term> | |
207 | <term><option>--protocol=</option><replaceable>PROTOCOL</replaceable></term> | |
208 | ||
209 | <listitem><para>Specifies the network protocol for the query. May be one of <literal>dns</literal> | |
210 | (i.e. classic unicast DNS), <literal>llmnr</literal> (<ulink | |
211 | url="https://tools.ietf.org/html/rfc4795">Link-Local Multicast Name Resolution</ulink>), | |
212 | <literal>llmnr-ipv4</literal>, <literal>llmnr-ipv6</literal> (LLMNR via the indicated underlying IP | |
213 | protocols), <literal>mdns</literal> (<ulink url="https://www.ietf.org/rfc/rfc6762.txt">Multicast DNS</ulink>), | |
214 | <literal>mdns-ipv4</literal>, <literal>mdns-ipv6</literal> (MDNS via the indicated underlying IP protocols). | |
215 | By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of | |
216 | protocols that may be used. Use this option multiple times to enable resolving via multiple protocols at the | |
217 | same time. The setting <literal>llmnr</literal> is identical to specifying this switch once with | |
218 | <literal>llmnr-ipv4</literal> and once via <literal>llmnr-ipv6</literal>. Note that this option does not force | |
219 | the service to resolve the operation with the specified protocol, as that might require a suitable network | |
220 | interface and configuration. | |
221 | The special value <literal>help</literal> may be used to list known values. | |
222 | </para></listitem> | |
223 | </varlistentry> | |
224 | ||
225 | <varlistentry> | |
226 | <term><option>-t</option> <replaceable>TYPE</replaceable></term> | |
227 | <term><option>--type=</option><replaceable>TYPE</replaceable></term> | |
228 | <term><option>-c</option> <replaceable>CLASS</replaceable></term> | |
229 | <term><option>--class=</option><replaceable>CLASS</replaceable></term> | |
230 | ||
231 | <listitem><para>Specifies the DNS resource record type (e.g. A, AAAA, MX, …) and class (e.g. IN, ANY, …) to | |
232 | look up. If these options are used a DNS resource record set matching the specified class and type is | |
233 | requested. The class defaults to IN if only a type is specified. | |
234 | The special value <literal>help</literal> may be used to list known values. | |
235 | </para></listitem> | |
236 | </varlistentry> | |
237 | ||
238 | <varlistentry> | |
239 | <term><option>--service-address=</option><replaceable>BOOL</replaceable></term> | |
240 | ||
241 | <listitem><para>Takes a boolean parameter. If true (the default), when doing a service lookup with | |
242 | <option>--service</option> the hostnames contained in the SRV resource records are resolved as well.</para></listitem> | |
243 | </varlistentry> | |
244 | ||
245 | <varlistentry> | |
246 | <term><option>--service-txt=</option><replaceable>BOOL</replaceable></term> | |
247 | ||
248 | <listitem><para>Takes a boolean parameter. If true (the default), when doing a DNS-SD service lookup with | |
249 | <option>--service</option> the TXT service metadata record is resolved as well.</para></listitem> | |
250 | </varlistentry> | |
251 | ||
252 | <varlistentry> | |
253 | <term><option>--cname=</option><replaceable>BOOL</replaceable></term> | |
254 | ||
255 | <listitem><para>Takes a boolean parameter. If true (the default), DNS CNAME or DNAME redirections are | |
256 | followed. Otherwise, if a CNAME or DNAME record is encountered while resolving, an error is | |
257 | returned.</para></listitem> | |
258 | </varlistentry> | |
259 | ||
260 | <varlistentry> | |
261 | <term><option>--search=</option><replaceable>BOOL</replaceable></term> | |
262 | ||
263 | <listitem><para>Takes a boolean parameter. If true (the default), any specified single-label hostnames will be | |
264 | searched in the domains configured in the search domain list, if it is non-empty. Otherwise, the search domain | |
265 | logic is disabled.</para></listitem> | |
266 | </varlistentry> | |
267 | ||
268 | <varlistentry> | |
269 | <term><option>--raw</option><optional>=payload|packet</optional></term> | |
270 | ||
271 | <listitem><para>Dump the answer as binary data. If there is no argument or if the argument is | |
272 | <literal>payload</literal>, the payload of the packet is exported. If the argument is | |
273 | <literal>packet</literal>, the whole packet is dumped in wire format, prefixed by | |
274 | length specified as a little-endian 64-bit number. This format allows multiple packets | |
275 | to be dumped and unambiguously parsed.</para></listitem> | |
276 | </varlistentry> | |
277 | ||
278 | <varlistentry> | |
279 | <term><option>--legend=</option><replaceable>BOOL</replaceable></term> | |
280 | ||
281 | <listitem><para>Takes a boolean parameter. If true (the default), column headers and meta information about the | |
282 | query response are shown. Otherwise, this output is suppressed.</para></listitem> | |
283 | </varlistentry> | |
284 | ||
285 | <xi:include href="standard-options.xml" xpointer="help" /> | |
286 | <xi:include href="standard-options.xml" xpointer="version" /> | |
287 | <xi:include href="standard-options.xml" xpointer="no-pager" /> | |
288 | </variablelist> | |
289 | </refsect1> | |
290 | ||
2eee2088 | 291 | <refsect1> |
42ecca2e ZJS |
292 | <title>Compatibility with |
293 | <citerefentry project="debian"><refentrytitle>resolvconf</refentrytitle><manvolnum>8</manvolnum></citerefentry></title> | |
2eee2088 | 294 | |
b69f810c YW |
295 | <para><command>resolvectl</command> is a multi-call binary. When invoked as <literal>resolvconf</literal> |
296 | (generally achieved by means of a symbolic link of this name to the <command>resolvectl</command> binary) it | |
42ecca2e ZJS |
297 | is run in a limited |
298 | <citerefentry project="debian"><refentrytitle>resolvconf</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
2eee2088 LP |
299 | compatibility mode. It accepts mostly the same arguments and pushes all data into |
300 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
b69f810c | 301 | similar to how <option>dns</option> and <option>domain</option> commands operate. Note that |
2eee2088 | 302 | <command>systemd-resolved.service</command> is the only supported backend, which is different from other |
924ccc35 ZJS |
303 | implementations of this command.</para> |
304 | ||
305 | <para><filename>/etc/resolv.conf</filename> will only be updated with servers added with this command | |
306 | when <filename>/etc/resolv.conf</filename> is a symlink to | |
307 | <filename>/run/systemd/resolve/resolv.conf</filename>, and not a static file. See the discussion of | |
308 | <filename>/etc/resolv.conf</filename> handling in | |
309 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
310 | </para> | |
311 | ||
312 | <para>Not all operations supported by other implementations are supported natively. Specifically:</para> | |
2eee2088 LP |
313 | |
314 | <variablelist> | |
315 | <varlistentry> | |
316 | <term><option>-a</option></term> | |
317 | <listitem><para>Registers per-interface DNS configuration data with | |
318 | <command>systemd-resolved</command>. Expects a network interface name as only command line argument. Reads | |
319 | <citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> compatible DNS | |
320 | configuration data from its standard input. Relevant fields are <literal>nameserver</literal> and | |
321 | <literal>domain</literal>/<literal>search</literal>. This command is mostly identical to invoking | |
b69f810c YW |
322 | <command>resolvectl</command> with a combination of <option>dns</option> and |
323 | <option>domain</option> commands.</para></listitem> | |
2eee2088 LP |
324 | </varlistentry> |
325 | ||
326 | <varlistentry> | |
327 | <term><option>-d</option></term> | |
328 | <listitem><para>Unregisters per-interface DNS configuration data with <command>systemd-resolved</command>. This | |
b69f810c | 329 | command is mostly identical to invoking <command>resolvectl revert</command>.</para></listitem> |
2eee2088 LP |
330 | </varlistentry> |
331 | ||
332 | <varlistentry> | |
333 | <term><option>-f</option></term> | |
334 | ||
335 | <listitem><para>When specified <option>-a</option> and <option>-d</option> will not complain about missing | |
336 | network interfaces and will silently execute no operation in that case.</para></listitem> | |
337 | </varlistentry> | |
338 | ||
339 | <varlistentry> | |
340 | <term><option>-x</option></term> | |
341 | ||
342 | <listitem><para>This switch for "exclusive" operation is supported only partially. It is mapped to an | |
343 | additional configured search domain of <literal>~.</literal> — i.e. ensures that DNS traffic is preferably | |
344 | routed to the DNS servers on this interface, unless there are other, more specific domains configured on other | |
345 | interfaces.</para></listitem> | |
346 | </varlistentry> | |
347 | ||
348 | <varlistentry> | |
349 | <term><option>-m</option></term> | |
350 | <term><option>-p</option></term> | |
351 | ||
352 | <listitem><para>These switches are not supported and are silently ignored.</para></listitem> | |
353 | </varlistentry> | |
354 | ||
355 | <varlistentry> | |
356 | <term><option>-u</option></term> | |
357 | <term><option>-I</option></term> | |
358 | <term><option>-i</option></term> | |
359 | <term><option>-l</option></term> | |
360 | <term><option>-R</option></term> | |
361 | <term><option>-r</option></term> | |
362 | <term><option>-v</option></term> | |
363 | <term><option>-V</option></term> | |
364 | <term><option>--enable-updates</option></term> | |
365 | <term><option>--disable-updates</option></term> | |
366 | <term><option>--are-updates-enabled</option></term> | |
367 | ||
368 | <listitem><para>These switches are not supported and the command will fail if used.</para></listitem> | |
369 | </varlistentry> | |
370 | ||
371 | </variablelist> | |
372 | ||
42ecca2e ZJS |
373 | <para>See |
374 | <citerefentry project="debian"><refentrytitle>resolvconf</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
375 | for details on those command line options.</para> | |
2eee2088 LP |
376 | </refsect1> |
377 | ||
624993ac LP |
378 | <refsect1> |
379 | <title>Examples</title> | |
380 | ||
381 | <example> | |
382 | <title>Retrieve the addresses of the <literal>www.0pointer.net</literal> domain</title> | |
383 | ||
b088e905 | 384 | <programlisting>$ resolvectl query www.0pointer.net |
edb4843f ZJS |
385 | www.0pointer.net: 2a01:238:43ed:c300:10c3:bcf3:3266:da74 |
386 | 85.214.157.71 | |
387 | ||
388 | -- Information acquired via protocol DNS in 611.6ms. | |
389 | -- Data is authenticated: no | |
390 | </programlisting> | |
624993ac LP |
391 | </example> |
392 | ||
393 | <example> | |
394 | <title>Retrieve the domain of the <literal>85.214.157.71</literal> IP address</title> | |
395 | ||
b088e905 | 396 | <programlisting>$ resolvectl query 85.214.157.71 |
edb4843f ZJS |
397 | 85.214.157.71: gardel.0pointer.net |
398 | ||
399 | -- Information acquired via protocol DNS in 1.2997s. | |
400 | -- Data is authenticated: no | |
401 | </programlisting> | |
624993ac LP |
402 | </example> |
403 | ||
404 | <example> | |
c49b5011 | 405 | <title>Retrieve the MX record of the <literal>yahoo.com</literal> domain</title> |
624993ac | 406 | |
b088e905 | 407 | <programlisting>$ resolvectl --legend=no -t MX query yahoo.com |
edb4843f ZJS |
408 | yahoo.com. IN MX 1 mta7.am0.yahoodns.net |
409 | yahoo.com. IN MX 1 mta6.am0.yahoodns.net | |
410 | yahoo.com. IN MX 1 mta5.am0.yahoodns.net | |
411 | </programlisting> | |
624993ac LP |
412 | </example> |
413 | ||
414 | <example> | |
415 | <title>Resolve an SRV service</title> | |
416 | ||
b69f810c | 417 | <programlisting>$ resolvectl service _xmpp-server._tcp gmail.com |
edb4843f ZJS |
418 | _xmpp-server._tcp/gmail.com: alt1.xmpp-server.l.google.com:5269 [priority=20, weight=0] |
419 | 173.194.210.125 | |
420 | alt4.xmpp-server.l.google.com:5269 [priority=20, weight=0] | |
421 | 173.194.65.125 | |
1eecafb8 | 422 | … |
edb4843f | 423 | </programlisting> |
624993ac LP |
424 | </example> |
425 | ||
edb4843f ZJS |
426 | <example> |
427 | <title>Retrieve a PGP key</title> | |
428 | ||
b69f810c | 429 | <programlisting>$ resolvectl openpgp zbyszek@fedoraproject.org |
edb4843f ZJS |
430 | d08ee310438ca124a6149ea5cc21b6313b390dce485576eff96f8722._openpgpkey.fedoraproject.org. IN OPENPGPKEY |
431 | mQINBFBHPMsBEACeInGYJCb+7TurKfb6wGyTottCDtiSJB310i37/6ZYoeIay/5soJjlMyf | |
432 | MFQ9T2XNT/0LM6gTa0MpC1st9LnzYTMsT6tzRly1D1UbVI6xw0g0vE5y2Cjk3xUwAynCsSs | |
1eecafb8 | 433 | … |
82d1d240 ZJS |
434 | </programlisting> |
435 | </example> | |
436 | ||
437 | <example> | |
b69f810c | 438 | <title>Retrieve a TLS key (<literal>tcp</literal> and |
82d1d240 ZJS |
439 | <literal>:443</literal> could be skipped)</title> |
440 | ||
b69f810c | 441 | <programlisting>$ resolvectl tlsa tcp fedoraproject.org:443 |
236d312b | 442 | _443._tcp.fedoraproject.org IN TLSA 0 0 1 19400be5b7a31fb733917700789d2f0a2471c0c9d506c0e504c06c16d7cb17c0 |
82d1d240 ZJS |
443 | -- Cert. usage: CA constraint |
444 | -- Selector: Full Certificate | |
445 | -- Matching type: SHA-256 | |
edb4843f ZJS |
446 | </programlisting> |
447 | </example> | |
624993ac LP |
448 | </refsect1> |
449 | ||
450 | <refsect1> | |
451 | <title>See Also</title> | |
452 | <para> | |
453 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
14965b94 LP |
454 | <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
455 | <citerefentry><refentrytitle>systemd.dnssd</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
2eee2088 LP |
456 | <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
457 | <citerefentry><refentrytitle>resolvconf</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
624993ac LP |
458 | </para> |
459 | </refsect1> | |
460 | </refentry> |