[Dnsmasq-discuss] The same address on mulitple interface issue (yet again)...

Simon Kelley simon at thekelleys.org.uk
Thu Sep 25 18:26:37 BST 2008


John Gray wrote:
> Simon Kelley wrote:
> 
>>Code-wise, it wouldn't, but the syntax and semantics of /etc/ethers are
>>not defined by dnsmasq; it's a system file that's potentially used by
>>other tools and I'm not at liberty to extend the format.
>>
>>It's very easy to move you host declarations into a dnsmasq-only
>>configuration file, see dhcp-hostsfile in the dnsmasq man page.
>>
> 
> 
> Yes, I understand we can't change the format /etc/ethers, but we could
> superimpose rules on the existing format.  Namely that you must define
> multiple interfaces on adjacent lines if you want them to share the IP.

Since this is invoking somewhat dangerour behaviour, I want to make it 
explicit, and only have one configuration statement, rather then 
automagically combining two and then doing dangerous things. Hence

dhcp-host=1.2.3.4,<mac-1>,<mac-2>

To keep the host definitions is their own file, add

dhcp-hostsfile=<myfile>

to /etc/dnsmasq.conf and put

1.2.3.4,<mac-1>,<mac-2>
2.3.4.5,<mac-3>,<mac-4>

in <myfile>. Different syntax, same data. I gets reloaded on SIGHUP, 
just like /etc/ethers.

A first stab at this is in

http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.46test12.tar.gz

if you'd like to try it out. I've not updated the man page yet.


Cheers,

Simon.


> 
> John
> 




More information about the Dnsmasq-discuss mailing list