<refsect1>
<title>Description</title>
- <para>Network interfaces may be renamed to give them predictable names when there's enough information to
- generate appropriate names and the use of certain types of names is configured. This page describes the
- first part, i.e. what possible names may be generated. Those names are generated by the
+ <para>Network interfaces names and MAC addresses may be generated based on certain stable interface
+ attributes. This is possible when there is enough information about the device to generate those
+ attributes and the use of this information is configured. This page describes interface naming, i.e. what
+ possible names may be generated. Those names are generated by the
<citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
builtin <command>net_id</command> and exported as udev properties
(<varname>ID_NET_NAME_ONBOARD=</varname>, <varname>ID_NET_LABEL_ONBOARD=</varname>,
<varname>ID_NET_NAME_PATH=</varname>, <varname>ID_NET_NAME_SLOT=</varname>).</para>
- <para>Names are derived from various device metadata attributes. Newer versions of udev take more of
- these attributes into account, improving (and thus possibly changing) the names used for the same
- devices. Differents version of the naming rules are called "naming schemes". The default naming scheme is
- chosen at compilation time. Usually this will be the latest implemented version, but it is also possible
- to set one of the older versions to preserve compatibility. This may be useful for example for
- distributions, which may introduce new versions of systemd in stable releases without changing the naming
- scheme. The naming scheme may also be overriden using the <varname>net.naming-scheme=</varname> kernel
- command line switch, see
+ <para>Names and MAC addresses are derived from various stable device metadata attributes. Newer versions
+ of udev take more of these attributes into account, improving (and thus possibly changing) the names and
+ addresses used for the same devices. Different versions of those generation rules are called "naming
+ schemes". The default naming scheme is chosen at compilation time. Usually this will be the latest
+ implemented version, but it is also possible to set one of the older versions to preserve
+ compatibility. This may be useful for example for distributions, which may introduce new versions of
+ systemd in stable releases without changing the naming scheme. The naming scheme may also be overriden
+ using the <varname>net.naming-scheme=</varname> kernel command line switch, see
<citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
Available naming schemes are described below.</para>
<para>After the udev proprties have been generated, appropriate udev rules may be used to actually rename
- devices based on those properties. See the description of <varname>NamePolicy=</varname> in
- <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
- </para>
+ devices based on those properties. See the description of <varname>NamePolicy=</varname> and
+ <varname>MACAddressPolicy=</varname> in
+ <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
</refsect1>
<refsect1>
<varlistentry>
<term><constant>v240</constant></term>
- <para>The <literal>ib</literal> prefix and stable names for infiniband devices are
+ <listitem><para>The <literal>ib</literal> prefix and stable names for infiniband devices are
introduced. Previously those devices were not renamed.</para>
<para>The ACPI index field (used in <varname>ID_NET_NAME_ONBOARD=</varname>) is now also used when
configuration, even if they have been renamed already, if <constant>keep</constant> is not
specified as the naming policy in the <filename noindex='true'>.link</filename> file. See
<citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
- for a description of <varname>NamePolicy=</varname>.</para>
+ for a description of <varname>NamePolicy=</varname>.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><constant>v241</constant></term>
+
+ <listitem><para><option>MACAddressPolicy=persistent</option> was extended to set MAC addresses
+ based on the device name. Previously addresses were only based on the
+ <varname noindex='true'>ID_NET_NAME_*</varname> attributes, which meant that interface names would
+ never be generated for virtual devices. Now a persistent address will be generated for most
+ devices, including in particular bridges.</para>
+
+ <para>Note: when userspace does not set a MAC address for a bridge device, the kernel will
+ initially assign a random address, and then change it when the first device is enslaved to the
+ bridge. With this naming policy change, bridges get a persistent MAC address based on the bridge
+ name instead of the first enslaved device.</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>v243</constant></term>
- <para>Support for netdevsim (simulated networking devices) was added. Previously those devices were
- not renamed.</para>
+ <listitem><para>Support for renaming netdevsim (simulated networking) devices was added. Previously
+ those devices were not renamed.</para>
<para>Previously two-letter interface type prefix was prepended to
- <varname>ID_NET_LABEL_ONBOARD=</varname>. This is not done anymore.</para>
+ <varname>ID_NET_LABEL_ONBOARD=</varname>. This is not done anymore.</para></listitem>
</varlistentry>
-
- <para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this
- particular version of systemd.</para>
</variablelist>
+
+ <para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this
+ particular version of systemd.</para>
</refsect1>
<refsect1>