[SOLVED] dhcp issue with KVM, LXC does not have the issue

RobFantini

Famous Member
May 24, 2012
2,036
107
133
Boston,Mass
Hello
we use pve enterprise repos all up to date.

dhcp server is isc-kea

we have fixed reservations set up at dhcp server based on mac address for some kvm's which are configured as dhcp clients in /etc/network/interfaces .
those kvms are not getting the reserved IP, instead they get an IP from the dhcp pool.

lxc does not have this issue.

I have been working on this for some hours . If anyone has a suggestion to fix or debug please send a communication .

Next I'll see if desktops have the same issue.
 
i have a kvm which does get the correct address from dhcp.

/etc/network/interfaces :
Code:
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback


here is what a kvm which does not get the correct address has:
Code:
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
 
allow-hotplug eth0
  iface eth0 inet dhcp
 
so I installed network-manager on the kvm and eliminated the eth0 part of interfaces. still not solved
both systems are running debian bookworm .
and on the same vlan.
 
The isc-dhcp-client is responsible on the Debian side to receive correct IP based on MAC. It is installed by default. But for some odd reason it is not:
apt install isc-dhcp-client

Tried to forcefully release and renew IP?:
dhclient -r <interface>
dhclient <interface>

Also check the content here to see if something is odd:
cat /var/lib/dhcp/dhclient.leases

With isc-dhcp-client, the interface simply receives the IP without fuss. It is as simple as it gets as you know.
 
Hello Wasim

Code:
# apt install isc-dhcp-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
isc-dhcp-client is already the newest version (4.4.3-P1-2).

Code:
# dhclient ens18
RTNETLINK answers: File exists

I think the issue is with kea-dhcp , or my configuration at kea-dhcp . It is strange that non debian systems do not have an issue.

Next I'll use this to try to see differences between centos and debian at the server using
Code:
sudo tcpdump -i eth0 port 67 or port 68 -e -n -vv
 
another question - is it possible to set the dhcp-relay for the pve vlans at the vmbr bridge or in network config? currently the relay is set at the switch which all the nodes are connected to.
 
this issue was caused by my deleting a couple of subnets from our network configuration system [ONA OpenNetAdmin IP Address Management (IPAM) system ] . after that the generated kea-dhcp4 configuration had some changes subnet id's ... so kea-dhcp say lease request coming in from a wrong network and rejected the request for a reservation. more detail is available at kea-users@lists.isc.org
 

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!