You are not logged in.

#1 2019-11-02 07:58:52

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,485

systemd-networkd with ipv6

I am trying to understand how we can configure systemd-network to work with ipv6. According to the ipv6 wiki the kernel SLAAC replaces a DHCP client (if I understood it well). Could someone gives a simple working example on how to configure it with systemd-networkd? Somewhat the ipv6 equivalent of:

[Match]
Name=enp0s3

[Network]
DHCP=yes

but with SLAAC instead of a dhcp client? The ipv6 wiki also mentions a Stable private addresses feature, how to have it with systemd-networkd? The wiki only mentions how to configure the kernel but not how to interface it with systemd-networkd. Is the last one needed at all or does the kernel could handle the whole thing? The only examples in the systemd-networkd wiki are for ipv4.

Last edited by olive (2019-11-02 07:59:12)

Offline

#2 2019-11-02 08:45:20

progandy
Member
Registered: 2012-05-17
Posts: 3,580

Re: systemd-networkd with ipv6

man 5 systemd.network wrote:

       DHCP=
           Enables DHCPv4 and/or DHCPv6 client support. Accepts "yes",
           "no", "ipv4", or "ipv6". Defaults to "no".

           Note that DHCPv6 will by default be triggered by Router
           Advertisement, if that is enabled, regardless of this
           parameter. By enabling DHCPv6 support explicitly, the
           DHCPv6 client will be started regardless of the presence of
           routers on the link, or what flags the routers pass. See
           "IPv6AcceptRA=".

Set it to no or ipv4 and SLACC should just work I think.

For stable private addresses: https://unix.stackexchange.com/question … d-networkd

Last edited by progandy (2019-11-02 08:50:50)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2019-11-02 08:50:57

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,485

Re: systemd-networkd with ipv6

@progandy. Thanks but from what I have understood, SLAAC is managed by the kernel, no client should be necessary. it seems that the configuration you suggest will launch a DHCP client which should be superfluous for ipv6. The stable private addresses should also be managed by the kernel. The wiki is somewhat confusing, I wonder if systemd-netword is needed at all or could the kernel do it by itself?

Last edited by olive (2019-11-02 08:53:01)

Offline

#4 2019-11-02 09:01:56

progandy
Member
Registered: 2012-05-17
Posts: 3,580

Re: systemd-networkd with ipv6

I suggested "no" or "ipv4". "ipv4" is required if your network uses both IP versions.

Maybe you also have to set IPv6AcceptRA=yes, but I don't use networkd.

Last edited by progandy (2019-11-02 09:03:33)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB