[CentOS] Is avahi essential?

Sat Jan 14 13:10:38 UTC 2012
Stephen Harris <lists at spuddy.org>

On Sat, Jan 14, 2012 at 12:29:05PM +0000, Timothy Murphy wrote:
> Gordon Messmer wrote:
> 
> > On 01/11/2012 03:42 AM, Timothy Murphy wrote:
> >> As far as I can see, it is some sort of rival to dhcpd.
> > 
> > No, DHCP is used to assign network addresses and routes (and other
> > optional configuration items).
> 
> According to the Wikipedia entry for mDNS,
> "Using mDNS allows to determine the IP address of a host 
> without the help of a centralized DNS server".
> 
> Isn't that more or less what I said above?

It's almost the opposite.  mDNS does name->IP and let's people
find other machines; DHCP does MAC->IP and let's a machine find _itself_.

Or, another way of looking at it.  mDNS is a bit like ARP, but for names.

ARP: In a traditional ethernet network, when you try to connect to a
machine on your local network with the number 10.20.30.40 then your
machine will send out an ARP broadcast packet "whois 10.20.30.40" and
then the machine in question will respond with its MAC address and then
the machines can talk via ethernet.

mDNS does something similar, but for names mapping to IP addresses; so
your machine will broadcast out requests for names ("whois fred") and
get a response.  mDNS-SD can also do service discovery ("who is running
samba?", "who is running iTunes?").  This allows applications to find
local resources.

All this is done without a central server.

DHCP is almost the opposite; it's for a machine to find out what _it_
is; the machine asking "Who am I?" and the server responding "You're
10.20.30.40".  In some cases the machine might say "Who am I?  I'd like
to be called Tom"; the dhcp server would respond "You're 10.20.30.40"
and _might_ update a central DNS (or, more often, might not).

Interestingly, Ubuntu 11 allows you to specify "mdns4" in nsswitch.conf
so that "ping foo.local" would find a machine on the local network called
"foo" by mDNS.  I'm not sure if there's an equiv for RH/CentOS at present.

-- 

rgds
Stephen