Use DHCP and SLAAC on Proxmox

By default, during the installation of Proxmox a static IPv4 Address has to be configured. However not in all cases this is the desired state. In one of my recent project I aim to leverage DHCP and SLAAC for my IP configuration. These two technologies allow me to dynamically assign a IPv4 and a IPv6 address.

For setup open the /etc/network/interfaces file with your preferred editor (e.g nano) and replace the vmbr0 configuration with the one provided below.

auto vmbr0
iface vmbr0 inet dhcp
	bridge-ports enp4s0
	bridge-stp off
	bridge-fd 0
	post-up echo "2" > /proc/sys/net/ipv6/conf/vmbr0/accept_ra

I most cases the configuration needs a little customization regarding the bridge-ports. This has to be one of your physical ethernet ports.

As you can see, I enabled SLAAC by setting /proc/sys/net/ipv6/conf/vmbr0/accept_ra to 2. Contrary to what you would expect, writing iface vmbr0 inet6 auto in the config is not good, because it most likely causes Proxmox to hang on boot. This is because this statement will also enable DHCPv6, however this is typically not provided by a IPv6 network.

I also recommend installing rdmssd to automatically change the dns settings of your Proxmox host. The relevant service should be enabled by default.

After that restart your machine.

This Post is inspired by https://blog.fernvenue.com/archives/use-dhcp-and-slaac-on-proxmox/

WordPress Appliance - Powered by TurnKey Linux