• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

ubuntu VM not getting IP from DHCP

Scheduled Pinned Locked Moved DHCP and DNS
6 Posts 2 Posters 660 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    amello
    last edited by Oct 4, 2024, 11:22 PM

    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!

    P 1 Reply Last reply Oct 5, 2024, 4:12 AM Reply Quote 0
    • P
      patient0 @amello
      last edited by Oct 5, 2024, 4:12 AM

      • 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
      A 1 Reply Last reply Oct 5, 2024, 5:32 PM Reply Quote 0
      • A
        amello @patient0
        last edited by Oct 5, 2024, 5:32 PM

        @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.

        A 1 Reply Last reply Oct 5, 2024, 10:49 PM Reply Quote 0
        • A
          amello @amello
          last edited by Oct 5, 2024, 10:49 PM

          @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 fixed

          If pf or ubuntu I don't know.

          P 1 Reply Last reply Oct 6, 2024, 7:30 AM Reply Quote 0
          • P
            patient0 @amello
            last edited by Oct 6, 2024, 7:30 AM

            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.

            A 1 Reply Last reply Oct 6, 2024, 1:04 PM Reply Quote 0
            • A
              amello @patient0
              last edited by Oct 6, 2024, 1:04 PM

              @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.

              1 Reply Last reply Reply Quote 0
              2 out of 6
              • First post
                2/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received