Transferring the existing DHCP table to a new server



  • 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



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


  • LAYER 8 Global Moderator

    "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 ;)


Log in to reply