[Dnsmasq-discuss] Can dnsmasq 'alias' a host name?

Chris G cl at isbd.net
Wed Sep 2 21:38:55 BST 2009


On Wed, Sep 02, 2009 at 08:59:54PM +0100, Simon Kelley wrote:
> Chris G wrote:
> > 
> >> There are ways around this, but we need to know exactly what's going on
> >> first.
> >>
> > Thanks for all the help so far.  Yes, I think mDNS may be getting in
> > the way.  Turning it off is fine, especially if I can just persuade
> > the garage system to be 'normal'!  :-)
> > 
> > The garage system has the following running:-
> >     3817 root       1024 S   /usr/bin/mDNSResponder -f /etc/mDNSResponder.conf 
> >     3818 root       1024 S   /usr/bin/mDNSResponder -f /etc/mDNSResponder.conf 
> >     3819 root       1024 S   /usr/bin/mDNSResponder -f /etc/mDNSResponder.conf 
> > 
> 
> Yes, that name is coming from mDNS, and not from the NAS announcing its
> name when it does DHCP.
> 
> You need to stop using mDNS for name resolution (edit
> /etc/nsswitch.conf) and then, since the NAS doesn't tell dnsmasq its
> name, you need to tell dnsmasq that the host with MAC address
> 00:90:a9:70:06:ff is "garage".
> 
It appears that just turning off mdns in the dnsmasq server system has done
all I need!  :-)

I.e. I have changed:-

    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

to:-

    hosts:          files dns

in /etc/nsswitch.conf and now the garage system is 'garage'.

> 
> dhcp-host=00:90:a9:70:06:ff,garage
> 
> you can remove  the CNAME line too, it's not needed.
> 
Both currently commented out and, after a reboot, as I said garage is
just garage.

Brilliant, thank you!

Will removing those mdns4_minimal and mdns4 entries from nsswitch.conf
have done anything much, except making my system more unfriendly to
Apple Macs and such?

-- 
Chris Green




More information about the Dnsmasq-discuss mailing list