man: update explanation about the format to specify DNS servers

This commit is contained in:
Yu Watanabe 2020-07-19 13:57:51 +09:00
parent a574b7d152
commit 711dd5db9e
3 changed files with 32 additions and 14 deletions

View file

@ -145,15 +145,20 @@
settings for network interfaces. These commands may be used to inform
<command>systemd-resolved</command> or <command>systemd-networkd</command> about per-interface DNS
configuration determined through external means. The <command>dns</command> command expects IPv4 or
IPv6 address specifications of DNS servers to use. The <command>domain</command> command expects
valid DNS domains, possibly prefixed with <literal>~</literal>, and configures a per-interface
search or route-only domain. The <command>default-route</command> command expects a boolean
parameter, and configures whether the link may be used as default route for DNS lookups, i.e. if it
is suitable for lookups on domains no other link explicitly is configured for. The
<command>llmnr</command>, <command>mdns</command>, <command>dnssec</command> and
<command>dnsovertls</command> commands may be used to configure the per-interface LLMNR,
MulticastDNS, DNSSEC and DNSOverTLS settings. Finally, <command>nta</command> command may be used
to configure additional per-interface DNSSEC NTA domains.</para>
IPv6 address specifications of DNS servers to use. Each address can optionally take a port number
separated with <literal>:</literal>, a network interface name or index separated with
<literal>%</literal>, and a Server Name Indication (SNI) separated with <literal>#</literal>. When
IPv6 address is specified with a port number, then the address must be in the square brackets. That
is, the acceptable full formats are <literal>111.222.333.444:9953%ifname#example.com</literal> for
IPv4 and <literal>[1111:2222::3333]:9953%ifname#example.com</literal> for IPv6. The
<command>domain</command> command expects valid DNS domains, possibly prefixed with
<literal>~</literal>, and configures a per-interface search or route-only domain. The
<command>default-route</command> command expects a boolean parameter, and configures whether the
link may be used as default route for DNS lookups, i.e. if it is suitable for lookups on domains no
other link explicitly is configured for. The <command>llmnr</command>, <command>mdns</command>,
<command>dnssec</command> and <command>dnsovertls</command> commands may be used to configure the
per-interface LLMNR, MulticastDNS, DNSSEC and DNSOverTLS settings. Finally, <command>nta</command>
command may be used to configure additional per-interface DNSSEC NTA domains.</para>
<para>Commands <command>dns</command>, <command>domain</command> and <command>nta</command> can take
a single empty string argument to clear their respective value lists.</para>

View file

@ -47,8 +47,13 @@
<varlistentry>
<term><varname>DNS=</varname></term>
<listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. DNS requests
are sent to one of the listed DNS servers in parallel to suitable per-link DNS servers acquired from
<listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. Each address can
optionally take a port number separated with <literal>:</literal>, a network interface name or index separated with
<literal>%</literal>, and a Server Name Indication (SNI) separated with <literal>#</literal>. When IPv6 address is
specified with a port number, then the address must be in the square brackets. That is, the acceptable full formats
are <literal>111.222.333.444:9953%ifname#example.com</literal> for IPv4 and
<literal>[1111:2222::3333]:9953%ifname#example.com</literal> for IPv6. DNS requests are sent to one of the listed
DNS servers in parallel to suitable per-link DNS servers acquired from
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> or
set at runtime by external applications. For compatibility reasons, if this setting is not specified, the DNS
servers listed in <filename>/etc/resolv.conf</filename> are used instead, if that file exists and any servers
@ -57,8 +62,8 @@
<varlistentry>
<term><varname>FallbackDNS=</varname></term>
<listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers. Any
per-link DNS servers obtained from
<listitem><para>A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers. Please see
<varname>DNS=</varname> for acceptable format of adddresses. Any per-link DNS servers obtained from
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
take precedence over this setting, as do any servers set via <varname>DNS=</varname> above or
<filename>/etc/resolv.conf</filename>. This setting is hence only used if no other DNS server information is

View file

@ -606,7 +606,15 @@
<para>A DNS server address, which must be in the format
described in
<citerefentry project='man-pages'><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
This option may be specified more than once. This setting is read by
This option may be specified more than once. Each address can optionally take a port number
separated with <literal>:</literal>, a network interface name or index separated with
<literal>%</literal>, and a Server Name Indication (SNI) separated with <literal>#</literal>.
When IPv6 address is specified with a port number, then the address must be in the square
brackets. That is, the acceptable full formats are
<literal>111.222.333.444:9953%ifname#example.com</literal> for IPv4 and
<literal>[1111:2222::3333]:9953%ifname#example.com</literal> for IPv6. This setting can be
specified multiple times. If an empty string is assigned, then the all previous assignments
are cleared. This setting is read by
<citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
</listitem>
</varlistentry>