Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I posted this on StackOverflow and was told it might be more appropriate here.

I'm having trouble understanding how multicast addresses work.

First off, is it true that if I have N clients or peers working on separate networks, they all subscribe to the same multicast group, and this group allows any source to send messages, these peers/hosts can all communicate to each other through this group? (sounds like black magic!)

Second, I've heard hints that the IANA controls/regulates the multicast addresses. So do you have to request / ask IANA for a specific multicast address for your project / company? How does this work? Am I mistaken? Can you clarify multicast networking for me?

Thanks much!

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Yes, your understanding is true to some extent. In theory it works like this: your application binds to a multicast address, the operating system gets this and subscribes the computer in the multicast group. When other computers send packets to that address, they arrive at your computer until all applications unbind from that address and the operating system removes the computer from the multicast group.

The magic is a combination of IGMP and PIM. IGMP is used between the OS and the nearest router, it allows the OS to tell the router that it is entering or leaving a multicast group, and that it is interested in receiving packets for that address. PIM is used between routers to discover and exchange multicast group data, and to find and reach all subscribers of multicast groups when packets addressed to that group are transmitted.

IANA regulates multicast address (as well as almost everything else in the Internet). If you want to use multicast on the Internet, you need a multicast address allocation just like you do with unicast addresses:

If you want to use multicast in your local network, without routing to the outside Internet, you have administratively scoped ranges for private use defined in RFC 2365. The address range is 239.192.0.0/14.

share|improve this answer

Multicast works like you think, except that the switches along the network all have to "understand" what the clients want. This means it's only useful for private networks, and you don't need to involve IANA. This also means you need to setup your switches for multicast to work correctly; if you only have one switch, or one switch stack, this is usually fairly easy. If you have multiple stacks, and especially if you have different brands, this can become quite complicated.

share|improve this answer
    
So multicast does not "just work" like unicast routing does? Each hop along the way has to be configured to handle it? –  Josh G Apr 11 '11 at 13:06
    
How does this apply to audio/video streaming that is becoming a popular multicasting application? Don't they multicast to the public internet/network? –  Josh G Apr 11 '11 at 13:07
    
Most streaming sites do not use multicast in any way, it's all unicast. Most use multiple sites and connect you to the closest logical site. Some provider networks do make use of multicast, but it's pretty limited. It's a chicken & egg problem, the hardware doesn't support it very well because it isn't widely used, it's not widely used because you can't even come close to relying on hardware support. –  Chris S Apr 11 '11 at 13:19
    
Yes, I've heard some of this before. Isn't this all going to change with IPv6? From my understanding, multicast support will be required and broadcasts will be a specific subset of multicasts (the local link address). –  Josh G Apr 11 '11 at 13:21
1  
@Juliano, In my experience most cheap SOHO switches don't support multicast in any way, shape, or form. I'm sure some exist where they support multicast as broadcast; but the only place I've seen switches work correctly is where they support IGMP directly or through snooping. Most higher end switches blur the distinction between switch and router... –  Chris S Apr 11 '11 at 15:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.