This is one of the most common unwelcome surprises for the uninitiated of this day and age when first-time installing PVE: static network configuration [1]. And why is it necessary? Well, it is NOT.
NOTE: This guide may ALSO be used to setup a SINGLE NODE. Simply do NOT follow the instructions on the Clustering part anymore. You can choose between Debian, ISO or Auto installation. If you cannot satisfy the prerequisites below, you may still check simplified guide on single node setup with mDNS.
Be it a simple homelab install where you just want to keep everything tidy with DHCP (why should PVE be special?), or a professional deployment where you already have well set up infrastructure (what is the DHCP & DNS for?) and cannot afford the headaches with an individually misconfigured node, or a testbed where you assemble and dismantle a cluster in no time several times over (and Ansible feels so wrong to manage this), you will want to have network configuration managed outside of the nodes, if for no other reason, at least to be able to connect to them reliably from outside the cluster, or even just to discover them.
1. Prerequisites - DHCP & DNS
The steps below assume that the nodes:
You will be able to verify this during the deployment:
The important is the transient hostname, static hostname may be either localhost or unset (when
You can essentially verify all is well the same way the official guide [2] actually suggests:
There should be no loopback (
Notes - DHCP & DNS setup
Taking dnsmasq [3] for an example, you will need at least the equivalent of the following (excerpt):
I am well aware most of the readers of this tutorial will be instead using some sort of appliance that can achieve the same. Although out of scope for this tutorial, e.g. my favourite VyOS [4] allows for this an error-proof way, but I am happy to add further sections here based on your feedback (OPNSense?).
[1] https://pve.proxmox.com/wiki/Network_Configuration#_choosing_a_network_configuration
[2] https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm
[3] https://wiki.debian.org/dnsmasq
[4] https://docs.vyos.io/en/latest/conf...fgcmd-set-service-dhcp-server-hostfile-update
NOTE: This guide may ALSO be used to setup a SINGLE NODE. Simply do NOT follow the instructions on the Clustering part anymore. You can choose between Debian, ISO or Auto installation. If you cannot satisfy the prerequisites below, you may still check simplified guide on single node setup with mDNS.
DISCLAIMER This is NOT a guide that suggests continuously recycling IP addresses with short leases, or casually changing hostnames during the normal course of cluster operation.
You WILL suffer from the same issues should your node IP or hostname change as with static configuration in terms of managing the transition. While it actually is possible to change both without a reboot (more on that below), the intended use case is to cover a rather static environment, but allow for centralised management.
Be it a simple homelab install where you just want to keep everything tidy with DHCP (why should PVE be special?), or a professional deployment where you already have well set up infrastructure (what is the DHCP & DNS for?) and cannot afford the headaches with an individually misconfigured node, or a testbed where you assemble and dismantle a cluster in no time several times over (and Ansible feels so wrong to manage this), you will want to have network configuration managed outside of the nodes, if for no other reason, at least to be able to connect to them reliably from outside the cluster, or even just to discover them.
1. Prerequisites - DHCP & DNS
The steps below assume that the nodes:
- have reserved their IP address (their specific NICs by their MAC address) with reasonable lease time; and
- hostname (handed out via DHCP Option 12); and
- can reliably resolve their hostname via DNS lookup (nameserver handed out via DHCP Option 6)
You will be able to verify this during the deployment:
ip -c a
(excerpt):
Code:
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
inet 10.10.10.101/24 brd 10.10.10.255 scope global dynamic enp1s0
hostnamectl
(excerpt):
Code:
Static hostname: localhost
Transient hostname: pve1
/etc/hostname
is missing).dig nodename
(excerpt):
Code:
root@pve1:~# dig pve1
;; ANSWER SECTION:
pve1. 50 IN A 10.10.10.101
You can essentially verify all is well the same way the official guide [2] actually suggests:
hostname --ip-address
There should be no loopback (
127.*.*.*
) addresses in its output.Notes - DHCP & DNS setup
Taking dnsmasq [3] for an example, you will need at least the equivalent of the following (excerpt):
Code:
dhcp-range=set:DEMO_NET,10.10.10.100,10.10.10.199,255.255.255.0,1d
domain=demo.internal,10.10.10.0/24,local
dhcp-option=tag:DEMO_NET,option:domain-name,demo.internal
dhcp-option=tag:DEMO_NET,option:router,10.10.10.1
dhcp-option=tag:DEMO_NET,option:dns-server,10.10.10.11
dhcp-host=aa:bb:cc:dd:ee:ff,set:DEMO_NET,10.10.10.101
host-record=pve1.demo.internal,10.10.10.101
I am well aware most of the readers of this tutorial will be instead using some sort of appliance that can achieve the same. Although out of scope for this tutorial, e.g. my favourite VyOS [4] allows for this an error-proof way, but I am happy to add further sections here based on your feedback (OPNSense?).
[1] https://pve.proxmox.com/wiki/Network_Configuration#_choosing_a_network_configuration
[2] https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm
[3] https://wiki.debian.org/dnsmasq
[4] https://docs.vyos.io/en/latest/conf...fgcmd-set-service-dhcp-server-hostfile-update
Last edited: