I've been getting a few avahi-daemon errors in /var/log/messages, eg ------------------------------- Jan 11 00:40:24 helen avahi-daemon[12732]: Invalid query packet. Jan 11 00:40:29 helen last message repeated 17 times -------------------------------
(This is on a CentOS-5.7 server.)
So I looked up avahi on the web, but as far as I could see it is not doing anything essential; so I was wondering if stopping avahi-daemon would have any bad effect?
On Jan 10, 2012, at 7:51 PM, Timothy Murphy gayleard@eircom.net wrote:
I've been getting a few avahi-daemon errors in /var/log/messages, eg
Jan 11 00:40:24 helen avahi-daemon[12732]: Invalid query packet. Jan 11 00:40:29 helen last message repeated 17 times
(This is on a CentOS-5.7 server.)
So I looked up avahi on the web, but as far as I could see it is not doing anything essential; so I was wondering if stopping avahi-daemon would have any bad effect?
-- Timothy Murphy e-mail: gayleard /at/ eircom.net tel: +353-86-2336090, +353-1-2842366 s-mail: School of Mathematics, Trinity College Dublin
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Avahi is a mdns daemon. You can safely disable it in most cases.
Rilindo Foster wrote:
So I looked up avahi on the web, but as far as I could see it is not doing anything essential; so I was wondering if stopping avahi-daemon would have any bad effect?
Avahi is a mdns daemon. You can safely disable it in most cases.
But what applications use mdns?
As far as I can see, it is some sort of rival to dhcpd. Is it only used within local LANs? Is it used, for example, by CUPS to identify printers? When, if ever, would it be used in a home network?
On 1/11/2012 6:42 AM, Timothy Murphy wrote:
Rilindo Foster wrote:
So I looked up avahi on the web, but as far as I could see it is not doing anything essential; so I was wondering if stopping avahi-daemon would have any bad effect?
Avahi is a mdns daemon. You can safely disable it in most cases.
But what applications use mdns?
As far as I can see, it is some sort of rival to dhcpd. Is it only used within local LANs? Is it used, for example, by CUPS to identify printers? When, if ever, would it be used in a home network?
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=mdns http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=mdns
multicast dns. How it applies to cent though i don't know at this instant.
On 01/11/12 3:47 AM, William Warren wrote:
multicast dns. How it applies to cent though i don't know at this instant.
its part of multimedia home network plug and play, I believe... lets media boxes find media servers, and such. if you were to serve up streaming media on a home network, it would be a useful thing to have. otherwise? meh.
John R Pierce wrote:
its part of multimedia home network plug and play, I believe... lets media boxes find media servers, and such. if you were to serve up streaming media on a home network, it would be a useful thing to have. otherwise? meh.
Could you give a concrete example of such a setup, please?
I must admit I'm rather confused by UPnP. Is it intended for devices that don't have an IP address? Or how does it fit in with dhcpd?
On Wed, Jan 11, 2012 at 7:40 AM, Timothy Murphy gayleard@eircom.net wrote:
John R Pierce wrote:
its part of multimedia home network plug and play, I believe... lets media boxes find media servers, and such. if you were to serve up streaming media on a home network, it would be a useful thing to have. otherwise? meh.
Could you give a concrete example of such a setup, please?
I must admit I'm rather confused by UPnP. Is it intended for devices that don't have an IP address? Or how does it fit in with dhcpd?
It is for devices with IP, but to find names that aren't officially registered in a DNS server. For example if you have a Playstation 3, or a newer blu-ray player that supports network streaming it will use DHCP to get an address. But then suppose you install your own DLNA media server like ps3mediaserver (or have windows 7 home premium which includes one). Without registering your new server name in DNS, the device will be able to find the service if it is on the same lan. I think Macs use it to find printers too.
On 01/11/12 6:03 AM, Les Mikesell wrote:
It is for devices with IP, but to find names that aren't officially registered in a DNS server. For example if you have a Playstation 3, or a newer blu-ray player that supports network streaming it will use DHCP to get an address. But then suppose you install your own DLNA media server like ps3mediaserver (or have windows 7 home premium which includes one). Without registering your new server name in DNS, the device will be able to find the service if it is on the same lan. I think Macs use it to find printers too.
its to find SERVICES that aren't registered in regular DNS, not hostnames.
for instance, yes, said playstation will ask "are there any media servers out here?" and get the IPs of them so it can query them, ge their capabilities, and display them to the user as sources for music/movies/etc.
On 01/11/2012 06:03 AM, Les Mikesell wrote:
It is for devices with IP, but to find names that aren't officially registered in a DNS server. For example if you have a Playstation 3, or a newer blu-ray player that supports network streaming it will use DHCP to get an address. But then suppose you install your own DLNA media server like ps3mediaserver (or have windows 7 home premium which includes one). Without registering your new server name in DNS, the device will be able to find the service if it is on the same lan. I think Macs use it to find printers too.
Wait a sec, I have that setup (just mediatomb instead of ps3mediaserver) and there's no avahi on my network. Yet the PS3 is perfectly capable of discovering and using the DLNA server.
It might be useful for *something* but it doesn't appear to be required in this case.
On 1/11/2012 6:10 PM, Florin Andrei wrote:
On 01/11/2012 06:03 AM, Les Mikesell wrote:
It is for devices with IP, but to find names that aren't officially registered in a DNS server. For example if you have a Playstation 3, or a newer blu-ray player that supports network streaming it will use DHCP to get an address. But then suppose you install your own DLNA media server like ps3mediaserver (or have windows 7 home premium which includes one). Without registering your new server name in DNS, the device will be able to find the service if it is on the same lan. I think Macs use it to find printers too.
Wait a sec, I have that setup (just mediatomb instead of ps3mediaserver) and there's no avahi on my network. Yet the PS3 is perfectly capable of discovering and using the DLNA server.
You're talking about the inverse case of Les. An MDNS server on your Linux box lets it find services on the network via MDNS. So, you could store movies on the PS3 and maybe play them on the Linux desktop without knowing the PS3's IP address, if you used an mdns/avahi-aware player program.
The plug-and-play nature of MDNS would evaporate if you had to set up a Linux box on the LAN just to act as MDNS server.
On Wed, Jan 11, 2012 at 8:12 PM, Warren Young warren@etr-usa.com wrote:
It is for devices with IP, but to find names that aren't officially registered in a DNS server. For example if you have a Playstation 3, or a newer blu-ray player that supports network streaming it will use DHCP to get an address. But then suppose you install your own DLNA media server like ps3mediaserver (or have windows 7 home premium which includes one). Without registering your new server name in DNS, the device will be able to find the service if it is on the same lan. I think Macs use it to find printers too.
Wait a sec, I have that setup (just mediatomb instead of ps3mediaserver) and there's no avahi on my network. Yet the PS3 is perfectly capable of discovering and using the DLNA server.
You're talking about the inverse case of Les. An MDNS server on your Linux box lets it find services on the network via MDNS. So, you could store movies on the PS3 and maybe play them on the Linux desktop without knowing the PS3's IP address, if you used an mdns/avahi-aware player program.
No, mediatomb and ps3mediaserver are both servers (slightly different capabilities) and the ps3 is still a client/player.
The plug-and-play nature of MDNS would evaporate if you had to set up a Linux box on the LAN just to act as MDNS server.
It's multicast - the client can make a query and anything on the lan can answer so the applications providing the service can respond on their own. There is probably a way to set up a server that collates things across lan segments or configure routers to forward, but I'm not that familiar with it and it isn't necessary in the usual case of a single LAN subnet.
On 01/11/2012 05:10 PM, Florin Andrei wrote:
Wait a sec, I have that setup (just mediatomb instead of ps3mediaserver) and there's no avahi on my network. Yet the PS3 is perfectly capable of discovering and using the DLNA server.
Avahi allows the workstation running it to advertise and solicit mDNS information. Your mediatomb and PS3 are running software that does the same thing that Avahi does.
mDNS is peer-to-peer. By design, it does not need a centralized server. Avahi does not enable mDNS on the network (as a server), it enables your workstation to participate (as a peer).
Gordon Messmer wrote:
Wait a sec, I have that setup (just mediatomb instead of ps3mediaserver) and there's no avahi on my network. Yet the PS3 is perfectly capable of discovering and using the DLNA server.
Avahi allows the workstation running it to advertise and solicit mDNS information. Your mediatomb and PS3 are running software that does the same thing that Avahi does.
If running mediatomb avoids the necessity for Avahi, can you give a concrete example of a situation where Avahi _is_ needed?
On 01/14/2012 04:19 AM, Timothy Murphy wrote:
If running mediatomb avoids the necessity for Avahi, can you give a concrete example of a situation where Avahi_is_ needed?
I did. "If two PCs were running a collaborative editor, like gobby, they'll use mDNS to find each other. Chat clients such as GNOME's and iChat will locate other chat clients on the LAN if configured to do so. Rhythmbox will use mDNS to locate DAAP servers for media."
CUPS will also use Avahi to locate networked printers.
On Saturday 14 January 2012 21:43:00 Gordon Messmer wrote:
On 01/14/2012 04:19 AM, Timothy Murphy wrote:
If running mediatomb avoids the necessity for Avahi, can you give a concrete example of a situation where Avahi_is_ needed?
I did. "If two PCs were running a collaborative editor, like gobby, they'll use mDNS to find each other. Chat clients such as GNOME's and iChat will locate other chat clients on the LAN if configured to do so. Rhythmbox will use mDNS to locate DAAP servers for media."
CUPS will also use Avahi to locate networked printers.
Pulseaudio will use Avahi for audio streaming over a LAN.
HTH, :-) Marko
On 01/11/2012 05:40 AM, Timothy Murphy wrote:
I must admit I'm rather confused by UPnP.
UPnP is something completely different. That protocol allows devices behind a NAT router to request that it open a port forward to them. It is commonly used by game consoles to open the ports required for online gaming services.
On Fri, Jan 13, 2012 at 12:24 PM, Gordon Messmer yinyang@eburg.com wrote:
On 01/11/2012 05:40 AM, Timothy Murphy wrote:
I must admit I'm rather confused by UPnP.
UPnP is something completely different. That protocol allows devices behind a NAT router to request that it open a port forward to them. It is commonly used by game consoles to open the ports required for online gaming services.
It is also a subset of DLNA and was used before the DLNA standard (if you want to call it that) for media services. So much is optional in the DLNA standard that you can't count on any two things to interoperate anyway. I think most of the network media stuff is done by people who really want you to keep buying DVDs and Blu-ray discs so it is intentionally disfunctional.
On 11/01/12 11:16 PM, John R Pierce wrote:
its part of multimedia home network plug and play, I believe... lets media boxes find media servers, and such. if you were to serve up streaming media on a home network, it would be a useful thing to have. otherwise? meh.
I use AVAHI for an office full of iDevices that the boss wanted to be able to print from. AVAHI lets me advertise the CUPS printers in a format that the iDevices can see and subsequently utilise.
Otherwise I disable and remove it on my other server instances.
Cheers -pete
William Warren wrote:
Avahi is a mdns daemon. You can safely disable it in most cases.
But what applications use mdns?
As far as I can see, it is some sort of rival to dhcpd. Is it only used within local LANs? Is it used, for example, by CUPS to identify printers? When, if ever, would it be used in a home network?
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=mdns http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=mdns
I had looked up mdns on google, which is what you seem to be suggesting. But it did not give me an answer to my query above. Which URL did you think answered this?
Timothy Murphy wrote:
William Warren wrote:
Avahi is a mdns daemon. You can safely disable it in most cases.
But what applications use mdns?
As far as I can see, it is some sort of rival to dhcpd. Is it only used within local LANs? Is it used, for example, by CUPS to identify printers? When, if ever, would it be used in a home network?
http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=mdns http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=mdns
I had looked up mdns on google, which is what you seem to be suggesting. But it did not give me an answer to my query above. Which URL did you think answered this?
maybe this: http://en.wikipedia.org/wiki/Zero_configuration_networking
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).
mDNS is used to discover services using IP multicast.
Is it only used within local LANs?
Unless you've done additional multicast configuration, yes.
Is it used, for example, by CUPS to identify printers?
Yes, it's common for recent network printers to advertise themselves using mDNS.
When, if ever, would it be used in a home network?
If two PCs were running a collaborative editor, like gobby, they'll use mDNS to find each other.
Chat clients such as GNOME's and iChat will locate other chat clients on the LAN if configured to do so.
Rhythmbox will use mDNS to locate DAAP servers for media.
On Fri, Jan 13, 2012 at 12:22 PM, Gordon Messmer yinyang@eburg.com 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).
There is a larger 'zeroconf' context where if the request to a DHCP server times out, a node can assign itself something in the 169.254.0.0/16 range. Then:
mDNS is used to discover services using IP multicast.
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?
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.
Stephen Harris 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).
OK, I should have said "a rival to ARP + dhcp". As I see it, dhcpd assigns IP addresses to the devices on a LAN, and arp then provides a method of accessing a device with a given IP address.
Incidentally, I don't really see why mDNS is needed on a LAN. If a program wants to know the IP address of a device with a given name, why can't it just look in /etc/hosts ?
I see that it might be useful in a much simpler setup, where there is no server; but if there is a server available, I don't really see the point of it.
On Jan 14, 2012 3:18 PM, "Timothy Murphy" gayleard@eircom.net wrote:
Stephen Harris 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).
OK, I should have said "a rival to ARP + dhcp". As I see it, dhcpd assigns IP addresses to the devices on a LAN, and arp then provides a method of accessing a device with a given IP address.
Incidentally, I don't really see why mDNS is needed on a LAN. If a program wants to know the IP address of a device with a given name, why can't it just look in /etc/hosts ?
Yeah if all servers on the lan somehow magically ended up in the hosts file I wouldn't install avahi either.
but if there is a server available, I don't really see the point of it.
I think that's been said already.
On Sat, Jan 14, 2012 at 02:17:56PM +0000, Timothy Murphy wrote:
OK, I should have said "a rival to ARP + dhcp".
But it's not; ARP+dhcp is all about mapping MAC<->IP. mDNS is dealing with name<->IP.
mDNS competes with _DNS_; it's a way of doing local DNS without needing a DNS server.
As I see it, dhcpd assigns IP addresses to the devices on a LAN, and arp then provides a method of accessing a device with a given IP address.
ARP gets the MAC address for an IP. It has nothing to do with names.
Incidentally, I don't really see why mDNS is needed on a LAN. If a program wants to know the IP address of a device with a given name, why can't it just look in /etc/hosts ?
If you only have 1 or 2 machines that are statically configured (always the same IP), then that's fine. But in the modern home there's a lot devices that get different addresses (printers, cellphones, BluRay players, DVRs, games consoles, TVs, even remote controls) and very few people bother to configure them for static IP address. Many people don't even know _how_ to configure them. They just turn them on and hope.
I see that it might be useful in a much simpler setup, where there is no server; but if there is a server available, I don't really see the point of it.
It's "zero configuration"; turn a device on, the device gets an address from a DHCP server (typically your home router) and then tells the local subnet "Hi! I'm tivo! I can do X,Y,Z".
Now for most of my devices I don't use it, myself; I have a home grown superior config that builds dhcpd, ip4 DNS, ip6 DNS in an programmatic way from a single config file. Nice and simple.
But... it's possible that, unknown to me, I am using it! When I connect my android phone to my wifi network it can automatically find my printer and I can print directly from the phone to the printer. That's probably using mDNS without my knowing it (the printer has mDNS capability), making use of the DNS-SD capabilities of mDNS.
Do you need avahi on a CentOS machine? Depends on if you use client software that does auto-discovery using the API. Does it hurt? Probably not.
On Sat, Jan 14, 2012 at 8:17 AM, Timothy Murphy gayleard@eircom.net wrote:
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.
Somebody already said this but it isn't just host names, it is for services and the ports they run on.
OK, I should have said "a rival to ARP + dhcp". As I see it, dhcpd assigns IP addresses to the devices on a LAN, and arp then provides a method of accessing a device with a given IP address.
Incidentally, I don't really see why mDNS is needed on a LAN. If a program wants to know the IP address of a device with a given name, why can't it just look in /etc/hosts ?
Devices aren't really the point. Start a second copy of mediatomb somewhere. Change the port it runs on. Start 2 copies on the same server on different ports. Tell the ps3 to find them. Where is the ps3's /etc/host file? How would you edit it - and if you could, how would you describe 2 of the same service on the same device? If I turn on a sony laptop running windows7, the ps3 sees both the windows media server and the sony vaio instance of the similar service.
I see that it might be useful in a much simpler setup, where there is no server; but if there is a server available, I don't really see the point of it.
A visitor with a laptop uses your wifi and would like to print something. With apple's bonjour (which can be installed on windows too, and avahi probably matches) he'll see a list of available printers without having to configure anything. Isn't that nicer than having to match IP/name/protocol/port up yourself all with different configuration concepts?
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.
Ain't it the router the one that responds?
I mean, it usually has an ARP table to speed up things ;)
Regards
14.1.2012 16:57, Marc Deop kirjoitti:
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.
Ain't it the router the one that responds?
I mean, it usually has an ARP table to speed up things ;)
Regards
Any machine in the LAN may have and has it's own ARP table.
On Sat, Jan 14, 2012 at 8:57 AM, Marc Deop damnshock@gmail.com wrote:
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.
Ain't it the router the one that responds?
No, the device with the IP responds directly.
I mean, it usually has an ARP table to speed up things ;)
Everything keeps an arp cache so they don't have to repeat the lookup for every packet, but routers expect to talk to a lot of devices and hold the cached pairs longer - perhaps up to 20 minutes. Most other devices have very short timeouts so they'll notice an IP change more quickly.