[SOLVED] Avahi not "self aware"

Posted by szumlins on 2012/3/26 22:08:18
I'm working on a project for a small appliance that might be plugged in on any network and I would like to advertise the location of the web administration panel for the software I'm using over mDNS. I have avahi installed and all seems to be working externally (my Macs on the network see the registered service and can ping the archipliance.local mDNS name). The problem I'm having is that the CentOS system itself doesn't appear to know its own mDNS name. When I ping on the CentOS box itself to archipliance.local, it says no host found.

Obviously this is easy in a non-dhcp world, but since this box may be on any network with any IP range at any given time, I'm not quite sure how to have it fall back onto its .local name when a static IP is not configured and good DNS is not around. I need to have the CentOS system default back to its hostname with the .local extension in absence of good DNS.

Some shell dumps just so you get an idea of what is going on:
[root@archipliance ~]# ps aux | grep avahi
avahi     1262  0.0  0.0  27880  1836 ?        S    04:51   0:00 avahi-daemon: running [archipliance.local]
avahi     1263  0.0  0.0  27712   516 ?        Ss   04:51   0:00 avahi-daemon: chroot helper
root      5991  0.0  0.0 103292   872 pts/0    S+   13:41   0:00 grep avahi

[root@archipliance ~]# ping archipliance.local
ping: unknown host archipliance.local

[root@archipliance ~]# hostname 
archipliance

[root@archipliance ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 50:E5:49:E8:03:54  
         inet addr:192.168.3.100  Bcast:192.168.3.255  Mask:255.255.255.0
         inet6 addr: fe80::52e5:49ff:fee8:354/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:91112 errors:0 dropped:0 overruns:0 frame:0
         TX packets:27852 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:71441071 (68.1 MiB)  TX bytes:4833542 (4.6 MiB)
         Interrupt:28 Base address:0xe000 

lo        Link encap:Local Loopback  
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:12 errors:0 dropped:0 overruns:0 frame:0
         TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0 
         RX bytes:1446 (1.4 KiB)  TX bytes:1446 (1.4 KiB)

[root@archipliance ~]# cat /etc/resolv.conf 
; generated by /sbin/dhclient-script
search copperbell.lan.
nameserver 192.168.3.50
nameserver 192.168.3.51
nameserver 172.16.0.1

From my Mac on the same network:
[szumlins@octane:~]: ping archipliance.local
PING archipliance.local (192.168.3.100): 56 data bytes
64 bytes from 192.168.3.100: icmp_seq=0 ttl=64 time=0.172 ms
64 bytes from 192.168.3.100: icmp_seq=1 ttl=64 time=0.277 ms

Any ideas would be much appreciated.

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=58&topic_id=36603&post_id=158654