#readwise
# Introduction to Multicast

## Metadata
- Author: [[Rene Molenaar]]
- Full Title: Introduction to Multicast
- URL: https://networklessons.com/multicast/introduction-to-multicast
## Highlights
There are three types of traffic that we can choose from for our networks:
- Unicast
- Broadcast
- Multicast
We use unicast if you want to send a message from one source to one destination. If you want to send a message from one source to everyone, we use broadcast. What if we want to send a message from one source to a group of receivers? That’s when we use *multicast.* ([View Highlight](https://read.readwise.io/read/01hy30nrssesszrex7hbdnckc6))
---
multicast only supports UDP traffic, so we can’t use the advantages of TCP, like windowing and acknowledgments. ([View Highlight](https://read.readwise.io/read/01hy30sm5qh110fs9y2qdhx7da)) ^a1txzm
---
If our video server would broadcast its traffic, then the load on the video server will be reduced. It’s only sending the packets once. The problem, however is that everyone in the broadcast domain will receive it…whether they like it or not. Another issue with broadcast traffic is that routers do not forward broadcast traffic. It will be dropped. ([View Highlight](https://read.readwise.io/read/01hy30tm5619qzz5w5bwbvr2mh))
---
Multicast traffic is very efficient. This time, we only have two hosts that are interested in receiving the video stream. The video server will only send the packets once. The switches and routers will only forward traffic to the hosts that want to receive it. This reduces the load of the video server and network traffic in general. ([View Highlight](https://read.readwise.io/read/01hy30vg31f29kzczhacnz06c3))
---
What about the Internet? Since multicast is so much more efficient than unicast, large companies like Netflix and YouTube must use this to stream videos, right? Unfortunately, multicast on the Internet has never really been implemented. These large video companies use LOTS of unicast traffic to deliver videos to their customers. The only place where you might see multicast on the Internet is your local ISP. They typically use multicast for IPTV to deliver video to their own customers. ([View Highlight](https://read.readwise.io/read/01hy30wc26stevhkdtkac4rmr3)) ^hfjlzx
---
Multicast is efficient but it doesn’t work “out of the box”. There are a number of components that we require:
- First of all, we use a designated range of IP addresses that is exclusively used for multicast traffic. We use the class D range for this: 224.0.0.0 to 239.255.255.255. These addresses are only used as destination addresses, not as source addresses. The source IP address will be the device sending the multicast traffic, for example, the video server.
- We also require applications that support multicast. A simple example is the [VLC mediaplayer](http://www.videolan.org/vlc/index.html), it can be used to stream and receive a video on the network.
When a router receives multicast traffic, somehow, it has to know if anyone is interested in receiving the multicast traffic. Take a look at the picture below:
![[host-wants-multicast-traffic.png|host wants multicast traffic]]
Above, you can see the router is receiving the multicast traffic from the video server. It doesn’t know *where* and *if* it should forward this multicast traffic. We need some mechanism on our hosts that tells the router when they want to receive multicast traffic. We use the [IGMP (Internet Group Management Protocol)](https://networklessons.com/multicast/igmp-version-1) for this. Hosts that want to receive multicast traffic will use the IGMP protocol to tell the router which multicast traffic they want to receive. ([View Highlight](https://read.readwise.io/read/01hy3107cexf0n4xqwryy89e2k)) ^eooycq
---
IGMP helps the router to figure out on what interfaces it should forward multicast traffic, but what about switches? Take a look at the following image:
![[switch-wants-to-forward-multicast-traffic.png|switch wants to forward multicast traffic]]
Our router knows it has to forward the multicast traffic since a host used IGMP to tell the router it is interested. Once the multicast traffic arrives at the switch, we have another problem. Switches learn MAC addresses by looking at the source address of an Ethernet frame. Since we use multicast addresses only for the destination, how is the switch supposed to learn where to forward multicast traffic to?
To help the switch figure out where to forward multicast traffic, we can use [IGMP snooping](https://networklessons.com/multicast/igmp-snooping). The switch will “listen” to IGMP messages between the host(s) and router to figure out where it should forward multicast traffic. There’s also a Cisco proprietary protocol called CGMP (Cisco Group Management Protocol) that can be used between switches and routers. The router will then be able to inform the switch where to forward multicast traffic. Unlike IGMP snooping, CGMP isn’t used much. ([View Highlight](https://read.readwise.io/read/01hy311tks36kxyx0vggy06syc))
^go5r4v
---