24.1.4 dhcp hands-out same ip-address twice

Started by ddt3, March 28, 2024, 04:48:37 PM

Previous topic - Next topic
March 28, 2024, 04:48:37 PM Last Edit: March 28, 2024, 05:58:11 PM by ddt3
I have 2 virtual machines running on my proxmox server, When started the same ip-address is handed out  from  ISC DHCP to both, although they do have different mac-addresses. Not sure when started failing  but this has worked without issues.

Below you can see that 192.168.3.130 is given to both debian-one and debian-two, after both rebooted:
2024-03-28T16:39:28 Informational dhcpd DHCPACK on 192.168.3.130 to bc:24:11:cd:ef:41 (debian-two) via igc1
2024-03-28T16:39:28 Informational dhcpd DHCPREQUEST for 192.168.3.130 (192.168.3.1) from bc:24:11:cd:ef:41 (debian-two) via igc1
2024-03-28T16:39:28 Informational dhcpd DHCPOFFER on 192.168.3.130 to bc:24:11:cd:ef:41 (debian-two) via igc1
2024-03-28T16:39:28 Informational dhcpd DHCPDISCOVER from bc:24:11:cd:ef:41 (debian-one) via igc1
2024-03-28T16:39:20 Informational dhcpd DHCPACK on 192.168.3.130 to bc:24:11:4a:b5:1e (debian-one) via igc1
2024-03-28T16:39:20 Informational dhcpd DHCPREQUEST for 192.168.3.130 (192.168.3.1) from bc:24:11:4a:b5:1e (debian-one) via igc1
2024-03-28T16:39:20 Informational dhcpd DHCPOFFER on 192.168.3.130 to bc:24:11:4a:b5:1e (debian-one) via igc1
2024-03-28T16:39:19 Informational dhcpd DHCPDISCOVER from bc:24:11:4a:b5:1e via igc1
2024-03-28T16:39:10 Informational dhcpd DHCPRELEASE of 192.168.3.130 from bc:24:11:cd:ef:41 (debian-two) via igc1 (found)
2024-03-28T16:39:02 Informational dhcpd DHCPRELEASE of 192.168.3.130 from bc:24:11:4a:b5:1e via igc1 (not found)


Anything I can do or check to fix this?

I suspect either both have been set with a static ip on each host DHCPREQUEST for 192.168.3.130 (192.168.3.1) from bc:24:11:4a:b5:1e (debian-one) via igc1 or maybe a duplicate static lease somehow on OPN.
Be sure they are outside the dhcp allocation pool

The range of dynamic ip addresses is: 101 tot 200 (so 130 falls within that).

There is no static lease on 130:
https://pasteboard.co/C41JPcohy7sD.png

Just found out that it is even worse: every "new"  lease requested gets ip-address 192.168.3.130

Sorry, no idea. That is not normally that DHCP service functions. Something funky going on with your infrastructure setup.

Thank you fortaking  time to post some suggestions.. As I need to fix this:
to be continued

Have you changed anything on your server?

Did you notice that the DHCP discover from debian-two mac address (ef:41) is tagged as debian-one host?

Quote from: Taunt9930 on March 30, 2024, 07:17:05 PM
Have you changed anything on your server?
The only thing that I did iis upgrade opnsense each time a new version was available, and change the port of the opnsense web interface (due to some upgrade issues with HAproxy described elsewhere on this forum). I probably did something else to break DHCP if I am the only one with this issue  but can't remember if I did that and what I did  :(

Quote from: Taunt9930 on March 30, 2024, 07:17:05 PM
Did you notice that the DHCP discover from debian-two mac address (ef:41) is tagged as debian-one host?
Not sure what you mean with that, but I have rebooted debian-one and debian-two hosts a couple of times to get a clean log. This means that at some point one of the 2 would probably have asked for " the ip-address I got last time".

I have created 2 new hosts, with completely different mac-addresses and this is the dhcp4 log if I boot both at the same time:
2024-03-31T11:45:31 Informational dhcpd DHCPACK on 192.168.3.130 to 02:af:92:38:c9:46 (new-test2) via igc1
2024-03-31T11:45:31 Informational dhcpd DHCPREQUEST for 192.168.3.130 (192.168.3.1) from 02:af:92:38:c9:46 (new-test2) via igc1
2024-03-31T11:45:31 Informational dhcpd DHCPOFFER on 192.168.3.130 to 02:af:92:38:c9:46 (new-test2) via igc1
2024-03-31T11:45:31 Informational dhcpd DHCPDISCOVER from 02:af:92:38:c9:46 (new-test1) via igc1
2024-03-31T11:45:28 Informational dhcpd DHCPACK on 192.168.3.130 to 02:57:e4:9e:f8:2b (new-test1) via igc1
2024-03-31T11:45:28 Informational dhcpd DHCPREQUEST for 192.168.3.130 (192.168.3.1) from 02:57:e4:9e:f8:2b (new-test1) via igc1
2024-03-31T11:45:28 Informational dhcpd DHCPOFFER on 192.168.3.130 to 02:57:e4:9e:f8:2b (new-test1) via igc1
2024-03-31T11:45:27 Informational dhcpd DHCPDISCOVER from 02:57:e4:9e:f8:2b via igc1

Since these are a VM, did you have a look at the VM host and see if by any chance it also had the same IP address? Just wondering if an address is handled out before that the virtual MAC is supplied. Do you have a physical computer you can connect and see if it gets the same 3.130 address?

April 01, 2024, 10:42:30 PM #8 Last Edit: April 02, 2024, 08:15:56 AM by ddt3
Quote from: Greg_E on April 01, 2024, 03:49:18 PM
Since these are a VM, did you have a look at the VM host and see if by any chance it also had the same IP address?
Just wondering if an address is handled out before that the virtual MAC is supplied. Do you have a physical computer you can connect and see if it gets the same 3.130 address?
Must admit that this was also my thinking, but what contradicts this is the fact that the DHCP log shows the correct mac-addresses. But I  did some tests to see if that could be the case (see below).

The lease of ip-address 192.168.3.130 is shown in the lease list under the correct mac-address.

The 3 proxmox hosts in my cluser have statically assigned leases:


   
   
   
   
Ip address      Mac Address      Hostname
192.168.3.105c:ba:2c:20:0d:9epve.familie-dokter.lan
192.168.3.113c:a8:2a:a0:63:28gen8.familie-dokter.lan
192.168.3.12bc:ee:7b:26:5e:dasilverlaptop.familie-dokter.lan

I tried a real (not vm  host)  (as suggested): it receives a lease for 192.168.3.132 (so not 130).

So I performed a small test by adding a static lease for the VM macaddresses:
02:57:e4:9e:f8:2b (new-test1)  --> 192.168.3.81
02:af:92:38:c9:46 (new-test2)  --> 192.168.3.81

Both work exactly as expected, I think that means that the mac-addresses are usable and set at the correct time..