at 23.05-pre 1.7 kB view raw
1<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-ipv6"> 2 <title>IPv6 Configuration</title> 3 <para> 4 IPv6 is enabled by default. Stateless address autoconfiguration is 5 used to automatically assign IPv6 addresses to all interfaces, and 6 Privacy Extensions (RFC 4946) are enabled by default. You can adjust 7 the default for this by setting 8 <xref linkend="opt-networking.tempAddresses" />. This option may be 9 overridden on a per-interface basis by 10 <xref linkend="opt-networking.interfaces._name_.tempAddress" />. You 11 can disable IPv6 support globally by setting: 12 </para> 13 <programlisting language="bash"> 14networking.enableIPv6 = false; 15</programlisting> 16 <para> 17 You can disable IPv6 on a single interface using a normal sysctl (in 18 this example, we use interface <literal>eth0</literal>): 19 </para> 20 <programlisting language="bash"> 21boot.kernel.sysctl.&quot;net.ipv6.conf.eth0.disable_ipv6&quot; = true; 22</programlisting> 23 <para> 24 As with IPv4 networking interfaces are automatically configured via 25 DHCPv6. You can configure an interface manually: 26 </para> 27 <programlisting language="bash"> 28networking.interfaces.eth0.ipv6.addresses = [ { 29 address = &quot;fe00:aa:bb:cc::2&quot;; 30 prefixLength = 64; 31} ]; 32</programlisting> 33 <para> 34 For configuring a gateway, optionally with explicitly specified 35 interface: 36 </para> 37 <programlisting language="bash"> 38networking.defaultGateway6 = { 39 address = &quot;fe00::1&quot;; 40 interface = &quot;enp0s3&quot;; 41}; 42</programlisting> 43 <para> 44 See <xref linkend="sec-ipv4" /> for similar examples and additional 45 information. 46 </para> 47</section>