Proxmox DHCP IPv6 problem with networking service - No DHCPv6 client software found

Proxmox DHCP v6 problem

Recently, I set up a home-server, with Proxmox. I have a LXC container with a LAMP server for some website. And Nginx Proxy Manager takes care of linking the website to a subdomain. This all works good.

But, there was a problem…

Sometimes, after hours/days, the “lamp” hostname did not work any more, and consequently the website subdomain was not reachable. Thus https://lamp:38080/ does not work, while https://10.0.0.10:38080/ does.

This made me think that there was a problem with the hostname. In an attempt to solve this, I added this line to the /etc/hosts file:

10.0.0.10 lamp.fritz.box lamp

Also, I had to install the package dbus, so that the following works:

root@lamp ~# apt-get install dbus
root@lamp ~# hostnamectl set-hostname lamp
root@lamp ~# hostnamectl
    Static hostname: lamp
    ...
    Virtualization: lxc
    Operating System: Debian GNU/Linux 11 (bullseye)
    Kernel: Linux 6.2.16-19-pve
    Architecture: x86-64
root@lamp ~# 

The above did not resolve the problem - I only figured out days later that the networking.service did fail, when I was checking the services for failures:

root@lamp ~# systemctl list-units --state=failed
  UNIT                          LOAD   ACTIVE SUB    DESCRIPTION
* sys-kernel-config.mount       loaded failed failed Kernel Configuration File System
* sys-kernel-debug.mount        loaded failed failed Kernel Debug File System        
* **networking.service**            loaded failed failed Raise network interfaces        
* systemd-journald-audit.socket loaded failed failed Journal Audit Socket

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
4 loaded units listed.
root@lamp ~# 

There was a warning that the file resolv.cof is not correctly linked. I attempted to solve this, but it did not help:

root@lamp ~# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Then I figured out that the problem was IPv6 related:

root@lamp ~# service networking restart
Job for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.

root@lamp ~# service networking status 
* networking.service - Raise network interfaces
    Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2023-12-31 11:06:35 CET; 13s ago
    Docs: man:interfaces(5)
    Process: 3148 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Main PID: 3148 (code=exited, status=1/FAILURE)
        CPU: 192ms

Dec 31 11:06:33 lamp ifup[3167]: udhcpc: lease of 10.0.3.69 obtained, lease time 864000
Dec 31 11:06:33 lamp ifup[3181]: /etc/udhcpc/default.script: Resetting default routes
Dec 31 11:06:33 lamp ifup[3184]: SIOCDELRT: No such process
Dec 31 11:06:33 lamp ifup[3181]: /etc/udhcpc/default.script: Adding DNS 10.0.3.1
Dec 31 11:06:33 lamp ifup[3194]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/r>
Dec 31 11:06:35 lamp ifup[3292]: **No DHCPv6 client software found!**
Dec 31 11:06:35 lamp ifup[3148]: ifup: failed to bring up eth0
Dec 31 11:06:35 lamp systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 31 11:06:35 lamp systemd[1]: networking.service: Failed with result 'exit-code'.
Dec 31 11:06:35 lamp systemd[1]: Failed to start Raise network interfaces.
root@lamp ~# 

My internet provider supports IPv6, and I have it switched on in the fritz.box router. The following commands were used to investigate:

ip addr
service networking restart
journalctl -xe
ping6 ipv6.google.com

Finally, I figured out that the DHCPv6 does not work!

And there is a very simple solution for it since this is a setting in the Proxmox user interface for the container. To set it, go to “Network”, then select the one shown and “Edit”:

Proxmox network configuration

For IPv4, DHCP is fine (since I use fixed leases set in the fritz.box), but for IPv6 we need to choose SLAAC (or Static), and NOT DHCP! Restart the container (or simply the service), and the networking service succeeds.

Conclusion:

  • The problem is located in the IPv6 DHCP system: apparently, the DHCPv6 communication between the container and the router (fritz.box) does not work. Either the router DHCPv6 server does not work, or Debian does not succeed to communicate with it.
  • The networking.service runs fine if the container setting is NOT on DHCPv6.
  • The ping6 command works fine from the containers and virtual machines.
  • The ping6 command doen NOT work in the Proxmox VE shell, which does not seem to be a problem for the containers/virtual machines:

    root@pve:~# ping6 ipv6.google.com ping6: connect: Network is unreachable