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

DHCP Server provider the same IP for two different VMs

Scheduled Pinned Locked Moved DHCP and DNS
35 Posts 5 Posters 2.0k 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
    aloisiobilck
    last edited by aloisiobilck Sep 26, 2023, 7:12 AM Sep 26, 2023, 7:11 AM

    The VMs have different MAC addresses, but when they start they receive the same IP.
    What could be wrong?

    DHCP Logs
    dhcp-logs-1.png

    dhcp-logs-2.png

    N S 2 Replies Last reply Oct 1, 2023, 2:50 PM Reply Quote 0
    • N
      NollipfSense @aloisiobilck
      last edited by Oct 1, 2023, 2:50 PM

      @aloisiobilck So, what exactly are you saying...is pfSense involved?

      pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
      pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

      A 1 Reply Last reply Oct 2, 2023, 7:51 AM Reply Quote 0
      • A
        aloisiobilck @NollipfSense
        last edited by Oct 2, 2023, 7:51 AM

        @NollipfSense
        Yes, I'm using pfsense's DHCP Server.

        N 1 Reply Last reply Oct 2, 2023, 7:39 PM Reply Quote 0
        • N
          NollipfSense @aloisiobilck
          last edited by Oct 2, 2023, 7:39 PM

          @aloisiobilck Well, that's odd...

          pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
          pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

          A 1 Reply Last reply Oct 4, 2023, 12:44 AM Reply Quote 0
          • S
            SteveITS Galactic Empire @aloisiobilck
            last edited by Oct 3, 2023, 4:18 PM

            @aloisiobilck Are they both named "ubuntuserver2204" or is that the same VM?

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote 👍 helpful posts!

            1 Reply Last reply Reply Quote 0
            • A
              aloisiobilck @NollipfSense
              last edited by Oct 4, 2023, 12:44 AM

              @NollipfSense

              Hi,
              Both have the origin of a template. But after the VMs are started the hostname are changed. MAC addresses of the VMs are different.
              The DHCP Server does not validate hostname. right ?

              N J 2 Replies Last reply Oct 4, 2023, 4:26 AM Reply Quote 0
              • N
                NollipfSense @aloisiobilck
                last edited by Oct 4, 2023, 4:26 AM

                @aloisiobilck said in DHCP Server provider the same IP for two different VMs:

                @NollipfSense

                Hi,
                Both have the origin of a template. But after the VMs are started the hostname are changed. MAC addresses of the VMs are different.
                The DHCP Server does not validate hostname. right ?

                So, that's why it ended up with the same exact hostname for different MACs. I know for sure that it validates host override hostname if pfSense is doing DNS.

                pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                A 1 Reply Last reply Oct 4, 2023, 11:45 AM Reply Quote 0
                • A
                  aloisiobilck @NollipfSense
                  last edited by Oct 4, 2023, 11:45 AM

                  @NollipfSense
                  Sorry, but which DNS are you talking about?
                  Would it be the "Dynamic DNS" parameter in the dhcp server?

                  N 1 Reply Last reply Oct 4, 2023, 12:23 PM Reply Quote 0
                  • N
                    NollipfSense @aloisiobilck
                    last edited by Oct 4, 2023, 12:23 PM

                    @aloisiobilck Here System > General

                    Screenshot 2023-10-04 at 7.16.06 AM.png

                    pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                    pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                    A 1 Reply Last reply Oct 10, 2023, 7:33 AM Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator @aloisiobilck
                      last edited by Oct 4, 2023, 1:30 PM

                      @aloisiobilck said in DHCP Server provider the same IP for two different VMs:

                      Both have the origin of a template

                      I am not 100% on this - but if the client requests its last IP, then that would be offered to it even if the mac is different. I can try and duplicate that..

                      You need to look in the discover to see if client is asking for its old IP..

                      For example - here is client asking for the IP it had last time..

                      request.jpg

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      S 1 Reply Last reply Oct 4, 2023, 2:47 PM Reply Quote 0
                      • S
                        SteveITS Galactic Empire @johnpoz
                        last edited by SteveITS Oct 4, 2023, 3:01 PM Oct 4, 2023, 2:47 PM

                        @johnpoz said in DHCP Server provider the same IP for two different VMs:

                        if the client requests its last IP, then that would be offered to it even if the mac is different

                        That was going to be my next question, if the template had been made after the DHCP lease had been obtained. Still, I would hope the DHCP server would not double assign it, and tell the second VM that IP is not available.

                        In 23.09 they are including Kea DHCP as a preview, since ISC DHCP will be discontinued. Might change the behavior.

                        Edit: I have run into this with application software, for instance if someone clones a computer after installing antivirus or RMM software, and there are two programs now using the same internal ID.

                        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                        Upvote 👍 helpful posts!

                        J 1 Reply Last reply Oct 4, 2023, 3:04 PM Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator @SteveITS
                          last edited by johnpoz Oct 4, 2023, 3:04 PM Oct 4, 2023, 3:04 PM

                          @SteveITS yeah you would hope no dupe should be assigned. So if the 1st device was on.. the ping check dhcpd should be doing before offer should catch it and not offer what the client requested.

                          And then you also have the client that should be sending out a arp probe for that IP before.. client should send a arp probe and if something answers it should send a decline vs ack..

                          As a simple test I was going to fire up a vm.. have it get an IP, and then shut it down and change its mac and then boot it and see if it requests the same IP and gets it.. Or could just create another clone of the vm, leaving it online and then fire up the clone with different mac and see if also requests - but this time it shouldn't get it because there is something actually online with the IP.

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          P 1 Reply Last reply Oct 4, 2023, 4:17 PM Reply Quote 0
                          • P
                            pwood999 @johnpoz
                            last edited by Oct 4, 2023, 4:17 PM

                            This post is deleted!
                            J 1 Reply Last reply Oct 4, 2023, 4:21 PM Reply Quote 1
                            • J
                              johnpoz LAYER 8 Global Moderator @pwood999
                              last edited by johnpoz Oct 4, 2023, 4:27 PM Oct 4, 2023, 4:21 PM

                              @pwood999 said in DHCP Server provider the same IP for two different VMs:

                              ARP before the discover as that's broadcast.

                              where did I say there would be an arp before discover? The dhcp server would do a ping to the IP, this could produce an arp if the IP is not in the arp cache already.

                              The client upon getting an offer for IP X, would do an arp probe for that IP before it sends its ack, if it gets a response to that arp probe it would send a decline instead so the dhcpd would send another offer with different IP.

                              I haven't seen a dupe IP issue in years and years and years - other than static duplication, ie PEBKAC.. Both dhcpd and dhclient have safety measures in place to prevent duplication. Not saying that can not happen.. But they should be rare for sure, and some sort of mitigating circumstances have to be at play.. Like disable of the features that try and prevent duplication.

                              edit:
                              Example from my previous example of client requesting a specific IP - can see that the client was probing for that IP 192.168.9.100 that it was requesting

                              probe.jpg

                              A probe is different than a normal arp, asking hey this is IP X who has IP Y..

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              1 Reply Last reply Reply Quote 0
                              • A
                                aloisiobilck @NollipfSense
                                last edited by Oct 10, 2023, 7:33 AM

                                @NollipfSense
                                Sorry for the delay in answering. I changed the DNS, but the problem continues.

                                J 1 Reply Last reply Oct 10, 2023, 11:06 AM Reply Quote 0
                                • J
                                  johnpoz LAYER 8 Global Moderator @aloisiobilck
                                  last edited by Oct 10, 2023, 11:06 AM

                                  @aloisiobilck And what does dns have to do with anything? What did you change exactly?

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                                  A 1 Reply Last reply Oct 10, 2023, 12:29 PM Reply Quote 0
                                  • A
                                    aloisiobilck @johnpoz
                                    last edited by Oct 10, 2023, 12:29 PM

                                    @johnpoz

                                    As @NollipfSense asked, I changed it here. I also don't know what DNS has to do with DHCP.

                                    From
                                    a81f4b1b-dd49-4feb-b592-13dd803f91ca-image.png

                                    to:
                                    11541c37-e899-4071-aa65-fbb3ff24df05-image.png

                                    J 1 Reply Last reply Oct 10, 2023, 12:39 PM Reply Quote 0
                                    • J
                                      johnpoz LAYER 8 Global Moderator @aloisiobilck
                                      last edited by Oct 10, 2023, 12:39 PM

                                      @aloisiobilck yeah that has zero to do with it that is for sure. And I highly doubt you want pfsense to not be able to resolve its own records.. The default is what you would most likely.. I resolve so there is nothing to fall back to.. So I use local only.. But again that has zero to do with anything..

                                      I don't see where he told you to change that.. He said that pfsense validates host overrides..

                                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                                      If you get confused: Listen to the Music Play
                                      Please don't Chat/PM me for help, unless mod related
                                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                                      A 1 Reply Last reply Oct 10, 2023, 12:59 PM Reply Quote 1
                                      • A
                                        aloisiobilck @johnpoz
                                        last edited by Oct 10, 2023, 12:59 PM

                                        Is there something I did wrong in pfsense for this to happen?
                                        Simply the DHCP Server hands over the same IP to a new VM.

                                        J 1 Reply Last reply Oct 10, 2023, 1:20 PM Reply Quote 0
                                        • J
                                          johnpoz LAYER 8 Global Moderator @aloisiobilck
                                          last edited by Oct 10, 2023, 1:20 PM

                                          @aloisiobilck lets go over this again.. If your new VM asks for an IP, it will get it..

                                          Did you sniff to see if the new vm is asking for the same IP?

                                          I specifically showed an example where box was asking for the old IP..

                                          Please do a packet capture of the dhcp and look to see if the client is asking for the same IP.. You could prob clear up the problem by just doing a release and then renew on the client. So it doesn't ask for an old IP.

                                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                                          If you get confused: Listen to the Music Play
                                          Please don't Chat/PM me for help, unless mod related
                                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                                          A 2 Replies Last reply Oct 10, 2023, 2:59 PM Reply Quote 0
                                          1 out of 35
                                          • First post
                                            1/35
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received