Explicit Tracking of Group Membership and Fast Leave in IGMP

 

Before I explain what and how explicit tracking of group membership works in IGMP, let me give you a brief introduction to IGMP.

A brief introduction to IGMP:

Internet Group Management Protocol ( IGMP ) is used by end hosts and routers to exchange multicast group membership information. IGMP has two parts. One part runs in hosts that sends out IGMP group membership messages for local state. Other part runs in routers that sends out query messages and manages the group membership of the local hosts.

All IGMP enabled routers in a LAN run querier election and a single router is elected as querier. This querier router generates all types of IGMP queries on the LAN.

End hosts send unsolicited group membership reports when they join/leave a multicast channel. The querier router generates general query periodically to collect and update group membership information. The querier router also generates group-specific or group-source-specific query when an end hosts leaves a multicast channel. These queries are sent to find out if this was the last host to leave the multicast channel. For more detailed explanation of IGMP, please look at here.

In this post, we will use IGMP version 2 to explain the concepts.

Need for explicit tracking:

Please look at figure-1. Let us assume host H1 is interested in (*,G) channel and sends out unsolicited IGMP membership report. Router R1 is the querier and also the DR. Router R1 creates a forwarding entry for this channel and join the channel upstream. Let us assume a source is sending traffic for this group. Router R1 will start forwarding this traffic on LAN.

explicit-tracking-igmp-1

Now let us assume host H2 also joins (*,G) channel and sends out unsolicited IGMP membership report. Router R1 knows that it already has some one joined this channel so does not do anything except updating its own state timers. As multicast data is already being forwarded, host H2 starts receiving the same data traffic.

Now let us assume, H1 leaves the (*,G) channel by sending a leave message. When router receives the leave message, it lowers the state timer and sends out a group-specific query message on the LAN for the group ‘G’. H2 which is still subscribed to the same channel, replies with a membership report. Routers update the state timer and continue to forward the traffic.

Now let us assume, H2 leaves the (*,G) channel. Same processing happens in the router but this time no end host sends a membership report and the group timer fires. When group timer fires, router cleanup all the states. Now till the group timer fires, router R1 continues to forward multicast traffic to the LAN. What it means is that router R1 is wasting LAN bandwidth till the forwarding state times out. Can you guess how this can be avoided?

When router R1 receives a leave message from H2, if router R1 can somehow figure out that H2 is the only end hosts that is interested in channel (*,G), it can stop forwarding multicast traffic as soon as it receives a leave message from H2 instead of expiring the group timer. How can router R1 figure this out? Yeah!, You got it right. Only be explicitly tracking all the end hosts interested in each channel.

Explicit tracking of group membership in router:

A router needs to maintain some extra states to implement explicit tracking. For explicit tracking, a list of receivers (Source IP address of the IGMP group membership reports) is added for each channel. To understand how a router manage and use this state, let us look at the above IGMP message exchange again.

H1 sends an IGMP join for (*,G) channel. Router creates explicit tracking state  for (*,G) channel and add IP address of H1 in the list of receivers.

H2 sends an IGMP join for (*,G) channel. Router adds IP address of H2 in the list of receivers. So now there are two entries in the list of receivers for channel (*,G).

When H1 sends an IGMP leave, router removes the IP address of H1 from the list of receivers. Router now checks if the list of receiver is empty or not. As the list is not empty, it does not even need to generate the group-specific query because router knows for sure that H2 is still interested in channel (*,G). Did you note one of the advantages of explicit tracking? Yes, explicit tracking helps in reducing the IGMP control message traffic on LAN. Without explicit tracking, router would have sent a query message and H2 would have replied with group membership message.

Now H2 sends an IGMP leave, router removes the IP address of H2 from the list of receivers.  Router now checks if the list of receiver is empty or not. As the list is now empty, router cleans up the IGMP and data forwarding state. This stops the multicast data forwarding immediately. Router also does not generate a group-specific query message as it knows that there are no more receivers.

Advantages of Explicit Tracking:

  • It helps in reducing the IGMP control message traffic on LAN.
  • It helps in avoiding unnecessary multicast data traffic on LAN when the last member leaves the channel. This is also known as ‘Fast Leave‘.

Some caveats:

As IGMP protocol is unreliable (it runs directly over IP), there is no guarantee that a router has received every IGMP message an end hosts send. So with explicit tracking function enabled, there could be a case where router does not have the correct receiver list and may stop forwarding multicast traffic incorrectly.

IGMP protocol has defined a variable called ‘robustness count’ which indicates the robustness of a network. An end host is supposed to send any IGMP membership reports robustness count times. This usually takes care of the above problem.

Conclusion:

Most of the OEM vendors support ‘explicit tracking’ or ‘fast leave’ in IGMP. If you have not been using it, please enable it and see if this helps in your network. Please do let me know your experiences with it by leaving a comment.

Source: www.routerfreak.com