Suppose you are in normal dhcp environment,
You'll get an ip address like:
I want to look them up by only installing avahi on those linuxpcs with hostname set.
So on 192.168.2.103 linuxpc3.localdomain, running
ping linuxpc1.local
would work.
What is the easiest way realizing this not affecting the dhcp server settings?
Or if this is difficult, at least I would want to know the ip address for the name running a script from linuxpc3.localdomain host.
getipbyname-avahi.py linuxpc1.local
-> returns 192.168.0.101
I don't want to setup NIS or LDAP or SQL ... I thought reusing avahi capability of resolving dhcped ip address is good to start.
Why don't you just enable DNS updates in DHCP ?
Something like
ddns-updates on;
ddns-update-style interim;
ddns-domainname "network.athome.";
ddns-rev-domainname "in-addr.arpa.";
in your dhcpd.conf (I'm assuming you use ISC's) and it will update the DNS.
If you can't change the dhcp configuration probably you can use nsupdate in a client script hook.