Okay after a bit googling around it worked. I did following:
1) Installed avahi-daemon
aptitude install avahi-daemon
this makes DNS-SD possible via mDNS
2) Installed avahi-utils
aptitude install avahi-utils
To browse the network
3) Install avahi-autoipd
apt-get install avahi-autoipd
To make use of Link local addresses
4) Edit /etc/network/interfaces and add ipv4ll (Note ipv4
LL not ipv4
11)
Add an addition interface eth0:1
auto eth0:1
iface eth0:1 inet ipv4ll
This is my complete interfaces file:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
auto eth0
iface eth0 inet dhcp
auto eth0:1
iface eth0:1 inet ipv4ll
# /usr/share/doc/ifupdown/examples for more information.
reboot the plug. If no dhcp server is present it will choose its own IP address from the range 169.254.x.x/16
I have 2 plugs if I connect them together I can ping them using their hostname.local
ping demian.local
To see what is available at your network
avahi-browse -a -r
If I connect them to a DHCP server they change to the address assigned via DHCP (after a long time not sure how long)