разрешить доменные имена, адреса IPV4 и IPv6, записи ресурсов DNS и службы; проанализировать и перенастроить распознаватель DNS (Resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services; introspect and reconfigure the DNS resolver)
Параметры (Options)
-4
, -6
By default, when resolving a hostname, both IPv4 and IPv6
addresses are acquired. By specifying -4
only IPv4 addresses
are requested, by specifying -6
only IPv6 addresses are
requested.
-i
INTERFACE, --interface=
INTERFACE
Specifies the network interface to execute the query on. This
may either be specified as numeric interface index or as
network interface string (e.g. "en0"). Note that this option
has no effect if system-wide DNS configuration (as configured
in /etc/resolv.conf or /etc/systemd/resolved.conf) in place
of per-link configuration is used.
-p
PROTOCOL, --protocol=
PROTOCOL
Specifies the network protocol for the query. May be one of
"dns" (i.e. classic unicast DNS), "llmnr" (Link-Local
Multicast Name Resolution
[5]), "llmnr-ipv4", "llmnr-ipv6"
(LLMNR via the indicated underlying IP protocols), "mdns"
(Multicast DNS
[6]), "mdns-ipv4", "mdns-ipv6" (MDNS via the
indicated underlying IP protocols). By default the lookup is
done via all protocols suitable for the lookup. If used,
limits the set of protocols that may be used. Use this option
multiple times to enable resolving via multiple protocols at
the same time. The setting "llmnr" is identical to specifying
this switch once with "llmnr-ipv4" and once via "llmnr-ipv6".
Note that this option does not force the service to resolve
the operation with the specified protocol, as that might
require a suitable network interface and configuration. The
special value "help" may be used to list known values.
-t
TYPE, --type=
TYPE, -c
CLASS, --class=
CLASS
When used in conjunction with the query
command, specifies
the DNS resource record type (e.g. A
, AAAA
, MX
, ...) and
class (e.g. IN
, ANY
, ...) to look up. If these options are
used a DNS resource record set matching the specified class
and type is requested. The class defaults to IN
if only a
type is specified. The special value "help" may be used to
list known values.
Without these options resolvectl query
provides high-level
domain name to address and address to domain name resolution.
With these options it provides low-level DNS resource record
resolution. The search domain logic is automatically turned
off when these options are used, i.e. specified domain names
need to be fully qualified domain names. Moreover, IDNA
internal domain name translation is turned off as well, i.e.
international domain names should be specified in "xn--..."
notation, unless look-up in MulticastDNS/LLMNR is desired, in
which case UTF-8 characters should be used.
--service-address=
BOOL
Takes a boolean parameter. If true (the default), when doing
a service lookup with --service
the hostnames contained in
the SRV
resource records are resolved as well.
--service-txt=
BOOL
Takes a boolean parameter. If true (the default), when doing
a DNS-SD service lookup with --service
the TXT
service
metadata record is resolved as well.
--cname=
BOOL
Takes a boolean parameter. If true (the default), DNS CNAME
or DNAME
redirections are followed. Otherwise, if a CNAME or
DNAME record is encountered while resolving, an error is
returned.
--validate=
BOOL
Takes a boolean parameter; used in conjunction with query
. If
true (the default), DNSSEC validation is applied as usual —
under the condition that it is enabled for the network and
for systemd-resolved.service as a whole. If false, DNSSEC
validation is disabled for the specific query, regardless of
whether it is enabled for the network or in the service. Note
that setting this option to true does not force DNSSEC
validation on systems/networks where DNSSEC is turned off.
This option is only suitable to turn off such validation
where otherwise enabled, not enable validation where
otherwise disabled.
--synthesize=
BOOL
Takes a boolean parameter; used in conjunction with query
. If
true (the default), select domains are resolved on the local
system, among them "localhost", "_gateway" and "_outbound",
or entries from /etc/hosts. If false these domains are not
resolved locally, and either fail (in case of "localhost",
"_gateway" or "_outbound" and suchlike) or go to the network
via regular DNS/mDNS/LLMNR lookups (in case of /etc/hosts
entries).
--cache=
BOOL
Takes a boolean parameter; used in conjunction with query
. If
true (the default), lookups use the local DNS resource record
cache. If false, lookups are routed to the network instead,
regardless if already available in the local cache.
--zone=
BOOL
Takes a boolean parameter; used in conjunction with query
. If
true (the default), lookups are answered from locally
registered LLMNR or mDNS resource records, if defined. If
false, locally registered LLMNR/mDNS records are not
considered for the lookup request.
--trust-anchor=
BOOL
Takes a boolean parameter; used in conjunction with query
. If
true (the default), lookups for DS and DNSKEY are answered
from the local DNSSEC trust anchors if possible. If false,
the local trust store is not considered for the lookup
request.
--network=
BOOL
Takes a boolean parameter; used in conjunction with query
. If
true (the default), lookups are answered via DNS, LLMNR or
mDNS network requests if they cannot be synthesized locally,
or be answered from the local cache, zone or trust anchors
(see above). If false, the request is not answered from the
network and will thus fail if none of the indicated sources
can answer them.
--search=
BOOL
Takes a boolean parameter. If true (the default), any
specified single-label hostnames will be searched in the
domains configured in the search domain list, if it is
non-empty. Otherwise, the search domain logic is disabled.
Note that this option has no effect if --type=
is used (see
above), in which case the search domain logic is
unconditionally turned off.
--raw
[=payload|packet]
Dump the answer as binary data. If there is no argument or if
the argument is "payload", the payload of the packet is
exported. If the argument is "packet", the whole packet is
dumped in wire format, prefixed by length specified as a
little-endian 64-bit number. This format allows multiple
packets to be dumped and unambiguously parsed.
--legend=
BOOL
Takes a boolean parameter. If true (the default), column
headers and meta information about the query response are
shown. Otherwise, this output is suppressed.
-h
, --help
Print a short help text and exit.
--version
Print a short version string and exit.
--no-pager
Do not pipe output into a pager.