chiark / gitweb /
networkd: merge DHCPv4 and DHCPv6 config
[elogind.git] / man / systemd.network.xml
index 8a39fc4fa4e12339e1ec0057fe6317c50c7bd688..67f10e1ef5887103977e5f68b9e179e8a9727c1b 100644 (file)
                 <filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
                 disables the configuration file entirely.</para>
 
+        </refsect1>
+
+        <refsect1>
+                <title>[Match] Section Options</title>
+
                         <para>The network file contains a <literal>[Match]</literal> section,
                         which determines if a given network file may be applied to a given device;
                         and a <literal>[Network]</literal> section specifying how the device should
                                 </varlistentry>
                         </variablelist>
 
+        </refsect1>
+
+        <refsect1>
+                <title>[Network] Section Options</title>
+
                         <para>The <literal>[Network]</literal> section accepts the following keys:</para>
 
                         <variablelist class='network-directives'>
                                 <varlistentry>
                                         <term><varname>DHCP=</varname></term>
                                         <listitem>
-                                                <para>A boolean. When true, enables basic DHCPv4 support.</para>
+                                                <para>Enables DHCPv4 and/or DHCPv6 support. Accepts
+                                                <literal>both</literal>, <literal>none</literal>,
+                                                <literal>v4</literal> or <literal>v6</literal>.</para>
                                         </listitem>
                                 </varlistentry>
                                 <varlistentry>
                                         <term><varname>IPv4LL=</varname></term>
                                         <listitem>
                                                 <para>A boolean. When true, enables IPv4 link-local support.
-                                                If <literal>DHCP=</literal> is also true, IPv4 link-local
-                                                address will be removed upon acquiring a DHCP lease.
+                                                If <literal>DHCP=</literal> is also true, acquiring DHCP address
+                                                will deprecate previously acquired IPv4 link-local address or
+                                                stop acquiring process if one has not been acquired before.
                                                 </para>
                                         </listitem>
                                 </varlistentry>
                                                 an Address key (see below). This option may be specified
                                                 more than once.
                                                 </para>
+
+                                                <para>If the specified
+                                                address is 0.0.0.0
+                                                (for IPv4) or [::]
+                                                (for IPv6), a new
+                                                address range of the
+                                                requested size is
+                                                automatically
+                                                allocated from a
+                                                system-wide pool of
+                                                unused ranges. The
+                                                allocated range is
+                                                checked against all
+                                                current network
+                                                interfaces and all
+                                                known network
+                                                configuration files to
+                                                avoid address range
+                                                conflicts. The default
+                                                system-wide pool
+                                                consists of
+                                                192.168.0.0/16,
+                                                172.16.0.0/12 and
+                                                10.0.0.0/8 for IPv4,
+                                                and fc00::/7 for
+                                                IPv6. This
+                                                functionality is
+                                                useful to manage a
+                                                large number of
+                                                dynamically created
+                                                network interfaces
+                                                with the same network
+                                                configuration and
+                                                automatic address
+                                                range
+                                                assignment.</para>
+
                                         </listitem>
                                 </varlistentry>
                                 <varlistentry>
                                 </varlistentry>
                         </variablelist>
 
+        </refsect1>
+
+        <refsect1>
+                <title>[Address] Section Options</title>
+
                         <para>An <literal>[Address]</literal> section accepts the following keys.
                         Specify several <literal>[Address]</literal> sections to configure several
                         addresses.</para>
                                         <term><varname>Broadcast=</varname></term>
                                         <listitem>
                                                 <para>The broadcast address, which must be in the format described in
-                                                <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-                                                This key only applies to IPv4 addresses. If it is not given, it is
+                                                <citerefentry><refentrytitle>inet_pton</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+                                                This key only applies to IPv4 addresses. If it is not given, it is
                                                 derived from the <literal>Address</literal> key.</para>
                                         </listitem>
                                 </varlistentry>
                                         </listitem>
                                 </varlistentry>
                         </variablelist>
+        </refsect1>
 
+        <refsect1>
+                <title>[Route] Section Options</title>
                         <para>The <literal>[Route]</literal> section accepts the following keys. Specify
                         several <literal>[Route]</literal> sections to configure several routes.</para>
 
                                         <term><varname>Destination=</varname></term>
                                         <listitem>
                                                 <para>The destination prefix of the route. Possibly followed by a slash and the
-                                                prefixlength, if ommitted a full-length host route is assumed.</para>
+                                                prefixlength. If ommitted, a full-length host route is assumed.</para>
                                         </listitem>
                                 </varlistentry>
                         </variablelist>
+        </refsect1>
 
-                        <para>The <literal>[DHCPv4]</literal> section accepts the following keys:</para>
+        <refsect1>
+                <title>[DHCP] Section Options</title>
+                        <para>The <literal>[DHCP]</literal> section accepts the following keys:</para>
 
                         <variablelist class='network-directives'>
                                 <varlistentry>
@@ -362,13 +423,35 @@ Name=en*
 DHCP=yes</programlisting>
                 </example>
 
+                <example>
+                        <title>/etc/systemd/network/bridge-static.network</title>
+
+                        <programlisting>[Match]
+Name=bridge0
+
+[Network]
+Address=192.168.0.15/24
+Gateway=192.168.0.1
+DNS=192.168.0.1</programlisting>
+                </example>
+
+                <example>
+                        <title>/etc/systemd/network/bridge-slave-interface.network</title>
+
+                        <programlisting>[Match]
+Name=enp2s0
+
+[Network]
+Bridge=bridge0</programlisting>
+                </example>
         </refsect1>
 
         <refsect1>
                 <title>See Also</title>
                 <para>
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>
                 </para>
         </refsect1>