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

    Transferring the existing DHCP table to a new server

    Scheduled Pinned Locked Moved DHCP and DNS
    3 Posts 2 Posters 829 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.
    • G Offline
      gsoucy
      last edited by

      Hello,

      We admittedly have a strange need : we would like to transfer the current DHCP table used by our old server to a new server (everything , including the dynamic addresses). The reason is that, with time, we configured a few services with their IP addresses and it would cause some problems if those addresses were to change suddenly…

      So, is there a way to export the current DHCP table ( mac address + IP address ) from a server and install in in another one so that all computers in the LAN keep their current address when we deploy the new server ?

      Thanks!

      Gilbert

      1 Reply Last reply Reply Quote 0
      • G Offline
        gsoucy
        last edited by

        Well, I found a possible way: the list of leases is in

        /var/dhcpd/var/db/dhcpd.leases

        So, I can take this file to the new system and restart dhcpd.

        That seems to work in my test.

        1 Reply Last reply Reply Quote 0
        • johnpozJ Offline
          johnpoz LAYER 8 Global Moderator
          last edited by

          "we configured a few services with their IP addresses and it would cause some problems if those addresses were to change suddenly…"

          So you hard coding services to point to IP vs FQDN?  And this IP is not even static, nor even reserved in dhcp?

          I would say you should fix that.  It is BAD BAD admin/developer/any one in IT that has input to allow services in a corp/business/school/home to point to IP for services.  FQDN is what you should be pointing at, this allows you to change where those services are provided from with no impact to the people using them, no changes in code, no configuration changes on machine.  1 simple change on your dns and bing bang zoom your pointing to the right place.

          I can't wait to see how that bad practice dies when ipv6 becomes common place ;)

          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 25.07.1 | Lab VMs 2.8.1, 25.07.1

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.