We have reached to the last chapter of this course, and in this chapter I will explain to you about IGMP Snooping which is implemented on the Layer 2 MikroTik switches. Up to now, we didn’t see any switch in any of the previous chapters, but in a real network we will be using switching for sure. MikroTik switches (as well as most of other vendors) supply IGMP snooping for the multicast traffic.
But what is exactly IGMP snooping and why we need it on Layer 2. Let me show you with the following drawing:
Once the Media server is sending the multicast traffic to a multicast group, and once received by the Layer2 switch, then the switch will send it to all its ports unless the port that it has received the multicast traffic from. In this case, PCs who want and who doesn’t want the streaming will receive it. Is this something good to keep it like that? Of course not. We should use IGMP snooping so only PCs that want the stream will receive and those who doesn’t want it do not receive it. This will save a lot of resources on our switch such as CPU and memory usage. Then the result will be as the following:
As you see above, only the receiver PCs have received the multicast and the non-receiver one didn’t receive it.
Now the question is: why would the switch send anyway the multicast traffic out of all ports? And how come with IGMP snooping he doesn’t send the multicast stream anymore from the ports that are connected the hosts that are not interested in the streaming?
To answer to those 2 questions, I will do a drawing:
We have learned when we were speaking about the Multicast Layer 2 MAC address that it has a format for multicast as a destination address. In our case, it is 0100.5e01.0101. When it is received to the switch, he will check in his MAC address and see that he doesn’t know anything about the destination MAC, so it will end up sending it out of all of its ports. That’s the main reason why the switch behalf like that and all hosts will receive the multicast traffic whether they want it or not.
With IGMP snooping applied on the Layer2 switch, the switch will listen to the IGMP traffic that is happening between the router and the hosts as the following:
- When the host sends a membership report for a multicast group, then the switch will add an entry in the CAM table for the interface that is connected to that host.
- When the host sends a leave group for a multicast group then the switch removes an entry in the CAM table for the interface that is connected to the host.
This is how the switch will learn where to send the multicast traffic and where to not when using the IGMP snooping feature.
Note: when using IGMP snooping, be sure that IGMPv2 is used and not IGMPv1 because on IGMPv1 the hosts will not send any leave group messages (as we have learned) then the switch will not be able to snoop the traffic.
The end result with the IGMP snooping will be as following:
Enough of theory, let’s apply this on a LAB.