ubuntu VM not getting IP from DHCP
-
For the second time I'm having an issue with the DHCP assigning the correct IP to VMs.
I decided to recreate my zabbix as was an old install with CentOS, with ubuntu 24.04.
All was done with the same VM, just deleting the HD and reinstalling.
It worked for couple hours, but after one reboot it got an IP from the pool, not the static IP assigned to it:
Oct 4 18:08:19 kea-dhcp4 32049 INFO [kea-dhcp4.leases.0x26b136e17400] DHCP4_LEASE_ALLOC [hwtype=1 00:0c:29:0f:bc:f9], cid=[ff:2d:1a:a1:33:00:02:00:00:ab:11:cb:13:c9:80:13:13:81:76], tid=0x375b20df: lease 10.10.10.16 has been allocated for 7200 seconds
On my LAN DHCP I have:
00:0c:29:0f:bc:f9 10.10.10.211 zabbix
My netplan
network: version: 2 renderer: networkd ethernets: ens192: dhcp4: true
And my journalctl shows the VM getting the IP from the DHCP:
mello@zabbix:/etc/netplan$ sudo journalctl -b | grep "DHCP" Oct 04 23:08:19 zabbix systemd-networkd[546]: ens192: DHCPv4 address 10.10.10.16/24, gateway 10.10.10.1 acquired from 10.10.10.1
Any ideas?
Thanks!
-
- With what pfSense version are you working with? KEA static DHCP mappings are only working in latest version of Plus
- Try switching back to ISC DHCP
- And do you use pfBlockerNG and have changed the default virtual IP which is 10.10.10.1?
- What is the DHCP IP pool set for LAN, I assume .211 is outside of it
-
@patient0 said in ubuntu VM not getting IP from DHCP:
- With what pfSense version are you working with? KEA static DHCP mappings are only working in latest version of Plus
- Try switching back to ISC DHCP
- And do you use pfBlockerNG and have changed the default virtual IP which is 10.10.10.1?
- What is the DHCP IP pool set for LAN, I assume .211 is outside of it
Version: 2.3a Release Date: Wed Jan 6 2021
To answer your questions:
-
list itemYes, using KEA, so will disable it and test (buy ubuntu 22 does NOT have the same problem...)
-
No to pfBlockerNG
-
DHCP range is 10.10.10.11 to 10.10.10.27
-
Static mapping uses the rest - and that is not working for my 24.04 ubuntu VM.
-
@amello
My fix:added a second network adapter to get a new MAC address
removed the old one
edited netplan to change the adapter name
changed the MAC in pf static mapping
rebooted
problem fixedIf pf or ubuntu I don't know.
-
No need for a another NIC, on VMs you can change the MAC anyway.
I'm curious if that really solves your issue or if it will pop up again very soon. Let's us know.
-
@patient0 Thanks for your replies!
I know we can change the MAC in the VM configuration, but I wanted to get a new interface going to ensure nothing cached would impact the outcome.