[Dnsmasq-discuss] FW: DNS Name lookup issue

Kevin Tedder kevintedder at hotmail.com
Thu Apr 23 14:59:03 BST 2020


Dominik
Thanks for the suggestion.  I've resolved my issue and learnt something new today. :)

FYI - The DHCP adds the 'A' record for the server once online.
I've added a CNAME record that points to the servers 'A' record.

All works well now.

Many thanks
Kevin


-----Original Message-----
From: Dominik [mailto:dl6er at dl6er.de] 
Sent: 23 April 2020 14:41
To: Kevin Tedder; 'dnsmasq-discuss at lists.thekelleys.org.uk'
Subject: Re: [Dnsmasq-discuss] FW: DNS Name lookup issue

Hey Kevin,

On Thu, 2020-04-23 at 13:21 +0000, Kevin Tedder wrote:
> Now if I do the following:
> ‘nslookup server1.at-home’, it resolves the IP address 192.168.1.67
> as I’d expect.
> ‘nslookup MQTTBroker.at-home’, it resolves the IP address
> 192.168.1.67 as I’d expect.
> ‘nslookup 192.168.1.67’, it resolves the name of MQTTBroker.at-home,
> not Server1.at-home as I wanted.    Hmmm!!!
>  
> Is this as designed or is it just bad luck on my part as to which
> name is returned by the DNSMASQ?
> Is there any configuration setting that can be made to control which
> name takes preference? If not, can a mechanism/feature be added, such
> as a priority system as to which is preferred.?

I'm not sure how you

> added a fixed DNS ‘A’ record for a MQTT server

but you may want to look at host-record. Quoting the man page:

> Only the first address creates a PTR record linking the address to
> the name. This is the same rule as is used reading hosts-files. --
> host-record options are considered to be read before host-files, so a
> name appearing there inhibits PTR-record creation if it appears in
> hosts-file also.

It seems to be able to do what you want: ensure the PTR (address-to-
name association) is registered as you want it to.

Best,
Dominik



More information about the Dnsmasq-discuss mailing list