Adding host entry dynamically using dhcpctl functions ( dhcp hungs )

Glenn Satchell glenn.satchell at uniq.com.au
Wed Jul 6 12:35:37 UTC 2011


On 07/06/11 06:56, Niall O'Reilly wrote:
> On 05/07/11 14:21, Johnson koil Raj wrote:
>> Any other way to reserve an IP to a Machine ( static IP configuration at
>> DHCP server side) *not at the machine.*
>
> 	Have you considered that, by design, the same address is used
> 	not only when the lease is renewed before it expires, but also
> 	on any later occasion when an address is requested for what
> 	appears to be the same machine (same uid, if any; otherwise
> 	same hardware address) UNLESS it was necessary to give away
> 	the address in order to satisfy a request from an unknown
> 	machine?  This should only happen when all addresses in the
> 	pool are marked 'used';  in this case, offering a 'free' address
> 	is preferred to refusing to offer any address.
>
> 	Unless your pool is too small to accommodate the number of
> 	machines you're planning to serve, normal default lease
> 	management may be sufficient to meet your requirements.
>
> 	If you feel that this approach still involves more risk
> 	than you're prepared to bear, you may find it useful to
> 	search the mail archives for "reserved lease" or the like.
>
>
> 	I hope this helps (and that I'm not mistaken).
>
> 	Best regards,
> 	Niall O'Reilly

Niall, I think you've got it right. A reserved lease is exactly what is 
needed here.

A similar effect can be done by setting the lease time to be rather 
long, like a few months or a year. That way the client will be pretty 
sure to always use the same address.

As for dhcpd hanging, I think this may be due to the main process 
waiting for the executed script to finish. But the executed script is 
waiting for dhcpd to respond to the dhcpctl_connect call. I believe this 
is called a "deadly embrace" :)

The other disadvantage of your method is that it creates a host entry 
with a fixed-address that is part of the dynamic range. As has been 
mentioned many times before, this can lead to problems where dhcpd 
allocates the same dynamic address to another host and the static host 
is already using it.

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