1ORG.FREEDESKTOP.RESOLVE1(5)org.freedesktop.resolve1ORG.FREEDESKTOP.RESOLVE1(5)
2
3
4
6 org.freedesktop.resolve1 - The D-Bus interface of systemd-resolved
7
9 systemd-resolved.service(8) is a system service that provides hostname
10 resolution and caching using DNS, LLMNR, and mDNS. It also does DNSSEC
11 validation. This page describes the resolve semantics and the D-Bus
12 interface.
13
14 This page contains an API reference only. If you are looking for a
15 longer explanation how to use this API, please consult Writing Network
16 Configuration Managers[1] and Writing Resolver Clients[2].
17
19 The service exposes the following interfaces on the Manager object on
20 the bus:
21
22 node /org/freedesktop/resolve1 {
23 interface org.freedesktop.resolve1.Manager {
24 methods:
25 ResolveHostname(in i ifindex,
26 in s name,
27 in i family,
28 in t flags,
29 out a(iiay) addresses,
30 out s canonical,
31 out t flags);
32 ResolveAddress(in i ifindex,
33 in i family,
34 in ay address,
35 in t flags,
36 out a(is) names,
37 out t flags);
38 ResolveRecord(in i ifindex,
39 in s name,
40 in q class,
41 in q type,
42 in t flags,
43 out a(iqqay) records,
44 out t flags);
45 ResolveService(in i ifindex,
46 in s name,
47 in s type,
48 in s domain,
49 in i family,
50 in t flags,
51 out a(qqqsa(iiay)s) srv_data,
52 out aay txt_data,
53 out s canonical_name,
54 out s canonical_type,
55 out s canonical_domain,
56 out t flags);
57 GetLink(in i ifindex,
58 out o path);
59 SetLinkDNS(in i ifindex,
60 in a(iay) addresses);
61 SetLinkDNSEx(in i ifindex,
62 in a(iayqs) addresses);
63 SetLinkDomains(in i ifindex,
64 in a(sb) domains);
65 SetLinkDefaultRoute(in i ifindex,
66 in b enable);
67 SetLinkLLMNR(in i ifindex,
68 in s mode);
69 SetLinkMulticastDNS(in i ifindex,
70 in s mode);
71 SetLinkDNSOverTLS(in i ifindex,
72 in s mode);
73 SetLinkDNSSEC(in i ifindex,
74 in s mode);
75 SetLinkDNSSECNegativeTrustAnchors(in i ifindex,
76 in as names);
77 RevertLink(in i ifindex);
78 RegisterService(in s name,
79 in s name_template,
80 in s type,
81 in q service_port,
82 in q service_priority,
83 in q service_weight,
84 in aa{say} txt_datas,
85 out o service_path);
86 UnregisterService(in o service_path);
87 ResetStatistics();
88 FlushCaches();
89 ResetServerFeatures();
90 properties:
91 readonly s LLMNRHostname = '...';
92 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
93 readonly s LLMNR = '...';
94 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
95 readonly s MulticastDNS = '...';
96 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
97 readonly s DNSOverTLS = '...';
98 readonly a(iiay) DNS = [...];
99 readonly a(iiayqs) DNSEx = [...];
100 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
101 readonly a(iiay) FallbackDNS = [...];
102 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
103 readonly a(iiayqs) FallbackDNSEx = [...];
104 readonly (iiay) CurrentDNSServer = ...;
105 readonly (iiayqs) CurrentDNSServerEx = ...;
106 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
107 readonly a(isb) Domains = [...];
108 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
109 readonly (tt) TransactionStatistics = ...;
110 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
111 readonly (ttt) CacheStatistics = ...;
112 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
113 readonly s DNSSEC = '...';
114 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
115 readonly (tttt) DNSSECStatistics = ...;
116 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
117 readonly b DNSSECSupported = ...;
118 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
119 readonly as DNSSECNegativeTrustAnchors = ['...', ...];
120 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
121 readonly s DNSStubListener = '...';
122 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
123 readonly s ResolvConfMode = '...';
124 };
125 interface org.freedesktop.DBus.Peer { ... };
126 interface org.freedesktop.DBus.Introspectable { ... };
127 interface org.freedesktop.DBus.Properties { ... };
128 };
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 Methods
172 ResolveHostname() takes a hostname and resolves it to one or more IP
173 addresses. As parameters it takes the Linux network interface index to
174 execute the query on, or 0 if it may be done on any suitable interface.
175 The name parameter specifies the hostname to resolve. Note that if
176 required, IDNA conversion is applied to this name unless it is resolved
177 via LLMNR or MulticastDNS. The family parameter limits the results to a
178 specific address family. It may be AF_INET, AF_INET6 or AF_UNSPEC. If
179 AF_UNSPEC is specified (recommended), both kinds are retrieved, subject
180 to local network configuration (i.e. if no local, routable IPv6 address
181 is found, no IPv6 address is retrieved; and similarly for IPv4). A
182 64-bit flags field may be used to alter the behaviour of the resolver
183 operation (see below). The method returns an array of address records.
184 Each address record consists of the interface index the address belongs
185 to, an address family as well as a byte array with the actual IP
186 address data (which either has 4 or 16 elements, depending on the
187 address family). The returned address family will be one of AF_INET or
188 AF_INET6. For IPv6, the returned address interface index should be used
189 to initialize the .sin6_scope_id field of a struct sockaddr_in6
190 instance to permit support for resolution to link-local IP addresses.
191 The address array is followed by the canonical name of the host, which
192 may or may not be identical to the resolved hostname. Finally, a 64-bit
193 flags field is returned that is defined similarly to the flags field
194 that was passed in, but contains information about the resolved data
195 (see below). If the hostname passed in is an IPv4 or IPv6 address
196 formatted as string, it is parsed, and the result is returned. In this
197 case, no network communication is done.
198
199 ResolveAddress() executes the reverse operation: it takes an IP address
200 and acquires one or more hostnames for it. As parameters it takes the
201 interface index to execute the query on, or 0 if all suitable
202 interfaces are OK. The family parameter indicates the address family of
203 the IP address to resolve. It may be either AF_INET or AF_INET6. The
204 address parameter takes the raw IP address data (as either a 4 or 16
205 byte array). The flags input parameter may be used to alter the
206 resolver operation (see below). The method returns an array of name
207 records, each consisting of an interface index and a hostname. The
208 flags output field contains additional information about the resolver
209 operation (see below).
210
211 ResolveRecord() takes a DNS resource record (RR) type, class and name,
212 and retrieves the full resource record set (RRset), including the
213 RDATA, for it. As parameter it takes the Linux network interface index
214 to execute the query on, or 0 if it may be done on any suitable
215 interface. The name parameter specifies the RR domain name to look up
216 (no IDNA conversion is applied), followed by the 16-bit class and type
217 fields (which may be ANY). Finally, a flags field may be passed in to
218 alter behaviour of the look-up (see below). On completion, an array of
219 RR items is returned. Each array entry consists of the network
220 interface index the RR was discovered on, the type and class field of
221 the RR found, and a byte array of the raw RR discovered. The raw RR
222 data starts with the RR's domain name, in the original casing, followed
223 by the RR type, class, TTL and RDATA, in the binary format documented
224 in RFC 1035[3]. For RRs that support name compression in the payload
225 (such as MX or PTR), the compression is expanded in the returned data.
226
227 Note that currently, the class field has to be specified as IN or ANY.
228 Specifying a different class will return an error indicating that
229 look-ups of this kind are unsupported. Similarly, some special types
230 are not supported either (AXFR, OPT, ...). While systemd-resolved
231 parses and validates resource records of many types, it is crucial that
232 clients using this API understand that the RR data originates from the
233 network and should be thoroughly validated before use.
234
235 ResolveService() may be used to resolve a DNS SRV service record, as
236 well as the hostnames referenced in it, and possibly an accompanying
237 DNS-SD TXT record containing additional service metadata. The primary
238 benefit of using this method over ResolveRecord() specifying the SRV
239 type is that it will resolve the SRV and TXT RRs as well as the
240 hostnames referenced in the SRV in a single operation. As parameters it
241 takes a Linux network interface index, a service name, a service type
242 and a service domain. This method may be invoked in three different
243 modes:
244
245 1. To resolve a DNS-SD service, specify the service name (e.g.
246 "Lennart's Files"), the service type (e.g. "_webdav._tcp") and the
247 domain to search in (e.g. "local") as the three service
248 parameters. The service name must be in UTF-8 format, and no IDNA
249 conversion is applied to it in this mode (as mandated by the DNS-SD
250 specifications). However, if necessary, IDNA conversion is applied
251 to the domain parameter.
252
253 2. To resolve a plain SRV record, set the service name parameter to
254 the empty string and set the service type and domain properly.
255 (IDNA conversion is applied to the domain, if necessary.)
256
257 3. Alternatively, leave both the service name and type empty and
258 specify the full domain name of the SRV record (i.e. prefixed with
259 the service type) in the domain parameter. (No IDNA conversion is
260 applied in this mode.)
261
262 The family parameter of the ResolveService() method encodes the desired
263 family of the addresses to resolve (use AF_INET, AF_INET6, or
264 AF_UNSPEC). If this is enabled (Use the NO_ADDRESS flag to turn address
265 resolution off, see below). The flags parameter takes a couple of flags
266 that may be used to alter the resolver operation.
267
268 On completion, ResolveService() returns an array of SRV record
269 structures. Each items consisting of the priority, weight and port
270 fields as well as the hostname to contact, as encoded in the SRV
271 record. Immediately following is an array of the addresses of this
272 hostname, with each item consisting of the interface index, the address
273 family and the address data in a byte array. This address array is
274 followed by the canonicalized hostname. After this array of SRV record
275 structures an array of byte arrays follows that encodes the TXT RR
276 strings, in case DNS-SD look-ups are enabled. The next parameters are
277 the canonical service name, type and domain. This may or may not be
278 identical to the parameters passed in. Finally, a flags field is
279 returned that contains information about the resolver operation
280 performed.
281
282 The ResetStatistics() method resets the various statistics counters
283 that systemd-resolved maintains to zero. (For details, see the
284 statistics properties below.)
285
286 The GetLink() method takes a network interface index and returns the
287 object path to the org.freedesktop.resolve1.Link object corresponding
288 to it.
289
290 The SetLinkDNS() method sets the DNS servers to use on a specific
291 interface. This method (and the following ones) may be used by network
292 management software to configure per-interface DNS settings. It takes a
293 network interface index as well as an array of DNS server IP address
294 records. Each array item consists of an address family (either AF_INET
295 or AF_INET6), followed by a 4-byte or 16-byte array with the raw
296 address data. This method is a one-step shortcut for retrieving the
297 Link object for a network interface using GetLink() (see above) and
298 then invoking the SetDNS() method (see below) on it.
299
300 SetLinkDNSEx() is similar to SetLinkDNS(), but allows an IP port
301 (instead of the default 53) and DNS name to be specified for each DNS
302 server. The server name is used for Server Name Indication (SNI), which
303 is useful when DNS-over-TLS is used. C.f. DNS= in resolved.conf(5).
304
305 SetLinkDefaultRoute() specifies whether the link shall be used as the
306 default route for name queries. See the description of name routing in
307 systemd-resolved.service(8) for details.
308
309 The SetLinkDomains() method sets the search and routing domains to use
310 on a specific network interface for DNS look-ups. It takes a network
311 interface index and an array of domains, each with a boolean parameter
312 indicating whether the specified domain shall be used as a search
313 domain (false), or just as a routing domain (true). Search domains are
314 used for qualifying single-label names into FQDN when looking up
315 hostnames, as well as for making routing decisions on which interface
316 to send queries ending in the domain to. Routing domains are only used
317 for routing decisions and not used for single-label name qualification.
318 Pass the search domains in the order they should be used.
319
320 The SetLinkLLMNR() method enables or disables LLMNR support on a
321 specific network interface. It takes a network interface index as well
322 as a string that may either be empty or one of "yes", "no" or
323 "resolve". If empty, the systemd-wide default LLMNR setting is used. If
324 "yes", LLMNR is used for resolution of single-label names and the local
325 hostname is registered on all local LANs for LLMNR resolution by peers.
326 If "no", LLMNR is turned off fully on this interface. If "resolve",
327 LLMNR is only enabled for resolving names, but the local hostname is
328 not registered for other peers to use.
329
330 Similarly, the SetLinkMulticastDNS() method enables or disables
331 MulticastDNS support on a specific interface. It takes the same
332 parameters as SetLinkLLMNR() described above.
333
334 The SetLinkDNSSEC() method enables or disables DNSSEC validation on a
335 specific network interface. It takes a network interface index as well
336 as a string that may either be empty or one of "yes", "no", or
337 "allow-downgrade". When empty, the system-wide default DNSSEC setting
338 is used. If "yes", full DNSSEC validation is done for all look-ups. If
339 the selected DNS server does not support DNSSEC, look-ups will fail if
340 this mode is used. If "no", DNSSEC validation is fully disabled. If
341 "allow-downgrade", DNSSEC validation is enabled, but is turned off
342 automatically if the selected server does not support it (thus opening
343 up behaviour to downgrade attacks). Note that DNSSEC only applies to
344 traditional DNS, not to LLMNR or MulticastDNS.
345
346 The SetLinkDNSSECNegativeTrustAnchors() method may be used to configure
347 DNSSEC Negative Trust Anchors (NTAs) for a specific network interface.
348 It takes a network interface index and a list of domains as arguments.
349
350 The SetLinkDNSOverTLS() method enables or disables DNS-over-TLS. C.f.
351 DNSOverTLS= in systemd-resolved.service(8) for details.
352
353 Network management software integrating with systemd-resolved should
354 call SetLinkDNS() or SetLinkDNSEx(), SetLinkDefaultRoute(),
355 SetLinkDomains() and others after the interface appeared in the kernel
356 (and thus after a network interface index has been assigned), but
357 before the network interfaces is activated (IFF_UP set) so that all
358 settings take effect during the full time the network interface is up.
359 It is safe to alter settings while the interface is up, however. Use
360 RevertLink() (described below) to reset all per-interface settings.
361
362 The RevertLink() method may be used to revert all per-link settings
363 described above to the defaults.
364
365 The Flags Parameter
366 The four methods above accept and return a 64-bit flags value. In
367 most cases passing 0 is sufficient and recommended. However, the
368 following flags are defined to alter the look-up:
369
370 /* Input+Output: Protocol/scope */
371 #define SD_RESOLVED_DNS (UINT64_C(1) << 0)
372 #define SD_RESOLVED_LLMNR_IPV4 (UINT64_C(1) << 1)
373 #define SD_RESOLVED_LLMNR_IPV6 (UINT64_C(1) << 2)
374 #define SD_RESOLVED_MDNS_IPV4 (UINT64_C(1) << 3)
375 #define SD_RESOLVED_MDNS_IPV6 (UINT64_C(1) << 4)
376
377 /* Input: Restrictions */
378 #define SD_RESOLVED_NO_CNAME (UINT64_C(1) << 5)
379 #define SD_RESOLVED_NO_TXT (UINT64_C(1) << 6)
380 #define SD_RESOLVED_NO_ADDRESS (UINT64_C(1) << 7)
381 #define SD_RESOLVED_NO_SEARCH (UINT64_C(1) << 8)
382 #define SD_RESOLVED_NO_VALIDATE (UINT64_C(1) << 10)
383 #define SD_RESOLVED_NO_SYNTHESIZE (UINT64_C(1) << 11)
384 #define SD_RESOLVED_NO_CACHE (UINT64_C(1) << 12)
385 #define SD_RESOLVED_NO_ZONE (UINT64_C(1) << 13)
386 #define SD_RESOLVED_NO_TRUST_ANCHOR (UINT64_C(1) << 14)
387 #define SD_RESOLVED_NO_NETWORK (UINT64_C(1) << 15)
388 #define SD_RESOLVED_NO_STALE (UINT64_C(1) << 24)
389
390 /* Output: Security */
391 #define SD_RESOLVED_AUTHENTICATED (UINT64_C(1) << 9)
392 #define SD_RESOLVED_CONFIDENTIAL (UINT64_C(1) << 18)
393
394 /* Output: Origin */
395 #define SD_RESOLVED_SYNTHETIC (UINT64_C(1) << 19)
396 #define SD_RESOLVED_FROM_CACHE (UINT64_C(1) << 20)
397 #define SD_RESOLVED_FROM_ZONE (UINT64_C(1) << 21)
398 #define SD_RESOLVED_FROM_TRUST_ANCHOR (UINT64_C(1) << 22)
399 #define SD_RESOLVED_FROM_NETWORK (UINT64_C(1) << 23)
400
401 On input, the first five flags control the protocols to use for the
402 look-up. They refer to classic unicast DNS, LLMNR via IPv4/UDP and
403 IPv6/UDP respectively, as well as MulticastDNS via IPv4/UDP and
404 IPv6/UDP. If all of these five bits are off on input (which is
405 strongly recommended) the look-up will be done via all suitable
406 protocols for the specific look-up. Note that these flags operate
407 as filter only, but cannot force a look-up to be done via a
408 protocol. Specifically, systemd-resolved will only route look-ups
409 within the .local TLD to MulticastDNS (plus some reverse look-up
410 address domains), and single-label names to LLMNR (plus some
411 reverse address lookup domains). It will route neither of these to
412 Unicast DNS servers. Also, it will do LLMNR and Multicast DNS only
413 on interfaces suitable for multicast.
414
415 On output, these five flags indicate which protocol was used to
416 execute the operation, and hence where the data was found.
417
418 The primary use cases for these five flags are follow-up look-ups
419 based on DNS data retrieved earlier. In this case it is often a
420 good idea to limit the follow-up look-up to the protocol that was
421 used to discover the first DNS result.
422
423 The NO_CNAME flag controls whether CNAME/DNAME resource records
424 shall be followed during the look-up. This flag is only available
425 at input, none of the functions will return it on output. If a
426 CNAME/DNAME RR is discovered while resolving a hostname, an error
427 is returned instead. By default, when the flag is off, CNAME/DNAME
428 RRs are followed.
429
430 The NO_TXT and NO_ADDRESS flags only influence operation of the
431 ResolveService() method. They are only defined for input, not
432 output. If NO_TXT is set, the DNS-SD TXT RR look-up is not done in
433 the same operation. If NO_ADDRESS is set, the discovered hostnames
434 are not implicitly translated to their addresses.
435
436 The NO_SEARCH flag turns off the search domain logic. It is only
437 defined for input in ResolveHostname(). When specified,
438 single-label hostnames are not qualified using defined search
439 domains, if any are configured. Note that ResolveRecord() will
440 never qualify single-label domain names using search domains. Also
441 note that multi-label hostnames are never subject to search list
442 expansion.
443
444 NO_VALIDATE can be set to disable validation via DNSSEC even if it
445 would normally be used.
446
447 The next six flags allow disabling certain sources during
448 resolution. NO_SYNTHESIZE disables synthetic records, e.g. the
449 local host name, see section SYNTHETIC RECORDS in systemd-
450 resolved.service(8) for more information. NO_CACHE disables the use
451 of the cache of previously resolved records. NO_ZONE disables
452 answers using locally registered public LLMNR/mDNS resource
453 records. NO_TRUST_ANCHOR disables answers using locally configured
454 trust anchors. NO_NETWORK requires all answers to be provided
455 without using the network, i.e. either from local sources or the
456 cache. NO_STALE flag can be set to disable answering request with
457 stale records.
458
459 The AUTHENTICATED bit is defined only in the output flags of the
460 four functions. If set, the returned data has been fully
461 authenticated. Specifically, this bit is set for all
462 DNSSEC-protected data for which a full trust chain may be
463 established to a trusted domain anchor. It is also set for locally
464 synthesized data, such as "localhost" or data from /etc/hosts.
465 Moreover, it is set for all LLMNR or mDNS RRs which originate from
466 the local host. Applications that require authenticated RR data for
467 operation should check this flag before trusting the data. Note
468 that systemd-resolved will never return invalidated data, hence
469 this flag simply allows one to discern the cases where data is
470 known to be trusted, or where there is proof that the data is
471 "rightfully" unauthenticated (which includes cases where the
472 underlying protocol or server does not support authenticating
473 data).
474
475 CONFIDENTIAL means the query was resolved via encrypted channels or
476 never left this system.
477
478 The next five bits flags are used in output and provide information
479 about the origin of the answer. FROM_SYNTHETIC means the query was
480 (at least partially) synthesized locally. FROM_CACHE means the
481 query was answered (at least partially) using the cache. FROM_ZONE
482 means the query was answered (at least partially) based on public,
483 locally registered records. FROM_TRUST_ANCHOR means the query was
484 answered (at least partially) using local trust anchors.
485 FROM_NETWORK means the query was answered (at least partially)
486 using the network.
487
488 Properties
489 The LLMNR and MulticastDNS properties report whether LLMNR and
490 MulticastDNS are (globally) enabled. Each may be one of "yes", "no",
491 and "resolve". See SetLinkLLMNR() and SetLinkMulticastDNS() above.
492
493 LLMNRHostname contains the hostname currently exposed on the network
494 via LLMNR. It usually follows the system hostname as may be queried via
495 gethostname(3), but may differ if a conflict is detected on the
496 network.
497
498 DNS and DNSEx contain arrays of all DNS servers currently used by
499 systemd-resolved. DNS contains information similar to the DNS server
500 data in /run/systemd/resolve/resolv.conf. Each structure in the array
501 consists of a numeric network interface index, an address family, and a
502 byte array containing the DNS server address (either 4 bytes in length
503 for IPv4 or 16 bytes in lengths for IPv6). DNSEx is similar, but
504 additionally contains the IP port and server name (used for Server Name
505 Indication, SNI). Both arrays contain DNS servers configured
506 system-wide, including those possibly read from a foreign
507 /etc/resolv.conf or the DNS= setting in /etc/systemd/resolved.conf, as
508 well as per-interface DNS server information either retrieved from
509 systemd-networkd(8), or configured by external software via
510 SetLinkDNS() or SetLinkDNSEx() (see above). The network interface index
511 will be 0 for the system-wide configured services and non-zero for the
512 per-link servers.
513
514 FallbackDNS and FallbackDNSEx contain arrays of all DNS servers
515 configured as fallback servers, if any, using the same format as DNS
516 and DNSEx described above. See the description of FallbackDNS= in
517 resolved.conf(5) for the description of when those servers are used.
518
519 CurrentDNSServer and CurrentDNSServerEx specify the server that is
520 currently used for query resolution, in the same format as a single
521 entry in the DNS and DNSEx arrays described above.
522
523 Similarly, the Domains property contains an array of all search and
524 routing domains currently used by systemd-resolved. Each entry consists
525 of a network interface index (again, 0 encodes system-wide entries),
526 the actual domain name, and whether the entry is used only for routing
527 (true) or for both routing and searching (false).
528
529 The TransactionStatistics property contains information about the
530 number of transactions systemd-resolved has processed. It contains a
531 pair of unsigned 64-bit counters, the first containing the number of
532 currently ongoing transactions, the second the number of total
533 transactions systemd-resolved is processing or has processed. The
534 latter value may be reset using the ResetStatistics() method described
535 above. Note that the number of transactions does not directly map to
536 the number of issued resolver bus method calls. While simple look-ups
537 usually require a single transaction only, more complex look-ups might
538 result in more, for example when CNAMEs or DNSSEC are in use.
539
540 The CacheStatistics property contains information about the executed
541 cache operations so far. It exposes three 64-bit counters: the first
542 being the total number of current cache entries (both positive and
543 negative), the second the number of cache hits, and the third the
544 number of cache misses. The latter counters may be reset using
545 ResetStatistics() (see above).
546
547 The DNSSEC property specifies current status of DNSSEC validation. It
548 is one of "yes" (validation is enforced), "no" (no validation is done),
549 "allow-downgrade" (validation is done if the current DNS server
550 supports it). See the description of DNSSEC= in resolved.conf(5).
551
552 The DNSSECStatistics property contains information about the DNSSEC
553 validations executed so far. It contains four 64-bit counters: the
554 number of secure, insecure, bogus, and indeterminate DNSSEC validations
555 so far. The counters are increased for each validated RRset, and each
556 non-existence proof. The secure counter is increased for each operation
557 that successfully verified a signed reply, the insecure counter is
558 increased for each operation that successfully verified that an
559 unsigned reply is rightfully unsigned. The bogus counter is increased
560 for each operation where the validation did not check out and the data
561 is likely to have been tempered with. Finally the indeterminate counter
562 is increased for each operation which did not complete because the
563 necessary keys could not be acquired or the cryptographic algorithms
564 were unknown.
565
566 The DNSSECSupported boolean property reports whether DNSSEC is enabled
567 and the selected DNS servers support it. It combines information about
568 system-wide and per-link DNS settings (see below), and only reports
569 true if DNSSEC is enabled and supported on every interface for which
570 DNS is configured and for the system-wide settings if there are any.
571 Note that systemd-resolved assumes DNSSEC is supported by DNS servers
572 until it verifies that this is not the case. Thus, the reported value
573 may initially be true, until the first transactions are executed.
574
575 The DNSOverTLS boolean property reports whether DNS-over-TLS is
576 enabled.
577
578 The ResolvConfMode property exposes how /etc/resolv.conf is managed on
579 the host. Currently, the values "uplink", "stub", "static" (these three
580 correspond to the three different files systemd-resolved.service
581 provides), "foreign" (the file is managed by admin or another service,
582 systemd-resolved.service just consumes it), "missing" (/etc/resolv.conf
583 is missing).
584
585 The DNSStubListener property reports whether the stub listener on port
586 53 is enabled. Possible values are "yes" (enabled), "no" (disabled),
587 "udp" (only the UDP listener is enabled), and "tcp" (only the TCP
588 listener is enabled).
589
591 node /org/freedesktop/resolve1/link/_1 {
592 interface org.freedesktop.resolve1.Link {
593 methods:
594 SetDNS(in a(iay) addresses);
595 SetDNSEx(in a(iayqs) addresses);
596 SetDomains(in a(sb) domains);
597 SetDefaultRoute(in b enable);
598 SetLLMNR(in s mode);
599 SetMulticastDNS(in s mode);
600 SetDNSOverTLS(in s mode);
601 SetDNSSEC(in s mode);
602 SetDNSSECNegativeTrustAnchors(in as names);
603 Revert();
604 properties:
605 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
606 readonly t ScopesMask = ...;
607 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
608 readonly a(iay) DNS = [...];
609 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
610 readonly a(iayqs) DNSEx = [...];
611 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
612 readonly (iay) CurrentDNSServer = ...;
613 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
614 readonly (iayqs) CurrentDNSServerEx = ...;
615 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
616 readonly a(sb) Domains = [...];
617 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
618 readonly b DefaultRoute = ...;
619 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
620 readonly s LLMNR = '...';
621 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
622 readonly s MulticastDNS = '...';
623 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
624 readonly s DNSOverTLS = '...';
625 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
626 readonly s DNSSEC = '...';
627 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
628 readonly as DNSSECNegativeTrustAnchors = ['...', ...];
629 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
630 readonly b DNSSECSupported = ...;
631 };
632 interface org.freedesktop.DBus.Peer { ... };
633 interface org.freedesktop.DBus.Introspectable { ... };
634 interface org.freedesktop.DBus.Properties { ... };
635 };
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663 For each Linux network interface a "Link" object is created which
664 exposes per-link DNS configuration and state. Use GetLink() on the
665 Manager interface to retrieve the object path for a link object given
666 the network interface index (see above).
667
668 Methods
669 The various methods exposed by the Link interface are equivalent to
670 their similarly named counterparts on the Manager interface. e.g.
671 SetDNS() on the Link object maps to SetLinkDNS() on the Manager object,
672 the main difference being that the later expects an interface index to
673 be specified. Invoking the methods on the Manager interface has the
674 benefit of reducing roundtrips, as it is not necessary to first request
675 the Link object path via GetLink() before invoking the methods. The
676 same relationship holds for SetDNSEx(), SetDomains(),
677 SetDefaultRoute(), SetLLMNR(), SetMulticastDNS(), SetDNSOverTLS(),
678 SetDNSSEC(), SetDNSSECNegativeTrustAnchors(), and Revert(). For further
679 details on these methods see the Manager documentation above.
680
681 Properties
682 ScopesMask defines which resolver scopes are currently active on this
683 interface. This 64-bit unsigned integer field is a bit mask consisting
684 of a subset of the bits of the flags parameter describe above.
685 Specifically, it may have the DNS, LLMNR and MDNS bits (the latter in
686 IPv4 and IPv6 flavours) set. Each individual bit is set when the
687 protocol applies to a specific interface and is enabled for it. It is
688 unset otherwise. Specifically, a multicast-capable interface in the
689 "UP" state with an IP address is suitable for LLMNR or MulticastDNS,
690 and any interface that is UP and has an IP address is suitable for DNS.
691 Note the relationship of the bits exposed here with the LLMNR and
692 MulticastDNS properties also exposed on the Link interface. The latter
693 expose what is *configured* to be used on the interface, the former
694 expose what is actually used on the interface, taking into account the
695 abilities of the interface.
696
697 DNSSECSupported exposes a boolean field that indicates whether DNSSEC
698 is currently configured and in use on the interface. Note that if
699 DNSSEC is enabled on an interface, it is assumed available until it is
700 detected that the configured server does not actually support it. Thus,
701 this property may initially report that DNSSEC is supported on an
702 interface.
703
704 DefaultRoute exposes a boolean field that indicates whether the
705 interface will be used as default route for name queries. See
706 SetLinkDefaultRoute() above.
707
708 The other properties reflect the state of the various configuration
709 settings for the link which may be set with the various methods calls
710 such as SetDNS() or SetLLMNR().
711
713 Many bus methods systemd-resolved exposes (in particular the resolver
714 methods such as ResolveHostname() on the Manager interface) may return
715 some of the following errors:
716
717 org.freedesktop.resolve1.NoNameServers
718 No suitable DNS servers were found to resolve a request.
719
720 org.freedesktop.resolve1.InvalidReply
721 A response from the selected DNS server was not understood.
722
723 org.freedesktop.resolve1.NoSuchRR
724 The requested name exists, but there is no resource record of the
725 requested type for it. (This is the DNS NODATA case).
726
727 org.freedesktop.resolve1.CNameLoop
728 The look-up failed because a CNAME or DNAME loop was detected.
729
730 org.freedesktop.resolve1.Aborted
731 The look-up was aborted because the selected protocol became
732 unavailable while the operation was ongoing.
733
734 org.freedesktop.resolve1.NoSuchService
735 A service look-up was successful, but the SRV record reported that
736 the service is not available.
737
738 org.freedesktop.resolve1.DnssecFailed
739 The acquired response did not pass DNSSEC validation.
740
741 org.freedesktop.resolve1.NoTrustAnchor
742 No chain of trust could be established for the response to a
743 configured DNSSEC trust anchor.
744
745 org.freedesktop.resolve1.ResourceRecordTypeUnsupported
746 The requested resource record type is not supported on the selected
747 DNS servers. This error is generated for example when an RRSIG
748 record is requested from a DNS server that does not support DNSSEC.
749
750 org.freedesktop.resolve1.NoSuchLink
751 No network interface with the specified network interface index
752 exists.
753
754 org.freedesktop.resolve1.LinkBusy
755 The requested configuration change could not be made because
756 systemd-networkd(8), already took possession of the interface and
757 supplied configuration data for it.
758
759 org.freedesktop.resolve1.NetworkDown
760 The requested look-up failed because the system is currently not
761 connected to any suitable network.
762
763 org.freedesktop.resolve1.DnsError.NXDOMAIN,
764 org.freedesktop.resolve1.DnsError.REFUSED, ...
765 The look-up failed with a DNS return code reporting a failure. The
766 error names used as suffixes here are defined in by IANA in
767 DNS RCODEs[4].
768
770 Example 1. Introspect org.freedesktop.resolve1.Manager on the bus
771
772 $ gdbus introspect --system \
773 --dest org.freedesktop.resolve1 \
774 --object-path /org/freedesktop/resolve1
775
776
777 Example 2. Introspect org.freedesktop.resolve1.Link on the bus
778
779 $ gdbus introspect --system \
780 --dest org.freedesktop.resolve1 \
781 --object-path /org/freedesktop/resolve1/link/_11
782
783
785 These D-Bus interfaces follow the usual interface versioning
786 guidelines[5].
787
789 1. Writing Network Configuration Managers
790 https://wiki.freedesktop.org/www/Software/systemd/writing-network-configuration-managers
791
792 2. Writing Resolver Clients
793 https://wiki.freedesktop.org/www/Software/systemd/writing-resolver-clients
794
795 3. RFC 1035
796 https://www.ietf.org/rfc/rfc1035.txt
797
798 4. DNS RCODEs
799 https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
800
801 5. the usual interface versioning guidelines
802 https://0pointer.de/blog/projects/versioning-dbus.html
803
804
805
806systemd 254 ORG.FREEDESKTOP.RESOLVE1(5)