Server Move...

Glenn Satchell Glenn.Satchell at uniq.com.au
Wed Oct 18 12:21:35 UTC 2006


>Date: Tue, 17 Oct 2006 19:56:50 -0700 (PDT)
>From: Keith Woodworth <kwoody at citytel.net>
>To: dhcp-users at isc.org
>Subject: Re: Server Move...
>
>On Sun, 15 Oct 2006, Glenn Satchell wrote:
>
>|->>Figured it was just as easy to start out with a fresh lease file.
>|->
>|->You can copy the whole lease file across. When the dhcp server
>|->starts and reads the lease file it will discard any leases for subnets
>|->it doesn't know about. Likewise it will take the latest version of any
>|->lease, so multiple lease entries will also be handled. It should be as
>|->simple as just copying over the whole file and appending it to whatever
>|->lease file you have on the new server.
>|->
>|->In a similar move, when you delete the subnet definition on the old
>|->server and restart dhcp it will also delete all the leases it had for
>|->the old subnet.
>|->
>|->So the next time you migrate a subnet you can append the whole lease
>|->file from the old server and it will sort itself out.
>
>Hi Glenn.
>
>So basically when ready to switch, stop the old server, copy the old lease
>file to the new server, stop the new server, do a:
>
>cat old.server.dhcpd.leases >> dhcpd.leases
>
>make sure the new subnet is in the new dhcpd.conf file, start the new
>server then change the dhcp relay (ip helper) and things will just work?
>
>Sounds too easy...!

Yes, that's pretty much it.

>One question arises from that. One of the dhcp servers that is being
>retired is still running dhcpd 2.0.
>
>There is a bit of a diff between 2.0 and version 3.0.4 the new
>server is running with regards to the lease file:
>
>2.0:
>
>lease 209.145.97.176 {
>        starts 3 2006/10/18 02:43:34;
>        ends 3 2006/10/18 03:13:34;
>        hardware ethernet 00:00:39:53:1f:e4;
>        uid 01:00:00:39:53:1f:e4;
>        client-hostname "J1";
>}
>
>3.0.4:
>
>lease 209.145.113.45 {
>  starts 3 2006/10/18 02:44:19;
>  ends 3 2006/10/25 02:44:19;
>  binding state active;
>  next binding state free;
>  hardware ethernet 00:11:11:a2:78:a9;
>  uid "\001\000\021\021\242x\251";
>  client-hostname "the-aac2ad07137";
>}
>
>Will v3 of dhcpd be able to hand that ok?

It's a long time since I ran dhcp 2.0 but I seem to remember that the newer 
version of dhcp upgrades the lease entries as it reads them.

One thing though - you can use dhcpd in test mode to verify the
old lease file format:

  dhcpd -T -lf old.server.dhcpd.leases

no errors means it can read it ok.

regards,
-glenn
--
Glenn Satchell     mailto:glenn.satchell at uniq.com.au | Some days we are
Uniq Advances Pty Ltd         http://www.uniq.com.au | the flies;  some
PO Box 70 Paddington NSW Australia 2021              | days we  are the
tel:0409-458-580  tel:02-9380-6360  fax:02-9380-6416 | windscreens...


More information about the dhcp-users mailing list