mdns to the hosts line in /etc/nsswitch.conf", but it wasn't working. What is needed is an "mdns plugin" for nsswitch.conf, which is nss-mdns. Installing this (it's the libnss-mdns package in Ubuntu) made it all work; I can now ping foo.local and it works! Yay!
(not sure why it isn't there by default...)
Thats all well and good if you know what the h*ck Avahi is - may I suggest at least a link ? :-)
http://avahi.org/