Understanding IP Multicasting

multicast-iconWhat is IP Multicasting? -IP multicasting allows a host to send a single packet to thousands of hosts across a routed network i.e. The Internet.

It is used mainly for audio (radio) and video distribution.

In Networking a packet can be sent to:

  • A single host –Unicast = (TCP and UDP)
  • All hosts -Broadcast – (UDP only)
  • A group of hosts – Multicast -(UDP only)






Unicast-Broadcast-Multicast

Broadcasts vs Multicasts

Multicasting is different from IP broadcasting as:

  • Broadcasting uses a single IP address. Host bits set to all 1’s. There are a range of multicast addresses
  • Broadcast messages are not sent through routers but multicast messages are.
  • All hosts will receive broadcasts by default
  • A host must be configured to receive multicast messages.

Multicast Addresses

IPv4 Multicast addresses use the reserved class D address range:

224.0.0.0 through 239.255.255.255

The addresses range between 224.0.0.0 and 224.0.0.255 is reserved for use by routing and maintenance protocols inside a network.

These addresses aren’t forwarded by routers. Many of the multicast addresses are reserved see Muticast Space Registry

How Multicasting Works

On a small home or office network any host can send and receive multicast datagrams.

Multicasting-Home-Network

Note: multicast uses UDP and are sent through switches and hubs.

To receive a multicast message a host must be configured to receive on that multicast address.

All hosts that are configured to receive packets on a particular address are part of a multicast group.

Multicast Groups

A host that is configured to receive datagrams sent to a multicast address becomes part of a multicast group for that address.

A group can have 1 to an unlimited number of hosts. Neither hosts or routers maintain a list of individual group members.

A host can be part of multiple multicast groups and can send to multiple multicast addresses.

A host can send datagrams to a multicast group address even though there are no members of that group, and a host doesn’t need to be a member of a group to send multicast datagrams to that group.

Note: Multicast packets are sent through switches.

Multicast On the Internet

On the Internet multicast packets need to be forwarded by routers.multicast-diagram

A router will determine if any of the hosts on a locally attached network are configured to receive multicast datagrams using IGMP( Internet Group Management  Protocol).

Routers will listen for IGMP messages and periodically  send queries on the local subnet. using the multicast group address 224.0.0.1 (Reserved All hosts address).

Multicast routers do not keep track of which hosts are part of a group, but only need to know if any hosts on that subnet are part of a group.

If a router receives a multicast datagram from another network and has no members for that group address on any of it’s subnets it drops the packet.

Viewing Multicast Packets

On a typical home network there are a variety of protocols that use multicast.

The SSDP (Simple Service Discovery Protocol) uses multicast address 239.255.255.250 on UDP port 1900.

Here is a screen shot from running tcpdump on a raspberry pi.

multicast-example

If you are new to tcpdump then see this tcpdump tutorial

Resources:

Related Tutorials

  1. IP4 Addresses and address classes
  2. IP6 Guide
  3. Understanding TCP/IP ports and sockets
Please rate? And use Comments to let me know more
[Total: 6    Average: 4.2/5]

9 comments

  1. Hello Steve,

    Very new to all that sort of stuff.

    My only concern is that I can see one multicast address on my private network & am worried it could be a mean to spy on my activity.

    Could you please elaborate on that particular topic when you have a moment?
    Thank you in advance. C.

    1. Hi
      You will find quite a lot of multicast traffic on a network as it is used for device discovery.
      I will try to find time to talk about monitoring tools that may help.

  2. Hi Steve, Can you suggest a way to test that a WAN router is forwarding multicast packets properly? I have a multicast sender and multiple receivers that work fine in my LAN/subnets, but do not work over the internet (comcast is the SP) . Have adjusted the TTL accordingly with no luck. Someone mentioned Comcast could be blocking the traffic. Thanks, Tom

    1. Hi
      Multicast doesn’t work over the Internet for normal users. Here is a quote from stackoverflow

      In general this is not possible since multicast packets aren’t routed.

      There are some techniques to work around this (DVMRP, MOSPF and others) but they all require that you can configure all the routers between your server and the clients (or create a tunnel). There are backbone networks (Abilene, Mbone) with multicast support, but those are of most interest for universities and such. The normal consumer’s internet does not have multicast.

      Unfortunately you need point-to-point communication. But you are in good company, internet, radio and TV all do point-to-point, transmitting the same data numerous times. Quite a waste of bandwidth.

      https://stackoverflow.com/questions/3068497/udp-multicast-over-the-internet

    2. Easiest way is to configure all switches locally to pass through UDP on level 2. Then the TTL will decide whether the multicsat will be forwarded or not depending how many hops the packet did already have passed.

      Level 3 switches do sniff the join group address 224.0.0.1 and route multicast from and to all local ports that also have detection by sniffing. Some vendors call this UDP spoofing also they actively manage the multicast groups that was detected. The join group will go along with a group number which is equal to the IP port used.

      To have Multicast transmitted to other swithces the swithces must be able to announce the detected multicast groups to the others… but this is is not out-of-the-box, some vendors like Cisco or DLink offer Multicast managers for their products, and will send you the bill 🙁

  3. Pls help me.i have an iptv with my contents.how can i broadcast my contents to people around me to receive my contents signal and watch.
    How do i achieve this ?
    I don’t want my receivers to use internet to watch my contents…..only the admin will use Internet to get the contents and broadcast.What equipment do i want ?
    Where can i buy this equipments.
    Thanks.

  4. Hi I received a message that my yahoo account was tried for an unauthorised access. The message contains details of ip address – 239.241.36.51 (United Kingdom)
    When I searched for details of ip address it turns out to be a multicast ip address.

    In this case, can an individual be trying to hack my email account. Is there any way to find who tried to hack ?
    You response will be of a great help. Many thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *