No IPV6 for LXC container

konraaad

New Member
Feb 18, 2021
2
4
1
37
Hi Proxmox fans,

I have some issues with my lxc containers, as they don't get an ipv6 assigned. Although all other devices on my network receive an ipv6 address (including the pve host) and the container's vmbridge is set to DHCP for ipv4 and ipv6.

After some trial and error I noticed that when I switch the flag in

/etc/systemd/network/eth0.network
IPv6AcceptRA = false

to true and the restart the network services with systemctl restart systemd-networkd.service it all works and the container gets an ipv6. Only issue is, if the container reboots the flag gets reset to its apparent default false.

So, is there either a way to set this flag permanently to true or is there another better approach to receiving an ipv6? (I'm new to all of this...)

Thanks!!
 
For RA set container network to "SLAAC"

Otherwise setup a DHCPv6 server.
 
Last edited:
  • Like
Reactions: XRedShark
Thanks HR40, your response (before your edit) did help me solve this issue! I had tried SLAAC, but that didn't work either.

Solution (for my environment):
  1. Changed the flag IPv6AcceptRA in /etc/systemd/network/eth0.network from false to true.
  2. Created a file using touch /etc/systemd/network/.pve-ignore.eth0.network. (I think) this file blocks the PVE host from changing the IPv6AcceptRA flag to its default after reboot.
  3. reboot the machine or reboot the network service systemctl restart systemd-networkd.service.
  4. Voila, your host should have an IPV6 address!
I kept the network settings for this container's vmbridge set on DHCP for IPV6. It's a lxc container running Ubuntu 20.04 LTS.
 
Last edited:

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!