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'm trying to understand how Multicast actually works, and have read numerous articles and Wiki pages, and have gathered this:

  • A multicast address takes up state on the router of the membership, which is a scalability concern

  • There are commands to view the Multicast state on a Windows machine

  • IPv6 requires Multicast as broadcast is no longer an option.

Question:

  1. Can anyone tell me how a machine "registers" with the router to say it wants to be part of a multicast group?

  2. How can a host find a multicast group appropriate for them? (e.g. Multicast Group 1 is VOIP, #2 is file xfer. How does the server discover which IP is needed)

  3. How does a machine leave a group?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

1: Can anyone tell me how a machine "registers" with the router to say it wants to be part of a multicast group?

This is done with the Internet Group Management Protocol (IGMPv1, IGMPv2 and IGMPv3) for IPv4 and Multicast Listener Discovery (MLDv1 and MLDv2). In general the multicast router queries the nodes on the local network and the local nodes report which multicast groups they are interested in.

2: How can a host find a multicast group appropriate for them? (e.g. Multicast Group 1 is VOIP, #2 is file xfer. How does the server discover which IP is needed)

That depends. Some protocols have well-known multicast groups. See the IPv4 Multicast Address Space Registry and IPv6 Multicast Address Space Registry at IANA. Other multicast groups are communicated using some other protocol, URLs, configuration files etc.

3: How does a machine leave a group?

When using the older versions of IGMP and MLD the router will know that a client isn't interested in a multicast group anymore when the client stops sending report that it is interested. There will be a timeout and when no client on the network is interested in a particular multicast group anymore the router will stop forwarding multicast packets for that group. The newer versions of IGMP and MLD also give the client the option to explicitly tell the router that they want to leave the group. The router then queries the rest of the local network and if there are no more listeners it will stop.

Bonus

On an ethernet multicast packets are sent to certain multicast MAC addresses. Delivery of packets to those addresses depends on which MAC addresses the ethernet adapter is listening to. So to receive multicast traffic the client calculates which MAC address to listen to, configures the ethernet adapter and then lets the router know which multicast traffic it wants.

The most difficult part in multicast is how to forward multicast traffic between routers. The risk here is that routers start forwarding the same multicast traffic to each other, creating a loop. There are multiple protocols that can be used for this. Common ones are PIM-DM (Dense Mode), PIM-SM (Sparse Mode) and PIM-SSM (Source Specific Multicast).

share|improve this answer
    
Is packet shaping / inspection possible for these types of messages? e.g. If the entire packet met certain requirements and/or cryptographic signatures they will be accepted? –  makerofthings7 Aug 3 at 12:00
    
I have a broadcast that may be of interest to many nodes on the Internet. If I sign my packets using keys they trust, or sign the application layer data, will that prevent hijacking of that group data by an unknown attacker who wants to flood the channel with garbage? –  makerofthings7 Aug 3 at 12:01
    
IGMP and MLD are control packets to make multicast possible. The multicast packets themselves are normal packets with a multicast destination address –  Sander Steffann Aug 3 at 13:32
    
Multicast doesn't work across the internet like that. Usually multicast domains aren't interconnected. If they were then source address filtering could be used to limit who sends packets to which group. –  Sander Steffann Aug 3 at 13:37

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.