New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-networkd failes send IPv6 Router Solicitation after restart #2365

Open
RoadRunnr opened this Issue Jan 19, 2016 · 23 comments

Comments

@RoadRunnr
Copy link

RoadRunnr commented Jan 19, 2016

On a multi homed system, networkd from git HEAD (7a92163) fails to send Router Solicitations after it has been restarted.

From the debug log:

NDisc CLIENT: Error sending Router Solicitation
NDisc CLIENT: Error sending Router Solicitation

Reproduce with:

systemctl stop systemd-networkd
SYSTEMD_LOG_LEVEL=debug ./systemd-networkd

@poettering poettering added the resolve label Jan 26, 2016

@poettering

This comment has been minimized.

Copy link
Member

poettering commented Jan 26, 2016

@teg?

@poettering poettering added network and removed resolve labels Jan 26, 2016

@vindicatorr

This comment has been minimized.

Copy link

vindicatorr commented Feb 12, 2016

+1 on this I think.
I was playing around with IPv6 and was noticing that sometimes I would get it from my ISP and sometimes not.
I found that when I reboot my system, I will get the DHCPv6 (and v4) address assigned, but if I restart systemd-networkd, I am left with only v4 (and v6 link-local).

Using Archlinux systemd 228

EDIT:
Forgot to mention that I follow RoadRunnr's step and am seeing that very same response along with

DHCPv6 CLIENT: Next retransmission in 1s
@vindicatorr

This comment has been minimized.

Copy link

vindicatorr commented Feb 13, 2016

And in 229
I just compiled and installed it, rebooted and:

$ systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2016-02-12 23:45:37 CST; 1min 32s ago
     Docs: man:systemd-networkd.service(8)
 Main PID: 2120 (systemd-network)
   Status: "Processing requests..."
   CGroup: /system.slice/systemd-networkd.service
           └─2120 /usr/lib/systemd/systemd-networkd

Feb 12 23:46:40 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:46:43 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:46:47 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:46:50 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:46:53 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:46:56 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:46:59 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:47:03 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:47:06 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
Feb 12 23:47:09 computer systemd-networkd[2120]: br0: Starting DHCPv6 client on NDisc request failed: Invalid argument
$ systemctl --version
systemd 229
+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN
$ cat /etc/systemd/network/40-bridge.netdev 
[NetDev]
Description="Bridge Network Device"
Name=br0
Kind=bridge
$ cat /etc/systemd/network/45-bridge.network 
[Match]
Name=br0
[Network]
Description="br0 - Bridge Network"
Address=192.168.1.1/24

I'll build and install tag v227 and see what happens.

@cvmiller

This comment has been minimized.

Copy link

cvmiller commented Apr 4, 2016

+1 on this. I think this may be the root cause of #2912. If no Router Solicitation is sent out upon link up, then no RA will be sent, and IPv6 will remain unconfigured until the next RA is received.

@poettering poettering added the bug 🐛 label Apr 18, 2016

@ssahani

This comment has been minimized.

Copy link
Contributor

ssahani commented May 12, 2016

@RoadRunnr Can you still reproduce this issue with current code?

@cvmiller

This comment has been minimized.

Copy link

cvmiller commented May 12, 2016

I am traveling, and won't be able to retest until after 23 May. I will retest after I return. Thanks for looking into this.

@cvmiller

This comment has been minimized.

Copy link

cvmiller commented Nov 5, 2016

Sending of RS after link up appears fixed in version 231. See issue #2912

@vindicatorr

This comment has been minimized.

Copy link

vindicatorr commented Nov 6, 2016

I don't know why it worked for you, but it still doesn't for me.

$ pacman -Ss systemd
...
core/systemd 231-4 [installed]
...
$ ip addr show eth0
inet <sanitized external ipv4 address>
inet6 <sanitized external ipv6 address>
inet6 <sanitized local ipv6 address>
$ sudo ip link set eth0 down
$ sudo ip link set eth0 up
$ ip addr show eth0
inet <sanitized external ipv4 address>
inet6 <sanitized local ipv6 address>

reboot

$ ip addr show eth0
inet <sanitized external ipv4 address>
inet6 <sanitized external ipv6 address>
inet6 <sanitized local ipv6 address>
$ sudo systemctl stop systemd-networkd
$ sudo SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-networkd
br0 stuff
wlan0 stuff
eth1 stuff
eth0 stuff
lo stuff
//now the important stuff
DHCPv6 CLIENT: Started in Information request mode
eth0: Acquiring DHCPv6 lease
eth0: Discovering IPv6 routers
NDISC: Started IPv6 Router Solicitation client
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=19 reply_cookie=0 error=n/a
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=20 reply_cookie=0 error=n/a
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=21 reply_cookie=0 error=n/a
NDISC: Error sending Router Solicitation: Network is unreachable
NDISC: Stopping IPv6 Router Solicitation client
DHCP CLIENT (<sanitized hex?>): DISCOVER
DHCPv6 CLIENT: Next retransmission in 1s
DHCPv6 CLIENT: Next retransmission in ...<repeating>
@cvmiller

This comment has been minimized.

Copy link

cvmiller commented Nov 6, 2016

I stand corrected. When I was testing, I saw the GUAs return to the interface and I could ping. However, I have now run tcpdump while bouncing the link, and I see no RS being sent by the host upon link up. And if I run multiple times, there are times when the GUAs are not on the interface, and ping is unsuccessful.

What I was seeing was the RA just happened to come in after link up. No RS is being sent upon link up. This is still an issue. Thanks vindicatorr for catching this.

@ssahani

This comment has been minimized.

Copy link
Contributor

ssahani commented Jan 11, 2017

@cvmiller I can reproduce this

And if I run multiple times, there are times when the GUAs are not on the interface, and ping is unsuccessful'

sudo ip link set dev enp0s8 down

np0s8: Flags change: -UP -LOWER_UP -RUNNING
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=63 reply_cookie=0 error=n/a
LLDP: Stopping LLDP client
enp0s8: Stopped LLDP.
enp0s8: Lost carrier
DHCP CLIENT (0x53d57973): STOPPED
enp0s8: DHCP lease lost
NDISC: Stopping IPv6 Router Solicitation client
enp0s8: State is configured, dropping config
enp0s8: Removing address: 2001:db8:1:0:a00:27ff:fe40:aadb/64 (valid for 23h 59min 45s)
enp0s8: Removing address: fe80::a00:27ff:fe40:aadb/64 (valid forever)
enp0s8: Removing address: 10.65.193.46/23 (valid for 23h 57min 43s)

sudo ip link set dev enp0s8 up

enp0s8: Flags change: +UP +LOWER_UP +RUNNING
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=64 reply_cookie=0 error=n/a
LLDP: Started LLDP client
enp0s8: Started LLDP.
enp0s8: Gained carrier
enp0s8: Acquiring DHCPv4 lease
DHCP CLIENT (0x2854759a): STARTED on ifindex 3
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=65 reply_cookie=0 error=n/a
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=66 reply_cookie=0 error=n/a
DHCP CLIENT (0x2854759a): REQUEST (init-reboot)
DHCP CLIENT (0x2854759a): ACK
DHCP CLIENT (0x2854759a): lease expires in 23h 59min 57s
DHCP CLIENT (0x2854759a): T2 expires in 20h 59min 57s
DHCP CLIENT (0x2854759a): T1 expires in 11h 59min 59s
enp0s8: DHCPv4 address 10.65.193.46/23 via 10.65.193.254
enp0s8: Updating address: 10.65.193.46/23 (valid for 1d)
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=67 reply_cookie=0 error=n/a
enp0s8: Adding address: fe80::a00:27ff:fe40:aadb/64 (valid forever)
enp0s8: Gained IPv6LL
enp0s8: Configured
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=68 reply_cookie=0 error=n/a
enp0s8: Discovering IPv6 routers
NDISC: Started IPv6 Router Solicitation client
NDISC: Invoking callback for 't'.

***Delay is here  ***

NDISC: Received Router Advertisement: flags none preference medium lifetime 120 sec
NDISC: Invoking callback for 'r'.
NDISC: Received Router Advertisement: flags none preference medium lifetime 120 sec
NDISC: Invoking callback for 'r'.
enp0s3: Updating address: 2001:db8:1:0:a00:27ff:fe42:66ed/64 (valid for 1d)
enp0s8: Updating address: 2001:db8:1:0:a00:27ff:fe40:aadb/64 (valid for 23h 59min 58s)

I guess the delay is because of the the RA is received after a certain time.
NDISC: Received Router Advertisement and your ping goes unsuccessful.

@martyg77

This comment has been minimized.

Copy link

martyg77 commented Jul 16, 2017

+1 here on Arch running 233.75
Easily duplicated on laptop with IPv6 over WiFi, toggle keyboard WiFi key to turn link on/off.
Here is a debug log from systemd-networkd showing coming out of suspend.
Note 5 minutes elapsed between IPv4 and IPv6 addresses being assigned.

log.txt

@mvduin

This comment has been minimized.

Copy link
Contributor

mvduin commented Oct 6, 2017

I'm still seeing this in systemd 234:

eth0: Gained carrier
eth0: Acquiring DHCPv4 lease
Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.31.27.
DHCP CLIENT (0x8c206b4c): STARTED on ifindex 2
New relevant interface eth0.IPv4 for mDNS.
eth0: Discovering IPv6 routers
Registering new address record for 10.0.31.27 on eth0.IPv4.
NDISC: Started IPv6 Router Solicitation client
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=28 reply_cookie=0 error=n/a
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=29 reply_cookie=0 error=n/a
Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/network1 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=30 reply_cookie=0 error=n/a
NDISC: Error sending Router Solicitation: Network is unreachable
NDISC: Stopping IPv6 Router Solicitation client

This is really annoying, especially since I've also seen this state get triggered by a change in network connectivity and I haven't found any way to recover from this state other than rebooting.

@ssahani

This comment has been minimized.

Copy link
Contributor

ssahani commented Oct 6, 2017

@mvduin this is another issue please open a new Issue for this . I think you intended that ndisc client should not stop and keep on trying. This means sendmsg fails . does ping works ? Is there some conf error please elaborate.

@mvduin

This comment has been minimized.

Copy link
Contributor

mvduin commented Oct 6, 2017

Uhh, why should I open a new issue when this one is still open and appears to be identical to the one I experienced?

After reboot SLAAC works fine:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 6c:ec:eb:b9:e2:10 brd ff:ff:ff:ff:ff:ff
    inet 10.0.31.47/24 brd 10.0.31.255 scope global dynamic eth0
       valid_lft 863960sec preferred_lft 863960sec
    inet6 2001:981:5f7c:1:6eec:ebff:feb9:e210/64 scope global mngtmpaddr noprefixroute dynamic 
       valid_lft 7160sec preferred_lft 3560sec
    inet6 fe80::6eec:ebff:feb9:e210/64 scope link 
       valid_lft forever preferred_lft forever

then, after doing systemctl restart systemd-networkd, SLAAC fails:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 6c:ec:eb:b9:e2:10 brd ff:ff:ff:ff:ff:ff
    inet 10.0.31.47/24 brd 10.0.31.255 scope global dynamic eth0
       valid_lft 863991sec preferred_lft 863991sec
    inet6 fe80::6eec:ebff:feb9:e210/64 scope link 
       valid_lft forever preferred_lft forever

Running networkd with debug output reveals the error shown in my previous post, indicating that networkd was unable to send an RS.

My config:

[Match]
Name=eth0

[Network]
DHCP=ipv4
IPv6PrivacyExtensions=no
IPv6DuplicateAddressDetection=0
LLMNR=on

[DHCP]
UseDomains=yes
@WGH-

This comment has been minimized.

Copy link

WGH- commented May 21, 2018

Having this on systemd 238 on Gentoo. For some weird reason, at this moment, this occurs only with wired connection, and it works fine with the wireless one.

I've compared straces, but couldn't figure out the problem.

Wired connection:

socket(AF_INET6, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_ICMPV6) = 19
setsockopt(19, SOL_ICMPV6, 1, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\277\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", 32) = 0
setsockopt(19, SOL_IPV6, IPV6_ADD_MEMBERSHIP, {inet_pton(AF_INET6, "ff02::1", &ipv6mr_multiaddr), ipv6mr_interface=if_nametoindex("enp0s25")}, 20) = 0
setsockopt(19, SOL_IPV6, IPV6_MULTICAST_IF, [2], 4) = 0
setsockopt(19, SOL_IPV6, IPV6_MULTICAST_LOOP, [0], 4) = 0
setsockopt(19, SOL_IPV6, IPV6_MULTICAST_HOPS, [255], 4) = 0
setsockopt(19, SOL_IPV6, IPV6_UNICAST_HOPS, [255], 4) = 0
setsockopt(19, SOL_IPV6, IPV6_RECVHOPLIMIT, [1], 4) = 0
setsockopt(19, SOL_SOCKET, SO_TIMESTAMP, [1], 4) = 0
setsockopt(19, SOL_SOCKET, SO_BINDTODEVICE, "enp0s25", 7) = 0

sendmsg(19, {msg_name={sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "ff02::2", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, msg_namelen=28, msg_iov=[{iov_base="\205\0\0\0\0\0\0\0\1\1(\322Dm\365\243", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = -1 ENETUNREACH (Network is unreachable)

Wireless connection:

socket(AF_INET6, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_ICMPV6) = 21
setsockopt(21, SOL_ICMPV6, 1, "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\277\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", 32) = 0
setsockopt(21, SOL_IPV6, IPV6_ADD_MEMBERSHIP, {inet_pton(AF_INET6, "ff02::1", &ipv6mr_multiaddr), ipv6mr_interface=if_nametoindex("wlp3s0")}, 20) = 0
setsockopt(21, SOL_IPV6, IPV6_MULTICAST_IF, [4], 4) = 0
setsockopt(21, SOL_IPV6, IPV6_MULTICAST_LOOP, [0], 4) = 0
setsockopt(21, SOL_IPV6, IPV6_MULTICAST_HOPS, [255], 4) = 0
setsockopt(21, SOL_IPV6, IPV6_UNICAST_HOPS, [255], 4) = 0
setsockopt(21, SOL_IPV6, IPV6_RECVHOPLIMIT, [1], 4) = 0
setsockopt(21, SOL_SOCKET, SO_TIMESTAMP, [1], 4) = 0
setsockopt(21, SOL_SOCKET, SO_BINDTODEVICE, "wlp3s0", 6) = 0

sendmsg(21, {msg_name={sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "ff02::2", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, msg_namelen=28, msg_iov=[{iov_base="\205\0\0\0\0\0\0\0\1\1|z\221u\230~", iov_len=16}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 16
@WGH-

This comment has been minimized.

Copy link

WGH- commented May 21, 2018

Interesting, I can also reproduce this with plain ping:

$ ping ff02::2%wlp3s0 
PING ff02::2%wlp3s0(ff02::2%wlp3s0) 56 data bytes
64 bytes from fe80::YYYY:YYYY:YYYY:YYYY%wlp3s0: icmp_seq=1 ttl=64 time=20.8 ms
^C

$ ping ff02::2%enp0s25
connect: Network is unreachable

$  ip -6 route
2a02:XXXX:XXXX:XXXX::/64 dev wlp3s0 proto ra metric 2048 pref medium
fe80::/64 dev enp0s25 proto kernel metric 256 pref medium
fe80::/64 dev wlp3s0 proto kernel metric 256 pref medium
ff00::/8 dev wlp3s0 metric 256 pref medium
default via fe80::YYYY:YYYY:YYYY:YYYY dev wlp3s0 proto ra metric 2048 pref medium
@WGH-

This comment has been minimized.

Copy link

WGH- commented May 24, 2018

If you add ff00::/8 route manually (sudo ip route add ff00::/8 dev enp0s25), multicast pings will work again. However, each time systemd-networkd restarts, the route disappears for some reason...

From what I've figured out it's the kernel that is responsible for both generating link-local address and adding "default multicast route". Why it doesn't do so with my wired ethernet interface is still beyond me.

@WGH-

This comment has been minimized.

Copy link

WGH- commented May 24, 2018

Sorry for all this noise, this is my last message :)

In my case (works after reboot, but "network is unreachable" after cable is (re-)plugged in), I finally solved it by adding some kernel options that I had disabled. ff00::/8 is finally added automatically in all cases (it is in ip -6 route show table all, not just ip -6 route, though) I don't know which of these are actually responsible for fixing the problem (but I bet it's the options about multiple tables), but here's the diff for reference:

diff --git a/config_before b/usr/src/linux/.config
index 76684ec..734fb92 100644
--- a/config_before
+++ b/usr/src/linux/.config
@@ -871,6 +871,7 @@ CONFIG_XFRM_USER=y
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
 # CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -885,7 +886,7 @@ CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 CONFIG_NET_IPIP=m
 CONFIG_NET_IPGRE_DEMUX=y
-CONFIG_NET_IP_TUNNEL=y
+CONFIG_NET_IP_TUNNEL=m
 CONFIG_NET_IPGRE=m
 CONFIG_NET_IPGRE_BROADCAST=y
 CONFIG_IP_MROUTE=y
@@ -900,7 +901,7 @@ CONFIG_NET_UDP_TUNNEL=m
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
-CONFIG_INET_TUNNEL=y
+CONFIG_INET_TUNNEL=m
 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
 # CONFIG_INET_XFRM_MODE_BEET is not set
@@ -931,32 +932,34 @@ CONFIG_DEFAULT_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_TCP_MD5SIG=y
 CONFIG_IPV6=y
-# CONFIG_IPV6_ROUTER_PREF is not set
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_IPV6_ROUTE_INFO=y
 # CONFIG_IPV6_OPTIMISTIC_DAD is not set
-CONFIG_INET6_AH=y
-CONFIG_INET6_ESP=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
 # CONFIG_INET6_ESP_OFFLOAD is not set
-# CONFIG_INET6_IPCOMP is not set
-# CONFIG_IPV6_MIP6 is not set
-# CONFIG_IPV6_ILA is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
-CONFIG_INET6_XFRM_MODE_TRANSPORT=y
-CONFIG_INET6_XFRM_MODE_TUNNEL=y
-CONFIG_INET6_XFRM_MODE_BEET=y
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=m
+CONFIG_IPV6_ILA=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
 # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
-# CONFIG_IPV6_VTI is not set
-CONFIG_IPV6_SIT=y
-# CONFIG_IPV6_SIT_6RD is not set
+CONFIG_IPV6_VTI=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_SIT_6RD=y
 CONFIG_IPV6_NDISC_NODETYPE=y
-# CONFIG_IPV6_TUNNEL is not set
-# CONFIG_IPV6_GRE is not set
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_GRE=m
 # CONFIG_IPV6_FOU is not set
 # CONFIG_IPV6_FOU_TUNNEL is not set
-# CONFIG_IPV6_MULTIPLE_TABLES is not set
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
 CONFIG_IPV6_MROUTE=y
-# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set
-# CONFIG_IPV6_PIMSM_V2 is not set
+CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
+CONFIG_IPV6_PIMSM_V2=y
 # CONFIG_IPV6_SEG6_LWTUNNEL is not set
 # CONFIG_IPV6_SEG6_HMAC is not set
 # CONFIG_NETLABEL is not set
@@ -1490,7 +1493,8 @@ CONFIG_RFKILL_INPUT=y
 # CONFIG_NFC is not set
 CONFIG_PSAMPLE=m
 # CONFIG_NET_IFE is not set
-# CONFIG_LWTUNNEL is not set
+CONFIG_LWTUNNEL=y
+CONFIG_LWTUNNEL_BPF=y
 CONFIG_DST_CACHE=y
 CONFIG_GRO_CELLS=y
 # CONFIG_NET_DEVLINK is not set
@@ -1796,6 +1800,7 @@ CONFIG_TAP=m
 # CONFIG_TUN_VNET_CROSS_LE is not set
 CONFIG_VETH=y
 CONFIG_NLMON=y
+# CONFIG_NET_VRF is not set
 # CONFIG_ARCNET is not set
 
 #
@@ -5001,7 +5006,7 @@ CONFIG_CRYPTO_DES=y
 #
 # Compression
 #
-# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_LZO is not set
 # CONFIG_CRYPTO_842 is not set
 # CONFIG_CRYPTO_LZ4 is not set
@delacroix0815

This comment has been minimized.

Copy link

delacroix0815 commented May 27, 2018

I had almost the same problem, systemd-networkd lost its ipv6 addresses after a resume from suspend. I can confirm that after recompiling the kernel with WGH's options mentioned above, systemd-networkd successfully starts the IPv6 Router Solicitation client and obtains an ipv6 address after resuming from suspend.

@eugene-bright

This comment has been minimized.

Copy link

eugene-bright commented Jul 7, 2018

I were slowly enabling kernel options to watch their effect.
The last two options which changed behaviour were:

CONFIG_IPV6_MULTIPLE_TABLES
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES

Does someone know if systemd-networkd processes RA packets by itself or that's entirely kernel work?
What behaviour is expected? Is it actually a kernel bug?

@wonderfly

This comment has been minimized.

Copy link
Contributor

wonderfly commented Nov 2, 2018

Can we get some attention here? I am hitting the almost same issue: on a reboot I am able to get an IPV6 address (from my router) but if I do systemctl restart systemd-networkd I immediately lose it along with the two routes that were present before the restart:

ff00::/8 dev eth0 metric 256  pref medium
default via fe80::<mac-address-here> dev eth0 proto ra metric 1024  pref medium

Without the first route, I can't even do ping6 -I eth0 ff02::2 which gives me connect: Network is unreachable.

All of these can be fixed by a reboot. But then if I restart systemd-networkd again the problem recurs.

I am on systemd-232. Haven't checked the latest head yet but am not too optimistic since @WGH- hit it on 238. Will try enabling the kernel configs @eugene-bright mentioned above and see if they fix the problem.

@wonderfly

This comment has been minimized.

Copy link
Contributor

wonderfly commented Nov 2, 2018

On systemd-232, CONFIG_IPV6_MULTIPLE_TABLES=y alone fixed the problem: I can restart systemd-networkd countless times and my IPV6 address sticks.

@DRiKE

This comment has been minimized.

Copy link

DRiKE commented Feb 7, 2019

On systemd-232, CONFIG_IPV6_MULTIPLE_TABLES=y alone fixed the problem: I can restart systemd-networkd countless times and my IPV6 address sticks.

@wonderfly, thank you: this has fixed the problem for me on two different machines. Originally, I noticed my laptop did not get an IPv6 address after resuming from suspend. Restarting systemd-networkd gave the exact same problem. CONFIG_IPV6_MULTIPLE_TABLES fixes all of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment