Chris Carr wrote:

> 
> Ok, I understand the limitation - but are you sure that this explains
> the behaviour in this case? I have never used the second NIC on tony,
> not since the machine was built ~6 years ago. So the problem is arising
> even when only one interface is ever used. If I've understood the above
> correctly, this shouldn't happen, surely?

Because the the form

<MAC1> 1.2.3.4
<MAC2> 1.2.3.4

is supposed to be disallowed, the code doesn't handle it in a sensible
way: the effect is basically to ignore one of the lines, so that is
enough to explain what you saw. The patched code now warns that it's
ignoring a line, so hopefully that will be less mysterious in future.



> 
> (I think it does explain the different behaviour on xaphod, because I
> think I have swapped the NICs in use there.)
> 
>>  From dnsmasq version 2.46 this limitation was relaxed, it's now
>> possible to tell dnsmasq that two MAC addresses belong to the same host
>> and that there's an implicit promise that the two interfaces will never
>> be up at the same time. With this promise, dnsmasq behaviour changes so
>> that when it sees MAC2, it cuts short the lease to MAC1 and gives the
>> address to the second interface.
>>
>> To make this work, use dhcp-host in /etc/dnsmasq.conf, and put both MAC
>> addresses on the same line, so eg
>>
>> dhcp-host=00:0c:6e:6f:60:67,00:26:54:0e:e1:8c,tony,192.168.1.10
>>
>> You will need to upgrade to the dnsmasq package in testing.
> 
> Ok. Where will that leave my /etc/hosts and /etc/ethers files - will
> they be needed at all? (The latter will still be used by etherwake, but
> will either be used at all by dnsmasq?)

/etc/ethers is no needed by dnsmasq - you should remove the
--read-ethers flag and it won't even be read. Similarly, /etc/hosts is
not needed, but note that there is a difference between associating a
name and IP address in /etc/hosts and in /etc/dnsmasq.conf. For the
later, the name will only be resolvable in the DNS when a client has a
DHCP lease: if there's no client, the name will disappear from DNS.

> 
> One final question, which I'm not sure is related: how can I ensure that
> dnsmasq returns the FQDN when hostname -f is called on the server? At
> the moment it only returns the hostname (baba) without the domain name.
> Where do I set the domain name for dnsmasq to pick it up?


domain=<domainname> in /etc/dnsmasq.conf should be enough.
> 

Cheers,

Simon.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to