9. Interaction with the IGMP protocol
MOSPF uses the IGMP protocol (see [RFC 1112]) to monitor multicast group membership. In short, the Designated Router on a network periodically sends IGMP Host Membership Queries (see Section 9.1), which in turn elicit IGMP Host Membership Reports from the network's multicast group members. These Host Membership Reports are then recorded in the Designated Router's and Backup Designated Router's local group databases (see Section 9.2).
9.1. Sending IGMP Host Membership Queries
Only the network's Designated Router sends Host Membership Queries. This minimizes the amount of group membership information on the network, both in terms of queries and responses.
When a MOSPF router becomes Designated Router on a network, it checks to see that the network's IPMulticastForwarding parameter is set to data-link multicast (see Section B.2). If so, it starts the interface's IGMP polling timer. Then, whenever the timer fires (every IGMPPollingInterval seconds), the MOSPF router sends a Host Membership Query out the interface. The destination of the query is the IP address 224.0.0.1. For the format of the query, see [RFC 1112]. If/when the MOSPF router ceases to be the network's Designated Router, the IGMP polling timer is disabled and no more Hosts Membership Queries are sent.
Unusual behavior can result when multiple IP networks are assigned to a single physical network. MOSPF treats each such IP network separately, electing (possibly) a different Designated Router for each network. However, IGMP operates on a physical network basis only: when a Host Membership Query is sent, all group members on the physical network respond, regardless of their IP addresses. So unless the IPMulticastForwarding parameter is set to a value other than data-link multicast on all but one of the physical network's IP networks, excess multicast membership reporting will result.
9.2. Receiving IGMP Host Membership Reports
Received Host Membership Reports are processed by both the network's Designated Router and Backup Designated Router. It is the Designated Router's responsibility to distribute the network's group membership information throughout the routing domain, by originating group-membership-LSAs (see Section 10). The Backup Designated Router processes Reports so that it too has a complete picture of the network's group membership, enabling a quick cutover upon Designated Router failure.
An IGMP Host Membership Report concerns membership in a single IP multicast group (call it Group A). The Report is sent to the Group A address so that other group members may see the Report and avoid sending duplicates (see [RFC 1112] for details). When an IGMP Host Membership Report, sent on Network N[14], is received by a MOSPF router, the following steps are executed: (1) If the router is neither the Designated Router nor the Backup Designated Router on the network, the Report is discarded and processing stops.
(2) If the Report concerns a multicast group in the range 224.0.0.1 - 224.0.0.255, the Report is discarded and processing stops. This range of multicast groups are for local use (single hop) only, and datagrams sent to these destinations are never forwarded by multicast routers.
(3) Locate the entry for [Group A, Network N] in the local group database. If no such entry exists, create one. In any case, set the age of the entry to 0. Note that even if multiple hosts attached to Network N report membership in the same group, only a single local group database entry will be formed. See Section 8.4 for more details concerning the local group database.
(4) If the router is the network's Designated Router, and a local group database entry was created in the previous step, it may be necessary to originate a new group-membership-LSA. See Section 10 for details.
9.3. Aging local group database entries
Every local database entry has an age field. Suppose that there is a database entry for [Group A, Network N1]. The age field then indicates the length of time (in seconds) since the last Host Membership Report for Group A was received on Network N1. If the age of the entry reaches Network N1's configured IGMPTimeout value (see Section B.2), the entry is considered invalid and is removed from the database.
Note that when a router, after having been either Network N1's Designated Router or Backup Designated Router, but now being neither, will (after IGMPTimeout seconds) automatically age out all of its local group database entries associated with Network N1. For this reason, it is not necessary to purge local group database entries on OSPF interface state changes.
9.4. Receiving IGMP Host Membership Queries
If a MOSPF router has internal multicast applications, and if the applications have bound themselves to certain interfaces (using the RFC 1112 representation described in Section 5), then the MOSPF router responds to received Host Membership Queries by issuing Host Membership Reports. Identical to the operation of any IP host supporting multicast applications, the exact procedure for issuing these Host Membership Reports is specified in [RFC 1112]. Note that in this case, if the router has been elected Designated Router on a network, it must receive its own Host Membership Reports and Host Membership Queries.
If instead all of its applications have joined groups in an interface-independent fashion (using the MOSPF-specific representation described in Section 5), the MOSPF router does not respond to Host Membership Queries. Instead, the MOSPF router communicates this membership information by originating appropriate group-membership-LSAs (see Section 10.1).