move lease file?
dhcp1 at thehobsons.co.uk
Tue Feb 7 17:21:13 UTC 2017
Alexis Lameire <alexis.lameire at gmail.com> wrote:
> According to the DHCPD documentation, I strongly suggest you to not import leases files. When you see the manual, you have no guarenties that the lease file is consistent between two version.
It may not be consistent between versions, but I would be "very surprised" indeed if the newer version could not read and convert the older format - it would prevent version upgrades !
> In addition, when your leases are attributed, a precheck is made to verify if the ip is in use, if the ip is used it's marked as abandonned lease and never checked again.
To start with, this "ping before offer" check is very unreliable - since (AIUI) at least Windows now defaults to firewalling pings - apparently some people still think blocking pings offers some sort of security :-/
> When you are near to the full usage of your pool, the abandonned leases are recheck and reallowed if ip is free of use.
Ah, but it does cause issues long before any leases are reclaimed. Recovery of abandoned leases is only does as a very last resort - so in effect, they permanently reduce the size of your pool until it is actually 100% full and a new lease is needed. Lets say that (for example) you have a pool of 100 addresses, and 75 roaming clients (ie not permanently on the network). Lets say that 50 addresses get abandoned. Your pool is now effectively only half the size and will remain that way until you need 51 active leases (at which point, ONE abandoned lease will be recovered). In the meantime, you will have a lot of churn as those 75 clients will share 50 addresses - so each time a client comes onto the network it will stand a good chance of getting a new address.
But with the full pool available, those 75 clients will get more or less static assignments.
This may or may not matter* - but it is not true that having abandoned leases has no effect.
> So you can migrate with an empty lease file.
As has already been said - you *can*, but it is not recommended if you can avoid it.
The effect in any network will depend on many factors. If you have a lot of (for example) Windows desktops then these are very "sticky" in asking for IP addresses (they will ask for the same address as they had before). If you have a lot of roaming users, then these tend to be very "not sticky" and will change address readily. Many modern clients (as mentioned, Windows is one of the culprits) firewall off pings - so that prevents ping-before-offer detecting conflicts before an address is offered.
* It is correct to suggest that if the client is dynamically addressed, then by definition it **shouldn't** matter. But I have come across many admins (especially those used to used to Windows environments) who rely on the "stickiness" of the client making it near enough a static assignment. And yes, I have seen cases where things have broken because a dynamically addressed client changed address.
Example: A customer was changing their IT provider because the public service contract got awarded to a new company who tool over the service and transferred It to their own systems. The new IT outfit were given all the details, but for some unfathomable reason decided that it would break things if they configured the same IP pool on their kit - so they configured a different but overlapping pool ! So a small number of clients changed address when they tried to renew and their previous address was no longer in the pool - but one of these was the PC running the access control system for the Gym because the card readers/door controls were trying to talk to the old address.
More information about the dhcp-users