Version of proxmox is 8.4.1 on a single Debianserver with systemd-resolved.
I have created a zone and vnet in proxmox and want to supply ip and hostname to the VMs to be created inside via dhcp using dnsmasq.
1. DHCP range in subnet not applied (this seems to be a general issue)
If I specify a dhcp-range in a subnet definition in proxmox and apply the change, this range is not updated in the dnsmasq config for the subnet.
I had to change the file 10-${myvnet}.conf in /etc/dnsmasq.d/${myvnet}/ manually to get the required entry.
The setting that is generated by proxmox, no matter, if there are dhcp-ranges or not is:
`dhcp-range=set:${mydevice}-10.10.12.0-24,10.10.12.0,static,255.255.255.0,infinite`
What I wanted with the dhcp range set to 10.10.12.30 to 10.10.12.100 was:
`dhcp-range=set:${mydevice}-10.10.12.0-24,10.10.12.30,10.10.12.100,255.255.255.0,infinite`
If this is my fault, what am I doing wrong?
2. dhcp-host entries ignored
In addition to the configuration files generated by proxmox I added one to provide an IP and a hostname to the VM based on the MAC address (which is set on creation of the VM).
There I specified something like:
`dhcp-host=aa:bb:cc:dd:ee,10.10.12.2,master,infinite`
But this entry was not honored by the dhcp server.
It turns out, the reason is this entry in the proxmox-generated file 00-default.conf:
`dhcp-hostsfile=/etc/dnsmasq.d/${device}/ethers`
Only when I comment out this line does dhcp work as expected, i.e. it recognizes the mac address and assigns the ip and hostname provided. Otherwise it first seems to create the "ethers" file, where it adds an entry with the mac address and the next free ip address it gets from the dhcp-range given above. This has precedence over `dhcp-host`.
So now I am in a situation where my config files do not match what proxmox would create.
I would like to understand what my options are here: Should I just handle this subnet outside proxmox entirely? Should I preferably provide the IP address and hostname via cloud-init?
I have created a zone and vnet in proxmox and want to supply ip and hostname to the VMs to be created inside via dhcp using dnsmasq.
1. DHCP range in subnet not applied (this seems to be a general issue)
If I specify a dhcp-range in a subnet definition in proxmox and apply the change, this range is not updated in the dnsmasq config for the subnet.
I had to change the file 10-${myvnet}.conf in /etc/dnsmasq.d/${myvnet}/ manually to get the required entry.
The setting that is generated by proxmox, no matter, if there are dhcp-ranges or not is:
`dhcp-range=set:${mydevice}-10.10.12.0-24,10.10.12.0,static,255.255.255.0,infinite`
What I wanted with the dhcp range set to 10.10.12.30 to 10.10.12.100 was:
`dhcp-range=set:${mydevice}-10.10.12.0-24,10.10.12.30,10.10.12.100,255.255.255.0,infinite`
If this is my fault, what am I doing wrong?
2. dhcp-host entries ignored
In addition to the configuration files generated by proxmox I added one to provide an IP and a hostname to the VM based on the MAC address (which is set on creation of the VM).
There I specified something like:
`dhcp-host=aa:bb:cc:dd:ee,10.10.12.2,master,infinite`
But this entry was not honored by the dhcp server.
It turns out, the reason is this entry in the proxmox-generated file 00-default.conf:
`dhcp-hostsfile=/etc/dnsmasq.d/${device}/ethers`
Only when I comment out this line does dhcp work as expected, i.e. it recognizes the mac address and assigns the ip and hostname provided. Otherwise it first seems to create the "ethers" file, where it adds an entry with the mac address and the next free ip address it gets from the dhcp-range given above. This has precedence over `dhcp-host`.
So now I am in a situation where my config files do not match what proxmox would create.
I would like to understand what my options are here: Should I just handle this subnet outside proxmox entirely? Should I preferably provide the IP address and hostname via cloud-init?
Last edited: