6

I am trying to use ifconfig to turn on broadcast on my loopback interface. It currently reads:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384

As you can see, no broadcast address! :( :( :(

I tried this on OS/X but it did not work and it did not give any error or feedback:

ifconfig lo0 broadcast 127.255.255.255

Any guru would know that?


I have one server that sends one packet. I have two clients running on the same machine as the server. I need them to pick up the packet WITHOUT having to force the server to send it twice.

10
  • 2
    Why do you think you need one? It doesn't really make sence. The loopback doesn't transmit, much less have anything to broadcast to.
    – Zoredache
    Aug 26, 2012 at 19:20
  • See my edit in the question. Aug 26, 2012 at 19:22
  • 1
    Well, you've got multicast support; could you solve your problem using multicast instead?
    – nickgrim
    Aug 26, 2012 at 19:50
  • 1
    I think this is because of the results of the OP's other question: serverfault.com/questions/421373/…
    – jscott
    Aug 27, 2012 at 1:45
  • 5
    Why the loopback interface though. It seems like you could easily setup a dummy interface with private address space instead.
    – Zoredache
    Aug 27, 2012 at 6:52

1 Answer 1

7

Use multicast. Each client would need to join the group, but this is a very low overhead task. You'd have the additional benefit of being able to have clients on other machines be able to efficiently receive the message.

Failing this, look into one of the various message bus packages (i.e. mqueue, rabbitmq, etc) that will allow for reliable delivery of programmatic information to various processes without a need to reinvent the wheel.

You must log in to answer this question.

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