[Dnsmasq-discuss] Use dnsmasq to dhcp the very interface it's running on?

Simon Kelley simon at thekelleys.org.uk
Wed Mar 9 19:47:07 GMT 2011


On 09/03/11 17:25, Ed W wrote:
> OK, riddle me this:
>
> I have a br0 which bonds several eth1, eth2 and wlan0.  DNSmasq will
> listen on br0 and therefore supply addresses to clients on those
> interfaces via dhcp.  For various reasons it would be handy to have br0
> itself configured via dhcp - is this possible..?
>
> My tests so far using dhcpcd appear to suggest not.  The bridge comes
> up, but I don't seem to get a response to my dhcp request, most probably
> due to dnsmasq filtering the request because it doesn't match the
> address range on the interface it's binding to (because it's not yet
> configured)
>
> I guess this is of marginal value, but I'm building an embedded system
> and at least on the surface this appears to allow me to centralise some
> more configuration and dynamically modify fewer files?
>
> Grateful for any pointers as to whether this should in fact be possible
> though?
>

It's not possible. Dnsmasq needs the address of the interface in order 
to decide which network it's on and allocate an address. It would, in 
theory, be possible to find an alternative way to give it this 
information but it wouldn't win you much: the IP address of br0 could be 
in the same place as the others, but you'd still need network 
information somewhere else.

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list