What 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)
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.
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.
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.
If you are new to tcpdump then see this tcpdump tutorial
MultiCasting and MQTT-SN
The MQTT-SN protocol uses multi casting for broker/gateway discovery.
Resources:
- RPC 1112
Muticast Space Registry - Cisco White Paper -Very Good
- Technet tutorial also very good
Related Tutorials
- IP4 Addresses and address classes
- IP6 Guide
- Understanding TCP/IP ports and sockets
- TCP vs UDP -What’s The Difference?
it would be nice to have an article about the real uses of multicast on the public internet.
For instance:
– in theory you can send multicast on the public internet. In practice, no ISP would ever allow that.
– IPTV subscribers receive multicast content from the ISP. Is that over the public connection? is some sort of overlay network (VPN) used in this scenario? some special hardware maybe?
– multicast BGP exists. So there must be multicast applications over the public internet , or at least between autonomous systems. What applications are those?
– do conference applications such as Microsoft Teams use multicast? If yes, how? my home gateway can’t handle multicast routing. If no, does Teams use multicast anywhere between speaker and receiver, or it’s all unicast? Same thing for online gaming.
– afaik, multicast is used in financial industry, to report changes in market/stocks data as fast as possible to entities such as banks. What kind of network is used between a reporter such as a Stock Exchange and a bank? is this multicast carried simply over the public internet? is VPN in use here?
– for all the scenarios above, what kind of multicast addresses are used here? is all Limited Scope Addresses inside ISP networks, how is multicast carried between ISPs then?
maybe Globally Scoped Addresses are used, but how are they allocated? manually by IANA? some kind of public multicast DHCP server on a first come, first served basis?
Hi Steve, can I send a multi cast IP address to more than one reciever? For video and audio broadcast, using a Management switch, So sane IP multicast address going to two receivers. Thx kevin
A multicast will be received by any machine that has decided to listen on that address. It is like a broadcast except by default all clients will listen for broadcasts and so there is nothing to be done on the client.
Does that make sense.
MQTT_SN uses multicast for broker discovery so if you want to see an implementation take a look here
http://www.steves-internet-guide.com/mqtt-sn-gateway-advertisement-and-discovery/
rgds
Steve
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.
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.
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
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
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 🙁
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.
Hi
Take a look here
https://www.instructables.com/id/Multicast-TV-Using-Raspberry-Pi-3-WinTV-HVR-955Q/
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.
Sorry but I can’t help as I’m not up to date with hacking attacks.
rgds
steve