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