Resolving local domain names

My laptop boots either Zorin GNU/Linux or GhostBSD 10.1, mostly the latter now that I have most of what I was looking for in the former. Oh, and Windows when I'm in a masochistic mood.

I also have a BeagleBone Black running Debian:
Code:
Linux arm 4.1.12-ti-r29 #1 SMP PREEMPT Mon Nov 9 22:46:19 UTC 2015 armv7l GNU/Linux
From Zorin, I could ssh in using its hostname, i.e., ssh -Y debian@arm.local. I managed to do that as well from Ghost, but can't do it from arm.local to Ghost -- i.e., I still have to use the IP address. Both my laptop and the Beagle are assigned static IP addresses, if that makes any difference.

I did a little Googling and thought that Avahi might do it. Followed instructions from some site, including adding _enable="YES" lines in /etc/rc.conf:
Code:
avahi_daemon_enable="YES"
mdnsd_enable="YES"
and modifying the hosts line in /etc/nsswitch.conf:
Code:
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
When I reboot, I see lines about not being able to find mdns_minimal or mdns (I think, scroll was too fast). From what I remember, the errors had to do with the network being down. I also tried mDNSIdentify Eowyn-Ghost.local and got this:
Code:
setsockopt - SO_RECV_ANYIF: Protocol not available
setsockopt - SO_RECV_ANYIF: Protocol not available
setsockopt - SO_RECV_ANYIF: Protocol not available
Eowyn-Ghost.local. AAAA FE80:0000:0000:0000:0216:EAFF:FEC5:29CE
Eowyn-Ghost.local. Addr 192.168.0.134
HINFO Hardware: I386
HINFO Software: FREEBSD
mDNS_PurgeCacheResourceRecord: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
mDNS_PurgeCacheResourceRecord: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
mDNS_PurgeCacheResourceRecord: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
No response after 4 seconds
_services._dns-sd._udp.local. PTR Trying multicast
No response after 4 seconds
_services._dns-sd._udp.local. PTR *** No Answer ***
Same result when I try mDNSIdentify arm.local

Also, just realized that arm.local thought that I had logged in from eowyn-zorin.localhost, when I had logged in from Ghost.

I thought that something may have been screwy with the arm network setup but the errors from mDNSIdentify belie that.

Ideas, please?
 
Last edited by a moderator:
Just a very obvious idea, but you don't sound like you really need a automated solution for a big network (and I always feel that zeroconf is some kind of dark magic). So why don't just put the IP addresses and hostnames in every /etc/hosts?
 
Just a very obvious idea, but you don't sound like you really need a automated solution for a big network (and I always feel that zeroconf is some kind of dark magic). So why don't just put the IP addresses and hostnames in every /etc/hosts?
Yeah, was thinking of that too. Using something like zeroconf because I want to build skills that will enable me to move up to a larger network in the future.

Here's the latest: I did manage to ssh into my FreeBSD box from my Beagle using the eowyn-zorin.local address, which is what I use when I'm booted into Zorin GNU/Linux. I think what complicates my setup is my dual-boot into both GNU/Linux and FreeBSD
 
Please note that this isn't quite zeroconf. It's mDNS, which is only (a small) part of zeroconf. If set up properly you can achieve the same using DDNS (by combining BIND and DHCP).
 
Building skills is a good idea. However in this case the hosts file really is a better solution I think. I have a lot of computers on my home network, and even more that aren't usually connected. They each have a 3 letter name and that's all I type. It's quick to type, easy to remember, and very low maintenance. For simplicity I put the hosts file in the wan router so everybody gets the same local DNS, and I only maintain one file.
 
For my home network I took some time to configure net/isc-dhcp42-server and dns/bind99 together. The added bonus of this as opposed to mDNS is that it works for everything. For mDNS you need some packages on the client and not all devices support mDNS. The DDNS solution is a bit more involved setting up but works more generally on more devices.
 
On my home network I use OpenBSD dhcpd daemon and Unbound which can be abused to serve local zone files. Works well with Android,Kindel even my Samsung TV and Blue-Ray player. Oh yes Android smart phones like it too.
 
Back
Top