Linux IP Multicast

Background Reference:
Multicast over TCP/IP HOWTO

  1. What is multicast?

    Multicast is a method of distributing data over a network in an efficient way. Multicast allows a server to send a single data stream to a local multicast capable router which then redistributes it to other local hosts.

  2. Why use multicast?

    To serve a data stream to multiple clients, a server must choose one of three accepted methods: unicast, broadcast, or multicast. Unicast requires a unique connection between the server and each client. Broadcast floods non-client machines with packets they must discard, reducing network performance. Broadcast will also only work well over a single LAN. Multicast is a solution because it allows a broadcast-like packet spread over a well known channel originating over a LAN from a local source. The number of unique connections required of the server is thus dramatically reduced.

  3. How does multicast work?

    Multicast clients are required to contact their local multicast router and 'join' or request a connection to a multicast channel or group.

  4. What is a multicast address?

    Multicast addresses could be considered Class D addresses. They cover the address range: -

  5. What are the 'special' or 'well known multicast groups' and what are they used for?

    There are several defined multicast addresses that are used for specific purposes. is reserved as the 'all-hosts' group. If you ping that group, all multicast capable hosts on the network should answer as every Multicast capable host must join that group at start-up. is reserved as the 'all-routers' group. All multicast routers must join this group on all its multicast capable interfaces.

    Other addresses are also reserved and the list grows as more support is developed to meet the growing needs of the installed base. They are regularly published in the 'Assigned Numbers' RFCs.

  6. Does everyone support multicasting?

    There are currently three defined conformance levels:

  7. How do you send multicast datagrams?

    Multicast packets are sent via UDP. In principle, an application needs only to open a UDP socket to a multicast address. In practice, however, there are additional opearations that a sending process must be able to control, including TTL (Time To Live) and Loopback. TTL is used for specific purposes in multicast.

  8. How is TTL used differently with multicast than with normal UDP traffic?

    TTL is used in normal traffic as a method of limiting the number of hopps a datagram must traverse. Each router decrements the value of the TTL by a threshold value as it is routed and drops the packet when TTL reaches 0. With multicast, however, TTL is used as a threshold. The main difference is that when a datagram traverses a router with certain threshold assignments, the datagram's TTL is not decremented by the threshold, only by 1.

  9. How do you receive multicast datagrams?

    Ask the kernel to 'join' a multicast group. What you are actually doing is asking to join a group on a particular network. You must first ping and find a multicast capable router to connect to. Then bind to the port and receive the packets as normal.

  10. How do you stop receiving a multicast?

    Normally you would just close the port, but with multicast, you must inform the kernel that you are no longer interested in receiving multicast traffic from a specific channel. The kernel then finds out if any other processes are interested in that channel before closing the connection. A connection to a multicast channel is on a per-host membership and not per-process.

  11. What is the MBone?

    MBone is a Multicast Backbone or virtual multicast network based on multicast islands connected by multicast tunnels. This allows servers from non complient networks to wrap multicast data within a unicast packet to multicast islands where they are unwrapped and multicast throughout the MBone network.

  12. What applications use multicast?

    Audio Conferencing

    Video Conferencing

    Other Utilities

Copyright © 1998 Larry Smithmier