Skip to content

Commit

Permalink
man: mention that DefaultRouteOnDevice= create the IPv4 default route
Browse files Browse the repository at this point in the history
And add an example setting for creating an IPv6 default route.

Closes systemd#25440.
  • Loading branch information
yuwata authored and keszybz committed Dec 8, 2022
1 parent 2e83783 commit 15f330c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion man/systemd.network.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@
<varlistentry>
<term><varname>DefaultRouteOnDevice=</varname></term>
<listitem>
<para>Takes a boolean. If set to true, sets up the default route bound to the interface.
<para>Takes a boolean. If set to true, sets up the IPv4 default route bound to the interface.
Defaults to false. This is useful when creating routes on point-to-point interfaces. This is
equivalent to e.g. the following,
<programlisting>ip route add default dev veth99</programlisting>
Expand All @@ -433,6 +433,11 @@ Gateway=0.0.0.0</programlisting></para>
following instead:
<programlisting>[Route]
Gateway=0.0.0.0
Table=1234</programlisting></para>
<para>If you'd like to create an IPv6 default route bound to the interface, please use the
following:
<programlisting>[Route]
Gateway=::
Table=1234</programlisting></para>
</listitem>
</varlistentry>
Expand Down

0 comments on commit 15f330c

Please sign in to comment.