Wednesday, December 12, 2012

Bonjour / avahi / zeroconf

I use a few Raspberry Pi on my network. I gave them proper hostnames. I could map the DNS and all that, but I simply have avahi running on them, so I can access them with hostname.local.


For OpenIndiana to support zeronconf, all that is needed is this:

fdion@p490s:~$ su
fdion@p490s:~# vi /etc/nsswitch.conf
[here, I just added mdns:
hosts:      files mdns dns
ipnodes:    files mdns dns
fdion@p490s:~# svcadm enable svc:/network/dns/multicast:default
fdion@p490s:~# exit
From that point on, I can simply use:

fdion@p490s:~$ ssh -X rpi01.local

And of course, I had to configure Avahi on the Raspberry Pi.

This also works with my Macs, I can use ssh mac01.local for example.

No comments: