How do I choose a multicast address for my application's use?

前端 未结 5 1520
情深已故
情深已故 2020-12-22 18:38

How should I choose an IPv4 multicast address for my application\'s use? I may need more than one (a whole range perhaps ultimately) but just want to avoid conflicts with ot

相关标签:
5条回答
  • 2020-12-22 19:16

    ZMAAP is a zero-configuration alternative to MADCAP. I doubt there are any public source implementations of it. If you find one, then I'd like to know about it.

    0 讨论(0)
  • 2020-12-22 19:23

    As already suggested, allow the range to be configured. But taking that further, don't require configuration. You pick the range and allow configuration to override if necessary.

    You should have some logic in your application to handle foreign packets, to alert the user, through logs, or some other mechanism, that your application has detected multicast packets from another app, with instructions on how to change the configuration.

    If it turns out that there is a conflict, play those numbers in the lottery!

    0 讨论(0)
  • 2020-12-22 19:24

    It seems you've already found http://www.iana.org/assignments/multicast-addresses, so you've done the right thing by picking an address from the 239.255/16 range.

    As those ranges are entirely for site-local use it's no ones else's business which particular address you pick, but you may need to coordinate with the network manager (assuming that's not you) to pick an alternate address pool.

    As others have suggested, just make sure there's an easy way to change the address just in case it does conflict with another address on the local LAN.

    If the multiple applications issue becomes a problem, provide a (locally) well-known multicast address which the applications can talk to which will issue unique local-scope IP addresses for clients' use.

    0 讨论(0)
  • 2020-12-22 19:31

    If it is just for internal use then why not just externalize the address range as configuration and continue to use internal use.

    The Internet Assigned Numbers Authority is responsible for assigning IP addresses. They do not allocate to ISPs or individuals but on they have information where to get numbers allocated depending on your region.

    0 讨论(0)
  • 2020-12-22 19:36

    Have you seen this ?

    MADCAP

    0 讨论(0)
提交回复
热议问题