Skip to main content

7. Router State Diagram

7. Router State Diagram

Router behavior is more formally specified by the state transition diagrams below.

A router may be in one of two possible states with respect to any single attached network:

  • "Querier", when this router is designated to transmit IGMP Membership Queries on this network.

  • "Non-Querier", when there is another router designated to transmit IGMP membership Queries on this network.

The following three events can cause the router to change states:

  • "query timer expired" occurs when the timer set for query transmission expires.

  • "query received from a router with a lower IP address" occurs when an IGMP Membership Query is received from a router on the same network with a lower IP address.

  • "other querier present timer expired" occurs when the timer set to note the presence of another querier with a lower IP address on the network expires.

There are three actions that may be taken in response to the above events:

  • "start general query timer" for the attached network.

  • "start other querier present timer" for the attached network [Other Querier Present Interval].

  • "send general query" on the attached network. The General Query is sent to the all-systems group (224.0.0.1), and has a Max Response Time of [Query Response Interval].

                                      --------------------------------
_______|________ gen. query timer |
--------- | | expired |
| Initial |---------------->| | (send general query, |
--------- (send gen. q., | | set gen. q. timer) |
set initial gen. q. | |<----------------------
timer) | Querier |
| |
-----| |<---
| | | |
| |________________| |
query received from a | | other querier
router with a lower | | present timer
IP address | | expired
(set other querier | ________________ | (send general
present timer) | | | | query,set gen.
| | | | q. timer)
| | | |
---->| Non |----
| Querier |
| |
| |
---->| |----
| |________________| |
| query received from a |
| router with a lower IP |
| address |
| (set other querier |
| present timer) |
---------------------------

A router should start in the Initial state on all attached networks, and immediately move to Querier state.

In addition, to keep track of which groups have members, a router may be in one of four possible states with respect to any single IP multicast group on any single attached network:

  • "No Members Present" state, when there are no hosts on the network which have sent reports for this multicast group. This is the initial state for all groups on the router; it requires no storage in the router.

  • "Members Present" state, when there is a host on the network which has sent a Membership Report for this multicast group.

  • "Version 1 Members Present" state, when there is an IGMPv1 host on the network which has sent a Version 1 Membership Report for this multicast group.

  • "Checking Membership" state, when the router has received a Leave Group message but has not yet heard a Membership Report for the multicast group.

There are six significant events that can cause router state transitions:

  • "v2 report received" occurs when the router receives a Version 2 Membership Report for the group on the interface. To be valid, the Report message must be at least 8 octets long and must have a correct IGMP checksum.

  • "v1 report received" occurs when the router receives a Version 1 Membership report for the group on the interface. The same validity requirements apply.

  • "leave received" occurs when the router receives an IGMP Group Leave message for the group on the interface. To be valid, the Leave message must be at least 8 octets long and must have a correct IGMP checksum.

  • "timer expired" occurs when the timer set for a group membership expires.

  • "retransmit timer expired" occurs when the timer set to retransmit a group-specific Membership Query expires.

  • "v1 host timer expired" occurs when the timer set to note the presence of version 1 hosts as group members expires.

There are six possible actions that may be taken in response to the above events:

  • "start timer" for the group membership on the interface - also resets the timer to its initial value [Group Membership Interval] if the timer is currently running.

  • "start timer*" for the group membership on the interface - this alternate action sets the timer to [Last Member Query Interval] * [Last Member Query Count] if this router is a Querier, or the [Max Response Time] in the packet * [Last Member Query Count] if this router is a non-Querier.

  • "start retransmit timer" for the group membership on the interface [Last Member Query Interval].

  • "start v1 host timer" for the group membership on the interface, also resets the timer to its initial value [Group Membership Interval] if the timer is currently running.

  • "send group-specific query" for the group on the attached network. The Group-Specific Query is sent to the group being queried, and has a Max Response Time of [Last Member Query Interval].

  • "notify routing +" notify the routing protocol that there are members of this group on this connected network.

  • "notify routing -" notify the routing protocol that there are no longer any members of this group on this connected network.

The state diagram for a router in Querier state follows:

                              ________________
----------------------------| |<-----------------------
| | |timer expired |
| timer expired| |(notify routing -, |
| (notify routing -)| No Members |clear rxmt tmr) |
| ------->| Present |<------- |
| | | | | |
|v1 report rec'd | | | | ------------ |
|(notify routing +, | |________________| | | rexmt timer| |
| start timer, | | | | expired | |
| start v1 host | v2 report received| | | (send g-s | |
| timer) | (notify routing +,| | | query, | |
| | start timer)| | | st rxmt | |
| __________|______ | _____|_|______ tmr)| |
| | |<------------ | | | |
| | | | |<----- |
| | | v2 report received | | |
| | | (start timer) | | |
| | Members Present |<-------------------| Checking | |
| ----->| | leave received | Membership | |
| | | | (start timer*, | | |
| | | | start rexmt timer,| | |
| | | | send g-s query) | | |
| | --->| |------------------->| | |
| | | |_________________| |______________| |
| | |v2 report rec'd | | | |
| | |(start timer) | |v1 report rec'd |v1 report rec'd |
| | ---------------- |(start timer, |(start timer, |
| |v1 host | start v1 host timer) | start v1 host |
| |tmr ______________V__ | timer) |
| |exp'd | |<---------------------- |
| ------| | |
| | Version 1 |timer expired |
| | Members Present |(notify routing -) |
| | |-------------------------------------------
| | |<--------------------
------->|_________________| v1 report rec'd |
| v2 report rec'd | | (start timer, |
| (start timer) | | start v1 host timer) |
----------------- --------------------------

The state diagram for a router in Non-Querier state is similar, but non-Queriers do not send any messages and are only driven by message reception. Note that non-Queriers do not care whether a Membership Report message is Version 1 or Version 2.

                              ________________
| |
| |
timer expired| |timer expired
(notify routing -)| No Members |(notify routing -)
--------->| Present |<---------
| | | |
| | | |
| | | |
| |________________| |
| | |
| |report received |
| |(notify routing +,|
| | start timer) |
________|________ | ________|________
| |<--------- | |
| | report received | |
| | (start timer) | |
| Members Present |<-------------------| Checking |
| | g-s query rec'd | Membership |
| | (start timer*) | |
---->| |------------------->| |
| |_________________| |_________________|
| report received |
| (start timer) |
-----------------