[avahi] foo => foo.local search path

Bill Moseley moseley at hank.org
Sun Jun 28 09:23:09 PDT 2009


I'm just learning about Avahi.  Please excuse my ignorance.

I'm moving my local home LAN away from centralized DNS for my local
machines.  That is, before I had static (public) IPs and ran bind9
with both internal and external zones which allowed LAN lookups to
find local machines in my domain as well as public IP machines in my
domain.  I also rand dhcpd and used it to centrally manage IPs
assinged to machines (static IPs assiged based on MACs).

My new LAN is much more simple -- with an inexpensive cable router
that handles dhcpd for the local machines and no centralized dns
database for local machines.
I don't really care which IP a machine gets assigned as long as I can
lookup the machine by name.

This seems to be working fine so far.  I can plug in a new machine
named "foo" and then on any other machine in the LAN I can "ssh
foo.local" and it will connect.

Here's where I'm confused, though.

What I'd like is to be able to say "ssh foo" and have the resolver
first search /etc/hosts ("files" in nsswitch.conf), then search for
"foo.local", and then if that fails search for "foo.hank.org" via a
normal dns lookup.

I tried to add "local" to my search in /etc/resolv.conf, but no luck.

For example, I'm on "bumby2" running Ubuntu 9.04 and "toby" is a MacBook.

$ ping toby
ping: unknown host toby

$ ping toby.local
PING toby.local (192.168.1.13) 56(84) bytes of data.
64 bytes from toby.local (192.168.1.13): icmp_seq=1 ttl=64 time=20.6 ms

$ cat /etc/resolv.conf
# Generated by NetworkManager
domain local
search local
nameserver 192.168.1.1


$ host -v toby
Trying "toby.local"
Trying "toby"
Host toby not found: 3(NXDOMAIN)
Received 97 bytes from 192.168.1.1#53 in 16 ms

Is there a way to have the resolver try "toby.local" when I specify "toby"?




-- 
Bill Moseley
moseley at hank.org


More information about the avahi mailing list