中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

8.2.1 Multicast Listener Discovery (MLD)

Routers need to know which multicast groups the hosts on a link want to receive. When an application on a host joins a group, the host must inform the router that it is interested in that group. Multicast Listener Discovery (MLD) (RFC 2710 [RFC2710]) is the protocol used between hosts and routers on a link for this purpose.

MLD is the equivalent to IGMPv2, defined for IPv4. MLD messages are carried in ICMPv6 packets. There are three different MLD messages, namely query, report and done. These have the ICMPv6 values 130, 131 and 132, respectively. MLD also uses the IPv6 Router Alert header so that routers can easily know that they should check the content of the IP packets. Furthermore, since the protocol is used on the local link, IPv6 link-local addresses are used as source addresses. Consequently, the hop limit is 1.

On a given link, there should be only one MLD querier. If a router sees MLD queries from a router with a numerically lower address, it will not sending queries of its own, unless there is a long period with no more queries. In this way, the router with the numerically lowest address will act as MLD querier. Note that which router is the MLD querier is independent of which router actually forwards multicast packets to or from the link.

The MLD querier periodically sends general queries (ICMPv6 type 130) to the all-nodes multicast group (FF02::1). Hosts will then with some small delays, send replies (ICMPv6 type 131) for each of the groups they are interested in. A reply for a group is sent to the group (the destination address in the IPv6 header will be the group address). Since the Router Alert is present, it is easy for routers to separate them from normal multicast traffic for the group. Also, the hop limit is set to 1, so the packets will never be forwarded. If multiple hosts on a link are interested in the same group, they will receive each other’s MLD replies. If a host sees another host reply, it will suppress its own so that the router doesn’t receive duplicates.

When an application joins a multicast group it wants to start receiving multicast immediately. Because of this, a host should immediately send a report when it is interested in a new group, rather than wait for the next periodical query.

When a host is no longer interested in a group, it should send a done message (ICMPv6 type 132). This is sent to the all-routers multicast group (FF02::2). Due to the suppression of replies mentioned earlier, the router cannot know whether there are other hosts that are still interested. To check whether there are any other hosts interested, the MLD querier will send a specific query for that address. The specific query is sent to the group address. If no hosts respond with a reply, the router will then assume there is no more interest in the group. Note that the specific query is repeated so that a single lost query will not disrupt the service. Note that if for some reason a host does not send a done message (it might be disconnected or lose power), the router will still learn that there are no listeners, but this will take significantly longer.