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