Thursday, February 13, 2014

IGMP General Query message

My last post An introduction to igmp explained what IGMP is and how it works. I kept that post simple, small and easy to follow. I had decided to explain each IGMP part in greater details in separate posts. So with this post, we will look at IGMP General Query message. Let us use the latest version of IGMP (i.e IGMPv3) in this discussion. Also please note that all the values that are available as configuration are added in 'Italic'.

A router uses General Query to collect and update group membership information for the hosts.

General Query Message contents

General queries are sent to All-Host-Multicast IP Address (224.0.0.1). IP protocol field in the IP header is set to 2 (Protocol number for IGMP). A router-alert IP option is added just after the IP header. IGMP header contains following fields:

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Type = 0x11  | Max Resp Code |           Checksum            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         Group Address                         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Resv  |S| QRV |     QQIC      |     Number of Sources (N)     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                       Source Address [1]                      |
     +-                                                             -+
     |                       Source Address [2]                      |
     +-                              .                              -+
     .                               .                               .
     .                               .                               .
     +-                                                             -+
     |                       Source Address [N]                      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

A router sets following fields in the IGMP header:
  • Type is set to 0x11
  • Max-response-code is calculated based on the configured value of 'maximum-response-time'.
  • 'checksum' is calculated by initializing the checksum field with 0.
  • Group-Address is set to 0.0.0.0
  • Reserved field is set to 0
  • S flag is set to 0
  • QRV is set to the configured 'robustness-count' value.
  • QQIC is set to the configured 'query-interval'
  • Number-of-sources is set to 0
 

General Queries during initialization

During initialization, a router sends 'Startup Query Count' number of General Queries every 'Startup Query Interval'. 'Startup Query Interval' and 'Startup Query Count' is usually configured by the administrator. Router declares itself the querier on the LAN. The Startup General Queries help in quickly collecting the group membership information. Each router usually adds a small random delay before it sends out the first Startup query. This helps in avoiding the General Query implosion on the LAN. Once the required number of General Queries are sent, router moves to the steady-state where it sends periodic General Query every 'Query Interval'.

General Queries after initialization

Querier router periodically sends General Query every 'Query Interval'. So in steady-state, there should be only one router sending out General Queries.

General Query processing in Hosts

All multicast capable Hosts receive the General Query. A host generates a group membership report with current state of all the groups it has joined, within the maximum-response-time. Hosts generate multiple group membership reports are generated if all the group information does not fit in one single packet. Please note that host will pass the maximum possible information for a group in one single packet. Take a hypothetical case, for example, a host has requested multicast traffic for a specific group from 400 different sources. All these sources for this group cannot be sent in one single membership report message so host adds the maximum possible sources (366 as per RFC 3376) in the message. Host also makes sure that it uses the same set of sources in each of its membership report message.

General Query processing in Routers

All IGMP enabled routers receive general query of other routers and run querier election. Following processing is done:
  • If this router is currently a querier:
    • If the source IP address of the received general query is lesser than the current querier address:
      • The router that sent this general query is selected as querier. Current router starts a other-querier-present-timer and stops generating General Query message.
    •  Else
      • Continue to act as querier.
  • If this router is not a querier:
    • If the source IP address of the received general query is lesser than the current querier address:
      • Update the current querier address with source IP address.
    • Update other-querier-present-timer.
When other-querier-present-timer fires, this router assumes the role of querier and start sending out General Queries.

Summary

I hope the above explanation would clarify your doubts about IGMP General Query. If you still have any questions, please leave me a comment. I will surely update the text to answer it. In my next post, I will explain Group and Group-and-Source specific queries.

3 comments:

  1. Sad to hear about your dad's demise as mentioned in earlier post.

    Thank you for summarizing your years of multicasting experience and simplifying the protocol.

    Regards,
    Poojan.

    ReplyDelete
    Replies
    1. Thanks Poojan,

      Remain tune-in for more such posts.

      Delete
  2. replica watches uk, combining elegant style and cutting-edge technology, a variety of styles of replica hublot watches, the pointer walks between your exclusive taste style.

    ReplyDelete