apt-get install zeroconf libnss-mdns mdnsresponder
In /etc/nsswitch.conf
hosts: files dns mdns
Then
/etc/init.d/networking restart /etc/init.d/mdnsresponder restart
ping hostname.local