Connecting AirPlay from Mac on Ethernet and Wi-Fi

Connecting Airplay from a Mac which is connected to an ethernet network and can also use wifi


Hi my Mac is connected to an ethernet switch with 5 other devices.

I can't get airplay to connect unless I boot the Mac without the switch connected. Then Airplay over wifi works fine.

As soon as I plug the ethernet cable in, the computer .local name gets changed and Airplay stops working.

Any clues from anyone?

thanks

pd

MacBook Pro 14″

Posted on Nov 29, 2025 10:37 AM

Reply
18 replies

Nov 29, 2025 6:07 PM in response to Peter Davis4

The clue is the ".local" naming convention. This is related to mDNS/Bonjour. It appears that you are dealing with how macOS handles these protocols when running in a "mixed" networking (Ethernet / Wi-Fi) environment. macOS has a habit of auto-renaming the device's hostname when it sees a conflict between these types of connections.


Basically, when the Mac is on Wi-Fi only, it announces a single `.local` identity on the network, so AirPlay receivers are happy. The moment Ethernet comes online, macOS advertises a second interface with the same hostname. If something else on the wired network is holding that name—or if the Mac thinks it’s colliding—it adds a suffix like “MacBook-Pro-2.local,” and AirPlay breaks because the service announcement no longer matches what the receiver expects.


The best way to resolve this is to "lock down" the Mac's hostname so that it stops auto-changing. However, it is important that both network interfaces are on the same network subnet with no odd VLAN or isolation rules for this to work properly. Note that I'm assming that is the case here.


Here is what I would do in this case. I would start by fixing the Mac's hostname so that it stops renaming itself.


To do so:

  1. Open System SettingsGeneralSharing
  2. At the bottom, change Local Hostname to something unique.
  3. Click Edit… next to Computer Name if needed and make it match. This forces a consistent `.local` identity across all interfaces.


Next, make sure Ethernet and Wi-Fi are in the same network. If Ethernet is on a different subnet, VLAN, or guest network, AirPlay often won’t work because Bonjour doesn’t route by default. In that case, Wi-Fi and the wired LAN need to be bridged or on the same L2 network so mDNS packets can see each other.


As mentioned by others, check the service order so macOS knows which interface to prefer. I suggest the following:

  1. Go to System SettingsNetwork
  2. Click the “…” menu → Set Service Order...
  3. Put Wi-Fi above Ethernet so AirPlay prefers the Wi-Fi interface for discovery, even if Ethernet is active. Alternatively, you can place Ethernet above Wi-Fi.


Next, double-check your Ethernet switch or router isn’t filtering mDNS. If this is a managed switch (Ubiquiti, UniFi, Aruba, etc.), confirm mDNS/Bonjour forwarding isn’t blocked. If Ethernet clients are isolated from Wi-Fi, AirPlay will fail immediately.


Finally, and optionally, reset mDNS on your Mac. To do so:

  • Open Terminal and run: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder


Hopefully, this will resolve this issue for you.

Connecting AirPlay from Mac on Ethernet and Wi-Fi

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