Looks like Proxmox 8 is generating new IPv6 DUID for every reboot

Jul 10, 2021
54
9
13
44
www.saudiqbal.com
It took me a while to find out why proxmox fails to boot after each reboot because proxmox is generating a new DUID for ipv6 each time it boots, no such problem with Proxmox 7. The problem is that the router refuses to give a new IPv6 to a mac address stored in a static lease for proxmox and proxmox gets stuck after booting waiting for an IPv6 address. Every time I boot there is a new default-duid in /var/lib/dhcp/dhclient6.vmbr0.leases file. Hopefully someone can figure out why there is no stable DUID used in Proxmox 8.

Code:
auto lo
iface lo inet loopback

iface xxxxxxx inet manual

auto vmbr0
allow-hotplug vmbr0
iface vmbr0 inet dhcp
    hwaddress ether xx:xx:xx:xx:xx:xx
    gateway xxxxxxx
    bridge-ports xxx
    bridge-stp off
    bridge-fd 0


iface vmbr0 inet6 dhcp
    gateway xxxxxxx

I fixed it by adding the following code to /etc/dhcp/dhclient.conf
Code:
interface "vmbr0" {
    send dhcp6.client-id x:x:x:x:x:x:x:x:x:x;
}
Get the client id from your /var/lib/dhcp/dhclient6.vmbr0.leases file
option dhcp6.client-id

Finally don't forget to add net.ipv6.conf.vmbr0.accept_ra=2 to your /etc/sysctl.conf file and reboot ProxMox.
 
Last edited:
Hopefully someone can figure out why there is no stable DUID used in Proxmox 8.
maybe the new ifupdown2 version have some change about dhcp6 ? but I don't see any change about duid.

Finally don't forget to add net.ipv6.conf.vmbr0.accept_ra=2 to your /etc/sysctl.conf file and reboot ProxMox.
note that 'accept_ra 2' in /etc/network/interface should works now on proxmox8 (it was buggy in previous ifupdown2 version)
 
I've encountered this issue. When I set iface vmbr0 inet6 dhcp the sistem hangs until it gets an ipv6 address.

To test this, I've stopped the dhcpv6 server and radvd and the host wouldn't finish the bootup. After I turn on dhcpv6 and radvd, proxmox finishes the bootup sequence. Replicated this on 2 proxmox hosts.

My solution for now is to set a cron job to start the dhclient after reboot and restart every 24h ( @reboot sleep 60 && /usr/sbin/dhclient -6 vmbr0 )

Side note 1. I've had the problem with random DUID since Proxmox 7 and my usual solution involved the/etc/systemd/networkd.conf file but this one seems more reliable.


Side note 2. I'm pretty sure in the past I could place the inet6 line anywhere like this:

Code:
auto vmbr0
iface vmbr0 inet static
    address 192.168.0.100/24
 
iface vmbr0 inet6 dhcp

but now, dhcpv6 starts only if I place the line directly under auto like so:

Code:
auto vmbr0
iface vmbr0 inet6 dhcp
iface vmbr0 inet static
    address 192.168.0.100/24
 
Last edited:
Hi,
I'm currently looking for the 2).

I have found a bug "inet dhcp + inet6 auto" (where only first decleration is used) . Maybe is it the same with (inet static + inet6 dhcp).


Edit:

https://github.com/CumulusNetworks/ifupdown2/issues/174
"having a mix of both "static" and "dhcp" stanza is currently not supported."

I'll try to see if we can fix ifupdown2 ourself
 
Last edited:
I've encountered this issue. When I set iface vmbr0 inet6 dhcp the sistem hangs until it gets an ipv6 address.

To test this, I've stopped the dhcpv6 server and radvd and the host wouldn't finish the bootup. After I turn on dhcpv6 and radvd, proxmox finishes the bootup sequence. Replicated this on 2 proxmox hosts.

My solution for now is to set a cron job to start the dhclient after reboot and restart every 24h ( @reboot sleep 60 && /usr/sbin/dhclient -6 vmbr0 )

Side note 1. I've had the problem with random DUID since Proxmox 7 and my usual solution involved the/etc/systemd/networkd.conf file but this one seems more reliable.


Side note 2. I'm pretty sure in the past I could place the inet6 line anywhere like this:

Code:
auto vmbr0
iface vmbr0 inet static
    address 192.168.0.100/24
 
iface vmbr0 inet6 dhcp

but now, dhcpv6 starts only if I place the line directly under auto like so:

Code:
auto vmbr0
iface vmbr0 inet6 dhcp
iface vmbr0 inet static
    address 192.168.0.100/24
I feel terrible for brining back such an old thread/post but this is the only reference I can find to this issue.

I followed the suggestions here to enable DHCP for IPv6 for my host (and subsequent containers and VMs) and ran into the exact same thing you state here - my hosts would not reboot after the change. Unlike you, however, I didn't have as much luck getting the issue resolved.

One of my hosts I was able to unplug the network cable and it booted up - I reverted the changes to the network config file and everything is running again (just sans ipv6). My other host would not boot no matter what. I tried booting recovery from a Proxmox ISO which also would get stuck at waiting for network to come up - never actually starting (seriously, why does this step not have a timeout of any kind?)

After a couple of hours trying to find a solution I managed to boot into the debug version of the terminal-based installation (boot from ISO -> Advanced -> Terminal Installation, Debug mode), pressed ctrl+d ONCE to have basic services load, then was able to mount /etc/pve and finally have file system access where I could revert the change to the network interfaces file.

It appears this problem is not fixed and ipv6 support in Proxmox is in a pretty awful state.

Is anyone aware of a better way to get DHCP ipv6 working?
 
If your Proxmox host does not boot try rebooting the router, proxmox waits until a new lease is received and once you reboot the router, your router gives a new lease and proxmox boots immediately.
 
@ShadowDrake here's my /etc/network/interfaces file:

Code:
auto lo
iface lo inet loopback

iface enp7s0 inet manual

auto vmbr0
iface vmbr0 inet static
    address 192.168.xxx.xxx/24
    gateway 192.168.xxx.xxx
    bridge-ports enp7s0
    bridge-stp off
    bridge-fd 0
    post-up echo 2 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra

iface vmbr0 inet6 dhcp

iface enp8s0 inet manual

In my /etc/dhcp/dhclient.conf file I've used @encryptedserver solution i.e:
Code:
interface "vmbr0" {
    send dhcp6.client-id x:x:x:x:x:x:x:x:x:x;
}

I'm running this combo on several Proxmox hosts, the snippet above is from a machine with PVE 8.1.3. My DHCP server is provided by Opnsense (ISC DHCP). Opnsense has its own issues with IPv6; for example I have to reload the WAN interface after reboot, otherwise I'm not getting an IPv6 address on it, or sometimes I'm just losing IPv6 and it won't reassign an address until reloading WAN (I have a dynamic /56 prefix).

I've also noticed recently that, in case the Proxmox Host is up but then lose IPv6 on the network, if I reboot an LXC guest that had IPv6 DHCP client enabled, it won't bring up the network interface at all - even if the v4 DHCP works.

Unfortunately, IPv6 has been a chore for me, mostly because of the dynamic /56 allocation but there are also inconsistencies with its implementation across devices.

Edit: I think that I had to delete de /var/lib/dhcp/dhclient6.leases file after pulling the DUID the first time, because otherwise something would get stuck - can't remember what exactly.
 
Last edited:
@ShadowDrake here's my /etc/network/interfaces file:

Code:
auto lo
iface lo inet loopback

iface enp7s0 inet manual

auto vmbr0
iface vmbr0 inet static
    address 192.168.xxx.xxx/24
    gateway 192.168.xxx.xxx
    bridge-ports enp7s0
    bridge-stp off
    bridge-fd 0
    post-up echo 2 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra

iface vmbr0 inet6 dhcp

iface enp8s0 inet manual

In my /etc/dhcp/dhclient.conf file I've used @encryptedserver solution i.e:
Code:
interface "vmbr0" {
    send dhcp6.client-id x:x:x:x:x:x:x:x:x:x;
}

I'm running this combo on several Proxmox hosts, the snippet above is from a machine with PVE 8.1.3. My DHCP server is provided by Opnsense (ISC DHCP). Opnsense has its own issues with IPv6; for example I have to reload the WAN interface after reboot, otherwise I'm not getting an IPv6 address on it, or sometimes I'm just losing IPv6 and it won't reassign an address until reloading WAN (I have a dynamic /56 prefix).

I've also noticed recently that, in case the Proxmox Host is up but then lose IPv6 on the network, if I reboot an LXC guest that had IPv6 DHCP client enabled, it won't bring up the network interface at all - even if the v4 DHCP works.

Unfortunately, IPv6 has been a chore for me, mostly because of the dynamic /56 allocation but there are also inconsistencies with its implementation across devices.

Edit: I think that I had to delete de /var/lib/dhcp/dhclient6.leases file after pulling the DUID the first time, because otherwise something would get stuck - can't remember what exactly.
This is pretty good info, thanks! And armed with the knowledge of the debug recovery for last-ditch-effort file system access I'll probably give it a try again.

I couldn't get my initial client ID because, well, my systems never got an ipv6 lease as they never finished booting :)

My two hosts are on the most recent version - I'd have to check what that is. But I ran apt update && apt upgrade just before taking this on.

This is correct, once you get a fresh dhcp6.client-id add it to the host file and from that point it will boot fine.

Got it. The post I quoted references manually starting ipv6 support post-boot and I'll probably give that a try to capture an initial ID.

Thank you both so much for the quick replies.
 
Hopefully it works, I am currently using it right now myself. Once you reboot your router and it clears the stored DUID, start proxmox and copy the newly assigned client id from /var/lib/dhcp/dhclient6.vmbr0.leases and paste it in /etc/dhcp/dhclient.conf

interface "vmbr0" {
send dhcp6.client-id x:x:x:x:x:x:x:x:x:x;
}
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!