best practice for moving subnets?

Glenn Satchell glenn.satchell at uniq.com.au
Wed Nov 17 10:29:18 UTC 2010


On 17/11/10 08:52 PM, Simon Hobson wrote:
> Bjarne Blichfeldt wrote:
>
>> I think I would :
>>
>> add the subnets to the new failoverpair
>> change helper addresses
>> change the config for the relevant subnets on the old pair to include :
>> # 1 = DHCPDISCOVER
>> if option dhcp-message-type = 1 {
>> deny booting;
>> }
>> deny after 4 2010/12/28 16:00:00;
>> or something suitable.
>>
>> The thing is, even if you change helper address, the clients will
>> continue to use the old dhcp serves if there are
>> network connectivity.
>> Only discoveries are sent as broadcast make use of the helper address.
>> DHCPINFORM, DHCPREQUEST will be sent directly to the previous
>> used dhcp sever.
>
> That's a lot more work than just stopping the service on the old servers !
>
---8<---- snip
>
> Personally I think just copying the config and lease files over for a
> "big bang" switchover is a lot simpler.
>
I agree.

Shutdown the old servers.

Make a copy of the leases files off each partner (remember which is 
primary).

On the old servers add "deny booting;" to the subnets that are moving, 
and remove the range statements, so that no renewals will be done. This 
forces the clients to do a DHCPDISCOVER for a new server.

Start the old serves back up. You're done with them.

Shut down the new servers.

Add the new subnets to dhcpd.conf.

Concatenate the corresponding leases files from the old primary onto the 
end of the new primary. Don't worry about all th eother subnets, the 
server will delete the ones that are for subnets it doesn't know about. 
Same for the secondary.

Start up the secondary. It will print out lots of messages as it deletes 
all the leases for subnets it doesn't know about.

Start up the primary. Similar messages will occur. It will synchronise 
leases between secondary and primary.

When a client does a DHCPDISCOVER, it will be offered the address it 
previously had because it will be in the new leases database.

If you use dynamic DNS updates I think you'll be ok, as the TXT record 
is a hash of the client-id, nothing to do with the server. SO even if 
the old server removes the entry, the new server can create an identical 
one, or will recognise that there is a valid ddns entry already.

The only outage os for clients that are booting during the time the dhcp 
server is shut down. Existing clients will just keep retrying, so this 
should only affect a small amount. Try doing it at a know quiet time, eg 
at the end of the work day if it's an office.

-- 
regards,
-glenn
--
Glenn Satchell                            |  Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
http://www.uniq.com.au tel:0409-458-580   |  types random stuff.



More information about the dhcp-users mailing list