chiark / gitweb /
doc: add cross-references between systemd.{link, netdev, network}
[elogind.git] / man / systemd.link.xml
index 718eb8efdb5bceb35f3537c41f45a29a52978c6a..bb3f908288093d3957c0272fefa07b50c74c2318 100644 (file)
                 <literal>[Link]</literal> section specifying how the device should be
                 configured. The first (in lexical order) of the link files that matches
                 a given device is applied.</para>
+        </refsect1>
+
+        <refsect1>
+                <title>[Match] Section Options</title>
 
                 <para>A link file is said to match a device if each of the entries in the
                 <literal>[Match]</literal> section matches, or if the section is empty.
                                         <para>The hardware address.</para>
                                 </listitem>
                         </varlistentry>
+                        <varlistentry>
+                                <term><varname>OriginalName=</varname></term>
+                                <listitem>
+                                        <para>The device name, as exposed by the udev
+                                        property "INTERFACE". May contain shell style
+                                        globs. This can not be used to match on names
+                                        that have already been changed from userspace.
+                                        Caution is advised when matching on
+                                        kernel-assigned names, as they are known to
+                                        be unstable between reboots.</para>
+                                </listitem>
+                        </varlistentry>
                         <varlistentry>
                                 <term><varname>Path=</varname></term>
                                 <listitem>
-                                <para>The persistent path, as exposed by the
-                                udev property <literal>ID_PATH</literal>. May
-                                contain shell style globs.</para>
-                        </listitem>
+                                        <para>The persistent path, as exposed by the
+                                        udev property <literal>ID_PATH</literal>. May
+                                        contain shell style globs.</para>
+                                </listitem>
                         </varlistentry>
                         <varlistentry>
                                 <term><varname>Driver=</varname></term>
                                 <listitem>
                                         <para>The driver currently bound to the device,
                                         as exposed by the udev property <literal>DRIVER</literal>
-                                        of its parent device, or if that is not set the
+                                        of its parent device, or if that is not set, the
                                         driver as exposed by <literal>ethtool -i</literal>
                                         of the device itself.</para>
                                 </listitem>
                         </varlistentry>
                 </variablelist>
 
+        </refsect1>
+
+        <refsect1>
+                <title>[Link] Section Options</title>
+
                 <para>The <literal>[Link]</literal> section accepts the following
                 keys:</para>
 
                                                         <listitem>
                                                                 <para>If the hardware has a persistent
                                                                 MAC address, as most hardware should,
-                                                                and this is used by the kernel, nothing
+                                                                and if it is used by the kernel, nothing
                                                                 is done. Otherwise, a new MAC address
                                                                 is generated which is guaranteed to be
                                                                 the same on every boot for the given
                                         be set. <literal>NamePolicy</literal> may be
                                         disabled by specifying
                                         <literal>net.ifnames=0</literal> on the kernel
-                                        commandline. Each of the policies may fail, and
+                                        command line. Each of the policies may fail, and
                                         the first successful one is used. The name is
                                         not set directly, but is exported to udev as
                                         the property <literal>ID_NET_NAME</literal>,
                                         which is, by default, used by a udev rule to set
-                                        <literal>NAME</literal>. The available policies
-                                        are:</para>
+                                        <literal>NAME</literal>. If the name has already
+                                        been set by userspace, no renaming is performed.
+                                        The available policies are:</para>
 
                                         <variablelist>
+                                                <varlistentry>
+                                                        <term><literal>kernel</literal></term>
+                                                        <listitem>
+                                                                <para>If the kernel claims that the name it
+                                                                has set for a device is predictable, then
+                                                                no renaming is performed.
+                                                                </para>
+                                                        </listitem>
+                                                </varlistentry>
                                                 <varlistentry>
                                                         <term><literal>database</literal></term>
                                                         <listitem>
                                                                 <para>The name is set based on entries in
                                                                 the udev's Hardware Database with the key
-                                                                <literal>ID_NET_NAME_FROM_DATABASE</literal>
-                                                                .</para>
+                                                                <literal>ID_NET_NAME_FROM_DATABASE</literal>.
+                                                                </para>
                                                         </listitem>
                                                 </varlistentry>
                                                 <varlistentry>
                                                         <listitem>
                                                                 <para>The name is set based on information given by
                                                                 the firmware for on-board devices, as exported by
-                                                                the udev property <literal>ID_NET_NAME_ONBOARD</literal>
-                                                                .</para>
+                                                                the udev property <literal>ID_NET_NAME_ONBOARD</literal>.
+                                                                </para>
                                                         </listitem>
                                                 </varlistentry>
                                                 <varlistentry>
                                                         <listitem>
                                                                 <para>The name is set based on information given by
                                                                 the firmware for hot-plug devices, as exported by
-                                                                the udev property <literal>ID_NET_NAME_SLOT</literal>
-                                                                .</para>
+                                                                the udev property <literal>ID_NET_NAME_SLOT</literal>.
+                                                                </para>
                                                         </listitem>
                                                 </varlistentry>
                                                 <varlistentry>
                                                 <varlistentry>
                                                         <term><literal>magic</literal></term>
                                                         <listitem>
-                                                                <para>Wake on receipt of a magic packet
+                                                                <para>Wake on receipt of a magic packet.
                                                                 </para>
                                                         </listitem>
                                                 </varlistentry>
         <refsect1>
                 <title>Example</title>
                 <example>
-                        <title>/etc/systemd/network/bridge.netdev</title>
+                        <title>/etc/systemd/network/wireless.link</title>
 
-                        <programlisting>[NetDev]
-Name=bridge0
-Kind=bridge</programlisting>
-                </example>
-        </refsect1>
+                        <programlisting>[Match]
+MACAddress=12:34:56:78:9a:bc
+Driver=brcmsmac
+Path=pci-0000:02:00.0-*
+Type=wlan
+Virtualization=no
+Host=my-laptop
+Architecture=x86-64
 
-        <refsect1>
-                <title>Example</title>
-                <example>
-                        <title>/etc/systemd/network/vlan1.netdev</title>
-
-                        <programlisting>[NetDev]
-Name=vlan1
-Kind=vlan
-
-[VLAN]
-Id=1</programlisting>
+[Link]
+Name=wireless0
+MTUBytes=1450
+BitsPerSecond=10M
+WakeOnLan=magic
+MACAddress=cb:a9:87:65:43:21</programlisting>
                 </example>
         </refsect1>
 
@@ -378,6 +407,12 @@ Id=1</programlisting>
                         </citerefentry>,
                         <citerefentry>
                                 <refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum>
+                        </citerefentry>,
+                        <citerefentry>
+                                <refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum>
+                        </citerefentry>,
+                        <citerefentry>
+                                <refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum>
                         </citerefentry>
                 </para>
         </refsect1>