I am trying to test my program that makes use of broadcast UDP (not multicast!). In Linux, I can use the address and everything works beautifully, in other words, I send a packet to and multiple clients listening on that port get the packet. A real broadcast example!

Unfortunately on my OS/X machine (Mountain Lion) the same example does not work.

Is there any way I can get to work on mac machines? Any other solution to get broadcast working on my mac machine without a network?

Note: It has to be broadcast, not multicast.


2 Answers 2

1 should not work. Strange!

Use your network broadcast address, that's what it's for.

For instance, if your network is, your broadcast address is

  • Thanks for the help, Mikey, but as I said I do not have a network to get this address from. The machine is offline. :) Commented Nov 10, 2013 at 3:49
  • 1
    Add a fake interface or add an IP to your loopback interface.
    – MikeyB
    Commented Nov 10, 2013 at 3:56

Instead of, on Mac OS X try using as an alternative.

  • 1 does not work. I found the right one, but since this is off-topic according to the moderators, I won't bother saying it. Nobody cares anyways! Commented Nov 11, 2013 at 3:11
  • 1
    JohnPristine, it is sad that you haven't posted the answer. Now I have to do my own quest :( Commented Aug 22, 2018 at 14:49

Not the answer you're looking for? Browse other questions tagged .