[Dnsmasq-discuss] dnsmasq listening on 0.0.0.0

Simon Kelley simon at thekelleys.org.uk
Thu Mar 20 18:51:12 GMT 2008


richardvoigt at gmail.com wrote:
> On Wed, Mar 19, 2008 at 11:24 AM, Simon Kelley <simon at thekelleys.org.uk> wrote:
>> richardvoigt at gmail.com wrote:
>>  >>  DHCP that always binds the wildcard - doing otherwise _may_ be possible,
>>  >>  but be prepared for much testing and strange behaviour. For instance,
>>  >>  you need to be able to receive packets whose destination address in
>>  >>  255.255.255.255.
>>  >
>>  > But the DHCP socket is (or can be with a config file setting) bound to
>>  > a particular interface, even if not a particular IP, correct?
>>
>>  At kernel level, it's not bound to anything. Dnsmasq sees DHCP packets
>>  which arrive on all interfaces. The first thing it does is to filter
>>  them based on --interface --except-interface and --no-dhcp-interface.
>>  Anything which doesn't pass the filter is thrown away with no action.
>>
>>  The OP wants to be have the kernel do the filtering. There's no
>>  practical benefit to doing that in most cases.
> 
> The benefit would be the ability to run multiple instances of dnsmasq
> to serve different interfaces.  I thought that capability existed. 

It does, using a slightly different mechanism. You need to set "bind 
interfaces" for the DNS stuff, and that also sets a flag on the DHCP 
socket so that more than one interface is allowed to listen on 0.0.0.0

It's important to make sure that only one instance serves a particular 
network; if this is not done, strange things may occur.


Simon.




More information about the Dnsmasq-discuss mailing list