[systemd-devel] [systemd-networkd] Can use IPv6SendRA and IPv6AcceptRA in a same .network file

jackyzy823 jackyzy823 at gmail.com
Sun Dec 12 03:16:41 UTC 2021


Dear developers.

I have a question about if i can use IPv6SendRA and IPv6AcceptRA in a same
.network file.

Here's the situation. My VPS provider offers an IPv6 /64 prefix for my
machine.

I can achieve SLAAC via radvd + systemd-networkd using following config.


/etc/radvd.conf
```
interface eth0
{
        AdvSendAdvert on;
        MinRtrAdvInterval 30;
        MaxRtrAdvInterval 100;
        prefix <prefix>::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr off;
        };
        RDNSS <DNS1> <DNS2>
        {
        };
};

```

/etc/systemd/network/eth0.network
```
[Match]
Name=eth0

[Network]
IPv6AcceptRA=yes
Gateway=fe80::1

...other ipv4 config

```


However, i found that systemd-networkd have IPv6SendRA options, so i tried
to do all things in systemd-networkd , but it failed to get an IPv6 address.

here's my config
/etc/systemd/network/eth0.network
```
[Match]
Name=eth0

[Network]
IPv6AcceptRA=yes
IPv6SendRA=yes
Gateway=fe80::1


[IPv6SendRA]
DNS=<DNS1>
DNSLifetimeSec=100

[IPv6PRefix]
Prefix=<prefix>

```

I also tried adding RouterLifetimeSec=0 to [IPv6SendRA] section but it
still failed to get an IPv6 address.

I did a tcpdump : `tcpdump -vvvv -n -i any icmp6`. and i can see `router
solicitation` and `router advertisement` messages.

So is my configuration wrong ,or does systemd-networkd  support this kind
of operation ?

Systemd version
`
systemctl --version
systemd 249 (249.7-2-arch)
+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS
+OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD
+LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4
+XZ +ZLIB +ZSTD +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified
`

Thanks.

Best regards,
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20211212/a33a0de0/attachment.htm>


More information about the systemd-devel mailing list