Multicast
On layer 3, we use class D range (assigned by IANA) (224.0.0.0 – 239.255.255.255).
On layer 2, we also have a reserved prefix for multicast traffic. The 24-bit MAC address prefix 01-00-5E is reserved for layer 2 multicast. Unfortunately only half of the MAC addresses in this 24-bit prefix can be used for multicast, this means we only have 23 bits of MAC address space to use for multicast.
M-cast MAC: 00000001:00000000:01011110:Xxxxxxxx:xxxxxxxx:xxxxxxxx x - 23 bits
M-cast IP: 1110xxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx x - 28 bits
M-Cast MAC address:
A specific subset of MAC addresses is reserved for mapping the IP multicasting addresses to data link layer addresses. In Ethernet, the multicast MAC addresses that correspond to multicast IP addresses range from 01:00:5e:00:00:00 to 01:00:5e:7f:ff:ff.
224.0.0.1 - 01:00:5e:00:00:01
239.1.1.1 - 01:00:5e:00:00:01
224.13.1.2 - 1110 0000 0000 1101 0000 0001 0000 0010
225.13.1.2 - 1110 0001 0000 1101 0000 0001 0000 0010
239.13.1.2 - 1110 1111 0000 1101 0000 0001 0000 0010
224.141.1.2 - 1110 0000 1000 1101 0000 0001 0000 0010
13 - 00001101 141 - 10001101 - 128 + 13
IGMPv1
IGMP (Internet Group Management Protocol) version 1 is the first version that hosts can use to announce to a router that they want to receive multicast traffic from a specific group. It’s a simple protocol that uses only two messages:
Membership report - when host wants to join a multicast group Membership query - router periodically sends to a 224.0.0.1 (60 sec)- expects report from hosts
If no report received, after timer expires router will stop sending m-cast traffic If report received, router will refresh expiry timer.
IGMPv2
Additional messages in IGMPv2:
Leave group messages: when a host no longer wants to listen to a multicast group address then it will report to the router that it has stopped listening.
Group-specific membership query: the router can now send a membership query for a specific group address. When the router receives a leave group message, it will use this query to check if there are still any hosts interested in receiving the multicast traffic.
MRT (Maximum Response Time) field: a new field in query messages. It specifies how much time hosts have to respond to the query.
Querier election process: when there are two routers in the same subnet, then only one of them should send query messages. The election ensures only one router becomes the active querier. The router with the lowest IP address becomes the active querier.
IGMPv3
IGMP version 3 adds support for “source filtering”. IGMP version 1 and version 2 allow hosts to join multicast groups but they don’t check the source of the traffic.
ip igmp join-group source 239.1.1.1 source 192.168.1.1
IGMP Snooping
Once IGMP snooping is enabled, the switch will detect multicast enabled routers and it does so by listening to the following messages:
- IGMP General Query (0100.5e00.0001)
- OSPF (0100.5e00.0005 and 0100.5e00.0006)
- PIM version 1 and HSRP (0100.5e00.0006)
- PIM version 2 (0100.5e00.000d)
- DVMRP (0100.5e00.0004)
When the switch detects a multicast enabled router then it will add the corresponding entry in the CAM table.
#show ip igmp snooping querier
Vlan IP Address IGMP Version Port
-------------------------------------------------------------
1 192.168.1.254 v2 Gi0/1
SW1#show ip igmp snooping groups
Vlan Group Version Port List
---------------------------------------------------------
1 224.0.1.40 v2 Gi0/1
1 239.1.1.1 v2 Gi0/1, Gi0/2
Snooping requires querier router(router interface with m-case enabled) If we don’t have it we need to configure L3 VLAN interface on the switch
SW1(config)#interface vlan 1
SW1(config-if)#ip address 192.168.1.253 255.255.255.0
SW1(config)#ip igmp snooping querier