Accepting RA on LXC

Kritnich

New Member
Jul 27, 2020
1
0
1
25
I have recently attempted to connect the Ubuntu 20.04 LXC containers on my Proxmox 6.2 host via IPv6. My goal was to provide the containers with their addresses via DHCPv6, so I set up a dnsmasq with router advertisements to do the job.

The issue I am running into now is that, despite being set to IPv6 via DHCP in the web interface, the containers have router advertisements disabled in both sysctl and systemd-networkd like this:

Code:
# cat /etc/systemd/network/eth0.network
[Match]
Name = eth0

[Network]
Description = Interface eth0 autoconfigured by PVE
DHCP = both
IPv6AcceptRA = false

Code:
# sysctl net.ipv6.conf.eth0.accept_ra
net.ipv6.conf.eth0.accept_ra = 0

When I manually set both these values to true and 1 respectively and restart systemd-networkd, everything works as it should, but unfortunately that isn't reboot-proof.

Is this a bug or is there an option in the web interface or configuration somewhere that controls this behavior? Thank you in advance!
 
With 7.4-16 I have an Ubuntu container set to IPv6 DHCP and IPv6AcceptRA remains set to false.
It was set to static at container creation then changed to DHCP.
If I remove IPv6AcceptRA = false from the config file it comes back next reboot.

The IPv6 settings almost should be Static, RA, Forced-SLAAC, and Forced-DHCP with the default as RA.
(For completeness IPv4 should have a Private Network option which does the 169.254 link-local thing.)

1691002134083.png

INTG (ubuntu v22.04)
user@av.v21:~
$ cat /etc/systemd/network/eth0.network
[Match]
Name = eth0

[Network]
Description = Interface eth0 autoconfigured by PVE
DHCP = yes
IPv6AcceptRA = false
 
Last edited:
Still the same here on Proxmox 8.0.4.

I fixed IPv6 by setting the parameter to true and executing "touch /etc/systemd/network/.pve-ignore.eth0.network". The file now persists without Proxmox resetting the parameter on boot. I'm not sure if that is considered the "correct" solution though since it seems like quite a hack just to get IPv6 working in LXC. I'm also not sure why systemd-networkd is not requesting a IPv6 address since DHCP is set to yes and according to the documentation it should request both if set to yes:

DHCP=
Enables DHCPv4 and/or DHCPv6 client support. Accepts "yes", "no", "ipv4", or "ipv6". Defaults to "no".

Note that DHCPv6 will by default be triggered by Router Advertisements, if reception is enabled, regardless of this parameter. By explicitly enabling DHCPv6 support here, the DHCPv6 client will be started in the mode specified by the WithoutRA= setting in the [DHCPv6] section, regardless of the presence of routers on the link, or what flags the routers pass. See IPv6AcceptRA=.

I do agree with @Shannon Barber though that it should be possible to enable RA from the UI. I get not having it enabled for regular DHCPv6 but I don't get why it doesn't request an IP then.
 
To be clear we should not have to enable RA. RA is the required default behavior.

As-is Proxmox does NOT support IPv6 because manual configuration override is required for all nodes for any proper IPv6 net.
 
  • Like
Reactions: artur and domi2
Still the same here on Proxmox 8.0.4.

I fixed IPv6 by setting the parameter to true and executing "touch /etc/systemd/network/.pve-ignore.eth0.network". The file now persists without Proxmox resetting the parameter on boot. I'm not sure if that is considered the "correct" solution though since it seems like quite a hack just to get IPv6 working in LXC. I'm also not sure why systemd-networkd is not requesting a IPv6 address since DHCP is set to yes and according to the documentation it should request both if set to yes:



I do agree with @Shannon Barber though that it should be possible to enable RA from the UI. I get not having it enabled for regular DHCPv6 but I don't get why it doesn't request an IP then.

Thanks a lot for the tip. I was trying to get this working for hours, until I found your post.
Such a simple thing to do. Set a static IP for a service and use RA.

It works, but I agree; its hacky.


I have created a PR which enables RA, if an IPv6 address is specified, but not gateway is set:
https://github.com/proxmox/pve-container/pull/1
 
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!