dhcpcd-discuss

Re: DHCP INFORM client

Egil Hjelmeland

Fri Dec 09 22:35:00 2011

On 2011-12-09 20:59, Roy Marples wrote:
Hi

On Wed, 2011-12-07 at 15:26 +0100, Egil Hjelmeland wrote:
I want to be able to send a DHCP INFORM to request application
settings, independent of the network handling. The idea is allow
application settings to be served from a different DHCP server than
the one serving the network settings. It seems to me that it can not
be done with dhcpcd?

What I would like to have is an option to dhcpcd which makes it send a
DHCP INFORM, call specified script for each DHCP ACK, and exit after
specified timeout. Don't touch any configuration. Don't interfere with
main dhcpcd operation.

Would that be possible to make? Or do you know of other lightweight
tools that could do that for me?
So on the same interface there are two DHCP servers, one handling
network config and the other handling application settings? I am
actually curious as to why this even sane network config or even
desired?

Well, we could add an option to broadcast INFORM at various intervals
and run the script for each ACK and then timeout. Would that work for
you?

Thanks

Roy



The use case is SIP phones and a SIP PBX. I want to use DHCP to provision the SIP server address to the phone (+plus possibly a http url for phone config). To make it easy for customers, I want to run a DHCP server in the SIP PBX to provide the SIP server address for the local network. But in many cases I anticipate that the customer has some other DHCP server which leases addresses. To minimize support calls due to conflicting DHCP servers, my idea is that by default, the SIP PBX only answer on DHCP INFORM. That I can do with dnsmasq. The SIP phone runs a DHCP(cd) client as a deamon. If the DHCP ACK leasing an address did not contain a SIP server address, the phone can try an DHCP INFORM to get the SIP server address (from the SIP PBX).

So what I had in mind was that you can invoke dhcpcd as a command to send DHCP INFORM and collect answers within a timeout, while the main dhcpcd deamon is still running. The ultimate would be if the second dhcpcd told the deamon dhcpcd to do the job, in order to avoid conflicts over port 68.

In the mean time, I have realised that sending DHCP INFORM and collecting DHCP ACK is not rocket science, much more simple than handling statefull leases. So I am 2/3 on the way of making my own little code which does the query I need. Thankfully, I have noticed that dhcpcd don't bind port 68 more than it needs. But yes, it would be great if you put something like that on the roadmap.

Best regards
Egil








References:
DHCP INFORM clientEgil Hjelmeland
Re: DHCP INFORM clientRoy Marples
Archive administrator: postmaster@marples.name