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

DHCP server IP allocating

Scheduled Pinned Locked Moved DHCP and DNS
3 Posts 2 Posters 527 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.
  • H
    Hurkamurka
    last edited by Jan 9, 2021, 12:34 AM

    Hello!

    My DHCP server on pfsense working a bit strange to me. I don't know if it should work as it's working right now. I've started to get know proxmox hypervisor. Just making some VMs, using DHCP server to sign IP address for them. The assigned IP addresses are always in an ascending order. The pool for DHCP is .100 - .200. My latest VM got the .152 ip. I removed all expired and not in use ip addresses under Status/DHCP Leases, but the DHCP server just keep assigning the bigger ip numbers. I've tried now and the VM i made got the .153 IP address. Just checked the man page for dhcpd.conf and it says under the DYNAMIC ADDRESS ALLOCATION part:
    "The DHCP server generates the list of available IP addresses from a
    hash table. This means that the addresses are not sorted in any par-
    ticular order, and so it is not possible to predict the order in which
    the DHCP server will allocate IP addresses. Users of previous versions
    of the ISC DHCP server may have become accustomed to the DHCP server
    allocating IP addresses in ascending order, but this is no longer pos-
    sible, and there is no way to configure this behavior with version 3 of
    the ISC DHCP server."

    And still my dhcp server allocates the IP addresses in ascending order.
    pfSense version: 2.4.5 p1
    ISC DHCP version: isc-dhcp-4.4.1

    Is there any other settings to make to start it over again from .100? I've restarted the server already, but there were no success.

    Thanks any help you can provide!

    B 1 Reply Last reply Jan 9, 2021, 8:05 AM Reply Quote 0
    • B
      bingo600 @Hurkamurka
      last edited by bingo600 Jan 9, 2021, 8:06 AM Jan 9, 2021, 8:05 AM

      @hurkamurka

      Behaviour:

      AFAIK the DHCP RFC says that the server should try to reassign the same ip to the same client if possible. That prob. means the pool would have to be exhausted (all previously assigned) , before DHCP would wrap. And start to reuse (free) but previously assigned ip's.

      Reset:
      I'm not that well into the pfSense DHCP config files , but i suppose you have to delete all previous assigned leases for that segment (lan) , in order to get it to start from 100 again.

      How you do that , someone else has to explain to you.

      On my linux the leases are in /var/lib/dhcpd/ , but that prob. wont be where pfSense saves them.

      Why:
      Why does the assigned ip lease address concern you ??
      The nature of DHCP is that addresses can/will change inless you do a Reservation

      /Bingo

      If you find my answer useful - Please give the post a 👍 - "thumbs up"

      pfSense+ 23.05.1 (ZFS)

      QOTOM-Q355G4 Quad Lan.
      CPU  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
      LAN  : 4 x Intel 211, Disk  : 240G SAMSUNG MZ7L3240HCHQ SSD

      H 1 Reply Last reply Jan 9, 2021, 8:55 PM Reply Quote 0
      • H
        Hurkamurka @bingo600
        last edited by Jan 9, 2021, 8:55 PM

        @bingo600
        I've deleted all the expired and assigned addresses under the GUI --> Status -- DHCP leases -- Show all configured leases -- and manually deleted them. If i remember right when i made such a delete by manually the DHCP server started assigning the first available address, which was in my case the .100. I've just found it strange that even the man page says it shouldn't be assigning the addresses one after the other. I'm not too concerned, just thought there is some mistake in my configuration.

        I've found the dhcpd files under /var/dhcpd/var/db/, i'm just a bit unsure if i can delete them after the server is stopped, or just delete the content. I have backups, so i think I'm gonna find it out.

        Thanks for the answer!

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