[Dnsmasq-discuss] "not giving name"

Simon Kelley simon at thekelleys.org.uk
Thu Oct 4 20:17:20 BST 2007


Carlos Carvalho wrote:
> Simon Kelley (simon at thekelleys.org.uk) wrote on 1 October 2007 11:57:
>  >Carlos Carvalho wrote:
>  >> dnsmasq sometimes refuses to send a name to a host with the msg:
>  >> 
>  >> not giving name aar to the DHCP lease of 192.168.3.141 because the name exists in /etc/dnsmasq/hosts with address 192.168.97.141
>  >> 
>  >> This is correct. The problem is that the department is divided in
>  >> vlans, and the same machine gets different IPs when connected to
>  >> points in different vlans.
>  >> 
>  >> I wonder if dnsmasq should send the name if it finds it corresponding
>  >> to that IP in a config file, even if the name is repeated. Perhaps
>  >> just a warning could be put in the log... Opinions?
>  >> 
> ...
>  >The altenative, which _does_ work, is to use dhcp-host
>  >
>  >dhcp-host=myhost,192.168.1.100
>  >dhcp-host=myhost,192.168.2.100
>  >dhcp-host=myhost,192.168.3.100
>  >
>  >Now dnsmasq will pick the host line which fits the current network, and
>  >insert only that address into DNS: DNS queries will always get the
>  >correct answer.
> 
> You mean a hosts file isn't necessary and I can do the association
> IP/name directly in the dhcp-host declaration?

Yep, you can associate MAC address, IP address and name in a dhcp-host 
declaration, and you can repeat this with different IP addresses for 
different networks, the correct one will be selected.
> 
> As it is now all queries are answered, while putting the name only in
> dhcp-host will produce a NXDOMAIN answer if a machine hasn't got a
> lease. 

true, and when the host does have a lease, DNS queries will give the 
correct answer for where the host is now.

Which might not be a bad idea...

I think so.


Cheers,

Simon.

> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list