Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

bonjour (mdns) only works on wi-fi

Hi,


Bonjour / mDNS had always worked until I decided to switch my iMac to Ethernet. Let me explain.


As long as my iMac is connected to my home wifi network, the name resolution for local hostnames (.local) work.

For instance, I can type ping anotherMac.local or mount AFP or NFS remote drives or connect to ssh hosts using hotnames.local.


But as soon as I connect the Ethernet cable (and disable wifi), there's no way any name resolution for local hostnames work. However, everything else works. DNS, internet, etc... Even after rebooting the computer. The Ethernet connection is on the same LAN than the Wifi network.


Both wifi and ethernet networks profiles are the same : IPv4 manually configured (no dhcp) and IPv6 autoconfigured.

If I switch the ethernet network profile to DHCP, it doesn't work either.


I can't figure out why mDNS resolution doesn't work for any host on the local network when ethernet is connected/enabled.


If anyone has any idea, it would be very helpful.

Next step would be the dump network frames and analyze the difference.

iMac, OS X Mountain Lion (10.8.3)

Posted on Jun 10, 2013 5:57 AM

Reply
15 replies

Jun 10, 2013 6:37 AM in response to redtomato

Just to be sure, do you nave a separate router vs WiFi device? Or maybe an ethernet switch in the mix.


Bonjour will not cross a router boundary. If you have an ISP provided router and a separate WiFi router, then you would have 2 subnets with a router between them, that would block both subnets from seeing the bonjour traffic of the other.


An ethernet switch placed in front of a WiFi router (directly attached to the Broadband modem) would also be on the wrong side of the router (this configuration can also be a problem in that ISP do not like giving out more than 1 IP address per customer, so I suspect this is not your problem, but I had to mention it just in case).


You could try running "Bonjour Browser" to see what bonjour traffic is happening on your subnet.

<http://www.macupdate.com/app/mac/13388/bonjour-browser>


You could also run WakeOnLan to see what IP addresses each system can see, and you can cross check to see if they are seeing each other.

<http://www.macupdate.com/app/mac/13388/bonjour-browser>


Both of these tools should help you identify if you have a single subnet or multiple subnets.


If you could provide informaiton about what network equipment you are using, and how each component is wired to the next including the Personal computers, network printers, network attached storage, etc... that might help identify what the problem is.

Jun 10, 2013 12:31 PM in response to BobHarris

Dear Bob.


Let me answer your questions right into your quote. See Below.

BobHarris wrote:


Just to be sure, do you nave a separate router vs WiFi device? Or maybe an ethernet switch in the mix.


There is just one device. It is a fritz!box DSL (Nat) router which also acts as a Wifi access point and as an Ethernet switch. What I'm doing is "unplug" the iMac from the wifi access point and plug the iMac to one of the fritz!box switch ports which is the same physical network.



Bonjour will not cross a router boundary. If you have an ISP provided router and a separate WiFi router, then you would have 2 subnets with a router between them, that would block both subnets from seeing the bonjour traffic of the other.


There is only one subnet which is 192.168.0.0/24 and my iMac has static IP address 192.168.0.200. There is no routing or Nat on the LAN.


An ethernet switch placed in front of a WiFi router (directly attached to the Broadband modem) would also be on the wrong side of the router (this configuration can also be a problem in that ISP do not like giving out more than 1 IP address per customer, so I suspect this is not your problem, but I had to mention it just in case).


Indeed. That's not my configuration.


You could try running "Bonjour Browser" to see what bonjour traffic is happening on your subnet.

<http://www.macupdate.com/app/mac/13388/bonjour-browser>


You could also run WakeOnLan to see what IP addresses each system can see, and you can cross check to see if they are seeing each other.

<http://www.macupdate.com/app/mac/13388/bonjour-browser>


Both of these tools should help you identify if you have a single subnet or multiple subnets.


I'll try those tools anyway and let you know.


If you could provide informaiton about what network equipment you are using, and how each component is wired to the next including the Personal computers, network printers, network attached storage, etc... that might help identify what the problem is.


the network configuration is as simple as it gets. only a Fritz!box as an ethernet switch and wifi access point. And a linux server and my iMac plugged on the ethernet and 2 iPhones, and iPad and a macBook on the wifi network. Bonjour works well for all the other hosts including the linux host thanks to avahi. Bonjour stopped working on the iMac ever since I plug it on the ethernet network but yorks when connected to wifi.

Jun 10, 2013 12:54 PM in response to redtomato

I've tried bonjour Browser. Very interesting indeed, thanks for the tip. However, in the scope of my problem, it only shows the same as ping or ping6. Ethernet active and wifi off : the only AFP service on the network is my iMac itself (my Mac is called philippe).


User uploaded file


As soon as I switch on wifi on the iMac (Ethernet inactive), other AFP services show up immediately.


User uploaded file

User uploaded file

(I only have my debian server switched on at the moment)

Jun 10, 2013 1:08 PM in response to redtomato

WakeOnLan is also useful, as it is looking for IP and MAC addresses that respond. I'm wondering if anything else is seen. NOTE: While WakeOnLan's goal is to send wake up packets, the IP and MAC address display all by itself is great without trying to use the wake up features. So please do not dismiss WakeOnLan because you are not interested in waking anything up 🙂


At the moment the router is suspect for not passing Bonjour between ethernet and WiFi. Then again, it is possible that there is an issue with the etherent configuration on the Mac.


I do know that my Macs Bonjour just fine over ethernet or WiFi. I ethernet my Macbook Pro at work, and WiFi at home. No problem with Bonjour, so the theory says it will work. The problem is what is happening in practice?


From your Linux system you might try


arp -a


and see what it gives you. At work, I have 3 systems on my office ethernet switch, Linux box, iMac, and my Macbook Pro. arp -a shows all 3, giving me their MAC addresses. arp -a from my iMac gives a lot more (other systems on the same subnet in the office), and arp -a from my Macbook Pro showed even more than that (again other systems on the office subnet). The point being arp -a is a command I know for Linux that might tell you something about what it sees on the local subnet. Getting an opinion beside the Mac's.


Can the Mac see the Linux box, and can the Linux box see the Mac? For example can you ssh between them (assuming you have ssh (remote login) enabled on the Mac and Linux boxes).

Jun 10, 2013 1:21 PM in response to redtomato

HI,


A thought.


You say you have the iMac on a Static IP.

To which interface ? Wifi or Ethernet.


Whilst in theory you should be able to turn Off Wifi and enable Ethernet the router is probably still keeping that IP for the Wifi MAC Address.

User uploaded file


You cannot set the Mac to be IP 192.168.0.200 on both WiFi and Ethernet if you happen to be connecting both at the same time.



User uploaded file
9:21 PM Monday; June 10, 2013


 iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images."  No, Seriously

Jun 10, 2013 1:31 PM in response to Ralph-Johns-UK

While every router is created differently, I have assigned Macs the same IP address to both the WiFi and Ethernet interfaces (Apple Airport Extreme routers, from the flying saucer days till today). I've used this configuration to start huge network file transfers on WiFi, plug in etherent and the transfer switches to the ethernet interface running faster to completion. For fun, I've plugged, unplugged ethernet during such network file transfers and the Macs at both ends and the Airport Extreme routers have not complained a bit.


Still Ralph, you have a very good suggestion for redtomato to try, as I have no idea how Fritz!box is going to behave.

Jun 10, 2013 2:27 PM in response to BobHarris

Hi Bob,


I used to have a Thomson-Alcatel modem and a Linksys router and I am sure at one point I did the same as you and had the Same IP allocated to both interfaces.


Later I had a Netgear router/Modem combined and this would throw one interface off line when trying to use the same IP.


Since then I have had two Sky boxes (ISP branded software on a Sagem Fast 2504 and now a "Sky Hub")

AS I had had difficulty before I have not assigned the same IP since.


As the Linksys was fairly easy to set up for a reduced DHCP range but later devices have not I have tended to drift back to using DHCP to cope with 4 iPhones that are here most days and two visiting ones.


As I said it was just a thought.

Mostly as iChat can be very fussy about Peer to Peer contact even in Text chats.



User uploaded file
10:27 PM Monday; June 10, 2013


 iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images."  No, Seriously

Jun 11, 2013 5:31 AM in response to BobHarris

Hi again Bob,


Do you happen to have a link for WakeOnLan ?

About your suspicion about the fritz!box not passing Bonjour between Ethernet and Wifi, it is exactly this opposite. My Linux Debian server is connected on the LAN via Ethernet only. When the iMac is on Ethernet too, no Bonjour. When I hook up the iMac to wifi, Bonjour works.


Still, your comments made me think. And I went right to the fritz!box management WEB interface and what I saw was that in the list of machines known by the fritz!box (a sort of enhanced arp table), the iMac shows up as connected through wifi when in fact it is connected through Ethernet. And (like Ralph wrote) I'm wondering if the fritz!box isn't somehow confused by the fact that the iMac has a static IP address of 192.168.0.200 both on Ethernet and Wifi profiles, even thoug I never activate both of interfaces at the same time. Besides, when I try to delete that entry in the fitz!box table, it doesn't react, which is a sgn of something.


I've done a little of whiresharking yesterday and I noticed that when the iMac is connected through Ethernet, there is not a single MDNS packet coming in.


What I am going to do is delete the existing entries in the Firtz!box, then switch both network profiles on the iMac to DHCP. And I'll see how it goes.


Still. If the fritz!box is filtering packets, why only Bonjour ? Everything else works. NFS, ssh, AFP, etc... in both ways.

Next time I have a minute, I'll check this out and post the results.

Jun 11, 2013 7:43 AM in response to redtomato

My Bad! I thought I had given a WakeOnLan link, but alas all I did above was post the Bonjour Browser line twice 🙂


WakeOnLan gives local network IP and MAC addresses

<http://www.macupdate.com/info.php/id/15779/wakeonlan>


Good idea, experimenting with DHCP.


You could try power cycling the Firtz!box (assuming it does not want to allow you to remove the Mac WiFi entry).


Continue to try shaking things up just to see if anything changes, and see if that change makes sense.


Unlikely to be useful suggestions:

  • Try different ethernet cable
  • Try different ethernet port on Firtz!box

I do not think they will change anything, but they are easy to do, and every once in awhile it is a hardware problem 🙂


Maybe Ralph will have some additonal advice, as mostly I'm just suggesting things to see what is happening, and ideas to shake things up to see if something changes.

Jun 11, 2013 10:51 AM in response to redtomato

I must have caught your post before you found your cache issue and edited your post.


By the way, I couldn't help noticing that even when a network profile is "inactive" in Network Prefrences, ifconfig still show the interface and the IP address associated with it. That I'm not really sure how it is possible because it should generate IP addresses conflicts. Maybe Mac OS X just filters packets at some levels when an interface is "inactive". Would be interesting to know...


With respect to multiple interfaces, there is a priority order to the interfaces, and the "default" route is always the highest in the ordered list interface that is active is where out-bound traffic is sent, unless you have a 'route' command specified for specific IP address ranges.


netstat -r


By default the faster interfaces are higher in the ordered list, so when they are active, the default route goes to those interfaces, which is why I was able to switch between WiFi and ethernet and back again, by plugging my Mac into an ethernet port (again, I was using Apple Airport Extreme routers, and other routers may behave differently).

Jun 11, 2013 1:29 PM in response to redtomato

To clarify.


My Current Sky Hub list the Connected Devices by name (in some cases) and by MAC Address listed against the IP that are using.

User uploaded file

The Unknowns consist of a Blu-ray player in my son's room, and X-box 360 sat next to that.

A plain Sky box, my son's iPad for some unknown reason and the last in the list in my MacBook Pro.

there is a possibility that the X-Box is not on Line and my son's MacBook Pro is one of the Unknows.

(i.e. I have no interlopers)


That said, the point is this device recognises things by the MAC Address rather than any Name listed anywhere and links that to An IP.

There is no way in this table to link two Interface MAC Addresses to one IP.


What the DHCP Server enablement page does not tell me (nor does the Help listed alongside), is the length of the lease on this device.


Bonjour works on the basis that the computer has a individual computer name that is different on the LAN to the other items.

I have never experimented as to whether this also tends to be MAC Address led or not.

in iChat and Messages the Buddy lists are populated by the app "Broadcasting" the Name in the My Card from the Address Book /Contacts app to the other computers.


So... it could fail because it is trying to see two "redtomato"s as the computer name.

Messages will cope with two computers having a User/Address Card with the same name.

My G4 Mac's My Card lists itself as RalphG4 and shows up on the MacBook Pro and iMac as such

However I have yet to be as clever with the MacBook Pro's My Card or the iMac's so my Bonjour Buddy list on the G4 will list "Ralph Johns" twice.




User uploaded file
9:29 PM Tuesday; June 11, 2013


 iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad
"Limit the Logs to the Bits above Binary Images."  No, Seriously

Jun 12, 2013 4:48 AM in response to Ralph-Johns-UK

Hi All,


I appreciate you sharing your experience and helping me finding out what's wrong.

Unfortunatelly, I don't have much time to bend over the problem so I'm trying things here and there and here's the last news:


- I've tried the same experiment booting my iMac from the OS X Mountain Lion installation USB stick. Same symptoms: the debian server being on Ethernet, the iMac can see Bonjour services only when hooked up to the wifi network and no Bonjour when wired to the LAN. I needed to make sure nothing was broken on my own installation...


- I've switched off the fritz!box and wired my iMac directly to the debiqn server using two CPL adapters from netgear (because of the distance). Everything works (SSH, NFS, AFP, etc...) except Bonjour, again. Are netgear CPL bridges filtering Bonjour ? I don't see why they should. But everything is possible.


I'll try to see if I find something odd on netstat, but above all, I'll use my wife's macBook to perform the tests instead of the debian server. Maybe there is a bug or limitation on avahi's Bonjour implementation. Maybe it gets confused when the iMac changes of MAC addresses (Ethernet to Wifi and vice versa)....

I can also run tcpdump on the debian server to see what mDNS packets are travelling...

As it is a laptop, I can just try to wire it directly to the iMac and see how it goes. And I can do the same with the macBook and the debian server and see what happens.


This story is really odd. Not that it's really blocking. Only I was used to use .local hostnames for name resolution....

bonjour (mdns) only works on wi-fi

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.