2020-03-05 10:05:24 +03:00
<?xml version='1.0'?> <!-- * - nxml - * -->
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
2023-12-25 17:48:33 +03:00
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
2020-11-09 07:23:58 +03:00
<!-- SPDX - License - Identifier: LGPL - 2.1 - or - later -->
2020-03-05 10:05:24 +03:00
2023-08-22 19:52:02 +03:00
<refentry id= "systemd-network-generator.service" xmlns:xi= "http://www.w3.org/2001/XInclude" >
2020-03-05 10:05:24 +03:00
<refentryinfo >
<title > systemd-network-generator.service</title>
<productname > systemd</productname>
</refentryinfo>
<refmeta >
<refentrytitle > systemd-network-generator.service</refentrytitle>
<manvolnum > 8</manvolnum>
</refmeta>
<refnamediv >
<refname > systemd-network-generator.service</refname>
<refname > systemd-network-generator</refname>
<refpurpose > Generate network configuration from the kernel command line</refpurpose>
</refnamediv>
<refsynopsisdiv >
<para > <filename > systemd-network-generator.service</filename> </para>
<para > <filename > /usr/lib/systemd/systemd-network-generator</filename> </para>
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para > <filename > systemd-network-generator.service</filename> is a system service that translates
2023-10-30 20:05:42 +03:00
<varname > ip=</varname> and related settings on the kernel command line (see below) into
2020-03-05 10:05:24 +03:00
<citerefentry > <refentrytitle > systemd.network</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > systemd.netdev</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> , and
<citerefentry > <refentrytitle > systemd.link</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
configuration files understood by
<citerefentry > <refentrytitle > systemd-networkd.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry>
and
<citerefentry > <refentrytitle > systemd-udevd.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry> .
</para>
<para > Files are generated in <filename > /run/systemd/network/</filename> .</para>
2022-11-08 13:07:02 +03:00
<para > Note: despite the name, this generator executes as a normal systemd service and is
<emphasis > not</emphasis> an implementation of the
<citerefentry > <refentrytitle > systemd.generator</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry>
concept.</para>
2020-03-05 10:05:24 +03:00
</refsect1>
2022-11-08 13:07:02 +03:00
<refsect1 >
<title > Kernel command line options</title>
<para > This tool understands the following options:</para>
2020-03-05 10:05:24 +03:00
<variablelist class= 'kernel-commandline-options' >
<varlistentry >
<term > <varname > ip=</varname> </term>
2023-11-08 18:29:25 +03:00
<term > <varname > nameserver=</varname> </term>
2020-03-05 10:05:24 +03:00
<term > <varname > rd.route=</varname> </term>
<term > <varname > rd.peerdns=</varname> </term>
<listitem >
2023-10-30 20:05:42 +03:00
<para > Translated into
<citerefentry > <refentrytitle > systemd.network</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
files.</para>
<para > In addition to the parameters <citerefentry
project='man-pages'><refentrytitle > dracut.cmdline</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry>
defines the <varname > ip=</varname> option accepts the special value
<literal > link-local</literal> . If selected, the network interfaces will be configured for
link-local addressing (IPv4LL, IPv6LL) only, DHCP or IPv6RA will not be enabled.</para>
2023-08-22 19:52:36 +03:00
<xi:include href= "version-info.xml" xpointer= "v245" />
2020-03-05 10:05:24 +03:00
</listitem>
</varlistentry>
<varlistentry >
<term > <varname > ifname=</varname> </term>
2021-12-14 05:29:08 +03:00
<term > <varname > net.ifname-policy=</varname> </term>
2020-03-05 10:05:24 +03:00
<listitem >
2023-10-30 20:05:42 +03:00
<para > Translated into
<citerefentry > <refentrytitle > systemd.link</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
files.</para>
2023-09-18 18:03:38 +03:00
<xi:include href= "version-info.xml" xpointer= "v245" />
2020-03-05 10:05:24 +03:00
</listitem>
</varlistentry>
<varlistentry >
<term > <varname > vlan=</varname> </term>
<term > <varname > bond=</varname> </term>
<term > <varname > bridge=</varname> </term>
<term > <varname > bootdev=</varname> </term>
<listitem >
2023-10-30 20:05:42 +03:00
<para > Translated into
<citerefentry > <refentrytitle > systemd.netdev</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
files.</para>
2023-08-22 19:52:36 +03:00
<xi:include href= "version-info.xml" xpointer= "v245" />
2020-03-05 10:05:24 +03:00
</listitem>
</varlistentry>
<!-- unsupported:
team=<teammaster > :<teamslaves >
bootdev=
BOOTIF=
bootdev=
bootdev=
bootdev=
-->
</variablelist>
<para > See
2023-03-21 11:09:24 +03:00
<citerefentry project= 'man-pages' > <refentrytitle > dracut.cmdline</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry>
2021-12-14 05:29:08 +03:00
and
<citerefentry > <refentrytitle > systemd-udevd.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry>
2020-03-05 10:05:24 +03:00
for option syntax and details.</para>
</refsect1>
2024-01-08 13:25:56 +03:00
<refsect1 >
<title > Credentials</title>
<para > <command > systemd-network-generator</command> supports the service credentials logic as implemented
by
<varname > ImportCredential=</varname> /<varname > LoadCredential=</varname> /<varname > SetCredential=</varname>
(see <citerefentry > <refentrytitle > systemd.exec</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> for
details). The following credentials are used when passed in:</para>
<variablelist class= 'system-credentials' >
<varlistentry >
<term > <varname > network.netdev.*</varname> </term>
<term > <varname > network.link.*</varname> </term>
<term > <varname > network.network.*</varname> </term>
<listitem > <para > These credentials should contain valid
<citerefentry > <refentrytitle > systemd.netdev</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > systemd.link</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> ,
<citerefentry > <refentrytitle > systemd.network</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry>
configuration data. From each matching credential a separate file is created. Example: a passed
credential <filename > network.link.50-foobar</filename> will be copied into a configuration file
<filename > 50-foobar.link</filename> .</para>
<para > Note that the resulting files are created world-readable, it's hence recommended to not include
secrets in these credentials, but supply them via separate credentials directly to
<filename > systemd-networkd.service</filename> .</para>
<xi:include href= "version-info.xml" xpointer= "v256" /> </listitem>
</varlistentry>
</variablelist>
<para > Note that by default the <filename > systemd-network-generator.service</filename> unit file is set up
to inherit the these credentials from the service manager.</para>
</refsect1>
2020-03-05 10:05:24 +03:00
<refsect1 >
<title > See Also</title>
2023-12-22 21:09:32 +03:00
<para > <simplelist type= "inline" >
<member > <citerefentry > <refentrytitle > systemd</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemd-networkd.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry> </member>
<member > <citerefentry project= 'man-pages' > <refentrytitle > dracut</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry> </member>
</simplelist> </para>
2020-03-05 10:05:24 +03:00
</refsect1>
</refentry>