]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: extend the DHCPv6-PD example and add a DHCPv4-6RD example
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 20:25:47 +0000 (05:25 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jan 2022 03:04:02 +0000 (12:04 +0900)
man/systemd.network.xml

index 4f413946828827bb0a8e26a235f4015886b61acf..44be11de1966c35199e6294cb8e9cfcf7e3ccd8a 100644 (file)
@@ -4410,22 +4410,48 @@ DHCP=yes</programlisting>
     </example>
 
     <example>
-      <title>IPv6 Prefix Delegation</title>
+      <title>IPv6 Prefix Delegation (DHCPv6 PD)</title>
 
-      <programlisting># /etc/systemd/network/55-ipv6-pd-upstream.network
+      <programlisting># /etc/systemd/network/55-dhcpv6-pd-upstream.network
 [Match]
 Name=enp1s0
 
 [Network]
-DHCP=ipv6</programlisting>
+DHCP=ipv6
+
+# The below setting is optional, to also assign an address in the delegated prefix
+# to the upstream interface. If not necessary, then comment out the line below and
+# the [DHCPPrefixDelegation] section.
+DHCPPrefixDelegation=yes
+
+# If the upstream network provides Router Advertisement with Managed bit set,
+# then comment out the line below and WithoutRA= setting in the [DHCPv6] section.
+IPv6AcceptRA=no
+
+[DHCPv6]
+WithoutRA=solicit
 
-      <programlisting># /etc/systemd/network/56-ipv6-pd-downstream.network
+[DHCPPrefixDelegation]
+UplinkInterface=:self
+SubnetId=0
+Announce=no</programlisting>
+
+      <programlisting># /etc/systemd/network/55-dhcpv6-pd-downstream.network
 [Match]
 Name=enp2s0
 
 [Network]
+DHCPPrefixDelegation=yes
 IPv6SendRA=yes
-DHCPPrefixDelegation=yes</programlisting>
+
+# It is expected that the host is acting as a router. So, usually it is not
+# necessary to receive Router Advertisement from other hosts in the downstream network.
+IPv6AcceptRA=no
+
+[DHCPPrefixDelegation]
+UplinkInterface=enp1s0
+SubnetId=1
+Announce=yes</programlisting>
 
       <para>This will enable DHCPv6-PD on the interface enp1s0 as an upstream interface where the
       DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.
@@ -4433,6 +4459,46 @@ DHCPPrefixDelegation=yes</programlisting>
       </para>
     </example>
 
+    <example>
+      <title>IPv6 Prefix Delegation (DHCPv4 6RD)</title>
+
+      <programlisting># /etc/systemd/network/55-dhcpv4-6rd-upstream.network
+[Match]
+Name=enp1s0
+
+[Network]
+DHCP=ipv4
+
+# When DHCPv4-6RD is used, the upstream network does not support IPv6.
+# Hence, it is not necessary to wait for Router Advertisement, which is enabled by default.
+IPv6AcceptRA=no
+
+[DHCPv4]
+Use6RD=yes</programlisting>
+
+      <programlisting># /etc/systemd/network/55-dhcpv4-6rd-downstream.network
+[Match]
+Name=enp2s0
+
+[Network]
+DHCPPrefixDelegation=yes
+IPv6SendRA=yes
+
+# It is expected that the host is acting as a router. So, usually it is not
+# necessary to receive Router Advertisement from other hosts in the downstream network.
+IPv6AcceptRA=no
+
+[DHCPPrefixDelegation]
+UplinkInterface=enp1s0
+SubnetId=1
+Announce=yes</programlisting>
+
+      <para>This will enable DHCPv4-6RD on the interface enp1s0 as an upstream interface where the
+      DHCPv4 client is running and enp2s0 as a downstream interface where the prefix is delegated to.
+      The delegated prefixes are distributed by IPv6 Router Advertisement on the downstream network.
+      </para>
+    </example>
+
     <example>
       <title>A bridge with two enslaved links</title>