IPv6 with Bonjour/Zeroconf in Ubuntu
January 6, 2009
I’ve decided that 2009 is the year I go IPv6, so I’ve been getting all my machines ready. The Macs were no problem, of course: they work with IPv6 without doing anything. Linux is more problematic.
Ubuntu 8.10 and up support IPv6, but come with it turned off in places. The first place is /etc/avahi/avahi-daemon.conf where the line
use-ipv6=no
needs to be changed to
use-ipv6=yes
The second place is /etc/nsswitch.conf where the hosts line should read
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
After doing this, you should find that you can ping6 -I eth0 macname.local and have it work.
However, your regular IPv4 ping may have stopped working; mine did. It seems that Avahi doesn’t always advertise both protocol versions by default. So you need to go into all your Avahi service definition files in /etc/avahi/services and make sure that the <service> element explicitly identifies which protocols should be advertised as supported. For example:
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name>hostname-goes-here</name>
<service protocol="any">
<type>_ssh._tcp</type>
<port>22</port>
<host-name>whatever.local</host-name>
</service>
</service-group>
One exception is netatalk, which doesn’t appear to support IPv6 at all yet. For that service, you’ll want to use <service protocol="ipv4">
A few other application notes:
LigHTTPd requires server.use-ipv6 = “enable” in lighthttpd.conf.
OpenSSH has no way to specify interface, so your Avahi IPv6 addresses won’t work.
Filed under: Linux, Macintosh, System administration | Comments (0)