where to get the lease file

Denis Vlasenko vda.linux at googlemail.com
Thu Nov 23 23:38:54 UTC 2006


On Wednesday 22 November 2006 23:27, Luciano Miguel Ferreira Rocha wrote:
> On Wed, Nov 22, 2006 at 10:04:40PM +0100, Denis Vlasenko wrote:
> > On Wednesday 22 November 2006 19:11, Luciano Miguel Ferreira Rocha wrote:
> > > > It isn't very informative, and usually I've found that a lot of INIT scripts
> > > > will remove the existing file and "touch" a new file in it's place as part
> > > > of the system startup..
> > > 
> > > If you're talking about clients, then I see no problem with that. But
> > > with servers, that's wrong (unless in an embedded system without
> > > permanent storage).
> > > 
> > > That file is only available source of current leases. So, in
> > > order to prevent assignment to clients of IP addresses already in use,
> > 
> > Why do you want to preserve that? The whole point of DHCP is that addresses
> > are dynamic. They can change. Anyone sitting on DHCP ought to be ready
> > for the fact that on each reboot (of DHCP client) [s]he can get
> > different IP.
> 
> Yes, but it isn't nice on the network to have clients change their IP
> addresses willy-nilly. There's things like smb announcements, mDNS,

If you will try to preserve IP addresses, your users will grow so
accustomized to that that they will scream murder everytime their
IP address changes. And it will change, sometimes.
After that point you can switch to static addresses as well.

I think that if you (the admin) have DHCP-controlled network,
you have to communicate very clearly to your users that IP
addresses are not going to survive over reboots, period.
Anyone who expects that will be disappointed.

OTOH, if client machine is NOT rebooted, sanely set up DHCP network
will keep client's address the same, for all the reasons you mention.

> dynamic DNS and existing TCP sessions that will have to be broken.

Existing TCP sessions do not survive reboots anyway.
As to SMB/WINS idiosyncrasies versus dynamic IPs, well,
that's Microsoft for you.

> > DHCP server should try hard to not assign IP address which is already taken.
> > It can be done by sending ARP probes before you hand out new IP
> > to new client. Lease file is not needed for that.
> 
> That just doesn't work on a large network. Note that I don't know which
> server was being used on that instance, but it was based on probes for
> taken addresses.
> 
> And also for those cenarios like two clients asking for the same IP to a
> just started server (it's conceivable, but extremely unlikely).

If udhcpd can hand out same IP to two machines, it's a bug regardless
of existence of lease file or lack thereof.

> It's just good practice. But also unavailable on some embedded systems.
> I was just trying to explain the practice, not mandating it.

Well, I also just letting people know how _I_ see it.
I surely can be wrong too.
--
vda



More information about the busybox mailing list