Multicast IGMP and PIM
I learned a little more about IGMP and PIM this morning. Hosts use IGMP (Internet Group Management Protocol) to register with the router to join or leave specific multicast groups. The router is then aware that it needs to forward the data stream destined to a specific multicast group to the registered hosts. There are currently three versions of IGMP, versions 1, 2, and 3.
- IGMPv1 – periodically sends membership queries (60-120 sec) to the all-hosts multicast address 184.108.40.206. IGMPv4 doesn’t have a mechanism defined for hosts to leave the multicast group. There for IGMP routers learn that a group is no longer available when it times out from not receiving any queries from that particular group.
- IGMPv2 – has group-specific queries that allows a router to query membership only in a single group instead for all groups. Instead of waiting for a timeout from a particular group, the last hosts that are apart of a multicast group sends the router a specific message that it’s leaving said group.
- IGMPv3 – is still being designed and proposed. Version 3 adds the ability to filter multicasts based on multicast source so that hosts can indicate that they want to receive traffic only from particular sources within a multicast group.
In order for Layer 2 devices to recognize multicast packets it uses either CGMP (Cisco Group Management Protocol) or IGMP Snooping. As you might have guessed, CGMP is a Cisco proprietary protocol designed for Cisco switches specifically. It allows you to manually configure specific switch ports for multicast traffic but this feature isn’t scalable because of that reason. IGMP Snooping allows a switch to eavesdrop on IGMP messages sent between routers and hosts, and updates its MAC address table accordingly.
PIM (Protocol Independent Multicast) is used by routers that are forwarding multicast packets. PIM uses the normal IP routing table in its multicast calculations. PIM uses what’s called distribution trees to forward multicast packets. There’s two types of trees
- Source Tree – A source tree is created for each source sending to each multicast group. The source tree has its root at the source and has branches through the network to the receivers.
- Shared Tree – Is a single tree that is shared between all sources for each multicast group. The shared tree has a single common root, called a rendezvous point (RP). Sources initially send their multicast packets to the RP, which in turn forwards data through a shared tree to the members of the group.
PIM uses two modes that determines the type of distribution tree to use including one hybrid mode:
- PIM Sparse Mode (PIM-SM) – Sparse mode uses a “pull” model to send multicast traffic. it users a shared tree and therefore requires an RP to be defined.
- PIM Dense Mode (PIM-DM) – Dense mode uses a “push” model that floods multicast traffic to the entire network. Dense mode uses source trees.
- PIN Sparse Dense Mode – uses both Sparse and Dense modes throughout its network