Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
51
Добавлен:
11.04.2015
Размер:
22.9 Mб
Скачать

Chapter 7

Multicast Listener Discovery and

MLD Version 2

At the end of this chapter, you should be able to do the following:

Describe the purpose of the IPv6 Multicast Listener Discovery (MLD) and MLD version 2 (MLDv2) protocols.

Describe how IPv6 hosts and routers support multicast communication.

Describe the common structure of MLD and MLDv2 messages.

Describe the structure and purpose of each type of MLD and MLDv2 message.

MLD and MLDv2 Overview

Multicast Listener Discovery (MLD) is the IPv6 equivalent of Internet Group Management Protocol version 2 (IGMPv2) defined in RFC 2236 for Internet Protocol version 4 (IPv4). MLD is a set of messages exchanged by routers and hosts, allowing routers to discover the set of multicast addresses for which there is at least one listening host for each attached subnet. Like IGMPv2, MLD does not allow routers to discover the list of individual multicast listeners for each multicast address. MLD is described in RFC 2710.

MLD version 2 (MLDv2) is the IPv6 equivalent of IGMP version 3 (IGMPv3) defined in RFC 3376 for IPv4. MLDv2 performs the same functions as MLD, but it allows IPv6 hosts to register interest in source-specific multicast traffic with their local multicast routers. An MLDv2-capable host can register interest in receiving IPv6 multicast traffic from only specific source addresses (an include list) or from any source except specific source addresses (an exclude list). MLDv2 is described in RFC 3810.

IPv6 Multicast Overview

In IPv4, multicast support is optional. In IPv6, multicast support is required. This section provides an overview of IPv6 multicast concepts.

In addition to unicast and anycast support, IPv6 also provides a mechanism to send and receive IPv6 multicast traffic. IPv6 multicast traffic is sent to a single destination address but is received and processed by multiple IPv6 hosts, regardless of their location on the network. Hosts listen to a specific IPv6 multicast address and receive all packets to that address. Multicast is more efficient than IPv6 unicast for one-to-many delivery of data. Instead of having multiple unicast packets sent, only one packet is sent.

171

172 Understanding IPv6, Second Edition

The additional elements of IPv6 multicast include the following:

The set of hosts listening on a specific IPv6 multicast address is called a multicast group.

Multicast group membership is dynamic, and hosts can join and leave the group at any time.

There are no limitations to the size of a multicast group.

A multicast group can span IPv6 routers across multiple subnets. This configuration requires IPv6 multicast support on IPv6 routers and the ability for hosts to register themselves with the router. Host registration is accomplished by using MLD or MLDv2.

A host can send traffic to a multicast address without being a member of the group. These are the same elements that are used for IPv4 multicast.

IPv6 multicast addresses are defined by the address prefix FF00::/8 and can have different scopes. For more information about IPv6 multicast addresses, see Chapter 3, “IPv6 Addressing.” In contrast, IPv4 multicast addresses use the address prefix 224.0.0.0/4.

In an IPv6 multicast-enabled network, any host can send multicast traffic to any multicast address, and any host can receive multicast traffic from any multicast address regardless of its location. To facilitate this capability, the hosts and routers of the network must support multicast traffic.

Host Support for Multicast

For a host to send IPv6 multicast packets, it must do the following:

Determine which IPv6 multicast destination address to use. The IPv6 multicast address can be hard-coded by the application or obtained through a mechanism that allocates a unique multicast address.

Place the IPv6 multicast packet on the medium. The sending host must construct an IPv6 packet containing the destination IPv6 multicast address and place it on the medium. In the case of Ethernet, the destination media access control (MAC) address is created from the IPv6 multicast address as described in Chapter 3.

For a host to receive IPv6 multicast packets, it must do the following:

Inform IPv6 to receive multicast traffic. To determine the IPv6 multicast address to use, the application can create a multicast group or use an existing multicast group. In either case, the application can use a hard-coded multicast address or an address encoded in a Uniform Resource Locator (URL) string.

After the multicast address is determined, an application must inform IPv6 to receive multicast packets for a specified multicast address. For example, the application can use Windows Sockets functions to notify IPv6 of the multicast groups joined. If multiple applications use the same IPv6 multicast address, IPv6 must pass a copy of the multicast

Chapter 7 Multicast Listener Discovery and MLD Version 2

173

packet to each application. IPv6 must track which applications use which multicast addresses, as applications join or leave multicast groups. Additionally, for a multihomed host, IPv6 must track the application membership of multicast groups for each interface.

Register the multicast MAC address with the network adapter. If the network technology supports hardware-based multicasting, the network adapter is instructed to pass up packets for a specific multicast address. In the case of shared-access technologies such as Ethernet, IPv6 instructs the network adapter to listen for and pass to higher protocol layers all frames with a multicast MAC address corresponding to the IPv6 multicast address. The IPv6 protocol for Windows Vista and Windows Server 2008 uses an NdisRequest() function to instruct the network adapter to listen for and pass to higher protocol layers all frames with a specific multicast destination MAC address.

Inform local routers. The host must inform local subnet routers that it is listening for multicast traffic at a specific multicast address. The protocol that registers multicast group information for IPv6 is MLD or MLDv2. For example, the host sends an MLDv2 Multicast Listener Report message to register membership in a specific multicast group. All multicast group membership is reported, except for the multicast group for the linklocal scope, all-nodes multicast address (FF02::1).

Even though an IPv6 multicast router would never forward traffic destined to a link-local scope multicast address beyond the local link, multicast group membership for linklocal scope multicast addresses is still reported. This is done so that multicast-aware Layer 2 switches and bridges can properly forward IPv6 link-local multicast traffic to nodes on different LAN segments of a subnet.

Router Support for Multicast

To forward IPv6 multicast packets only to subnets for which there are group members, an IPv6 multicast router must be able to do the following:

Receive all IPv6 multicast traffic.

Forward IPv6 multicast traffic.

Receive and process MLD or MLDv2 Multicast Listener Report and MLD Multicast Listener Done messages.

Query attached subnets for host membership status.

Communicate group membership to other IPv6 multicast routers.

Receive All IPv6 Multicast Traffic

For shared-access technologies, such as Ethernet, the normal listening mode for network adapters is unicast listening mode. The listening mode is the way that the network adapter analyzes the destination MAC address of incoming frames to decide to process them further. In unicast listening mode, the only frames that are considered for further processing are in a

174 Understanding IPv6, Second Edition

table of interesting destination MAC addresses on the network adapter. Typically, the only interesting addresses are the MAC-level broadcast address (0xFF-FF-FF-FF-FF-FF) and the unicast address of the adapter. The unicast address is also known as the MAC, physical, or hardware address.

However, for an IPv6 multicast router to receive all multicast traffic on a subnet, it must place the network adapter connected to the subnet in a special listening mode called multicast promiscuous mode. When an adapter is placed in multicast promiscuous mode, it analyzes the Institute of Electrical and Electronics Engineers (IEEE)–defined Individual/Group (I/G) bit to determine whether the frame requires further processing. For more information on the I/G bit in IEEE 802 addresses, see Chapter 3.

The meanings of the I/G bit are the following:

If the I/G bit is set to 0, the address is a unicast (or individual) address.

If the I/G bit is set to 1, the address is a multicast (or group) address. The multicast bit is also set to 1 for the MAC-level broadcast address.

When the network adapter is placed in multicast promiscuous listening mode, any frames with the I/G bit set to 1 are passed to higher protocol layers for further processing.

Multicast promiscuous mode is different from promiscuous mode. In promiscuous mode, all frames—regardless of the destination MAC address—are passed to higher protocol layers for processing. Promiscuous mode is used by protocol analyzers, also known as network sniffers, such as Microsoft Network Monitor.

Most network adapters support multicast promiscuous mode. A network adapter that supports promiscuous mode might not support multicast promiscuous mode. Consult your network adapter documentation or manufacturer for information about whether your network adapter supports multicast promiscuous mode. Network adapters of hosts are typically not placed in multicast promiscuous mode.

Forward IPv6 Multicast Traffic

The ability to forward IPv6 multicast packets is a router capability. When multicast forwarding is enabled, IPv6 multicast packets that have a scope larger than link-local are analyzed to determine over which interfaces the packet is to be forwarded. The analysis is done by comparing the source address and destination multicast address to entries in an IPv6 multicast forwarding table. Upon receipt of an IPv6 multicast packet that has a scope larger than linklocal, the Hop Limit field in the IPv6 header is decremented by 1. If the hop limit is less than 1 after decrementing, the multicast packet is silently discarded. If the hop limit is greater than 0 after decrementing, the multicast forwarding table is checked. If an entry in the multicast forwarding table is found that matches the destination IPv6 multicast address, the IPv6 multicast packet is forwarded with its new hop limit over the appropriate interfaces.

Chapter 7 Multicast Listener Discovery and MLD Version 2

175

The multicast forwarding process does not distinguish between hosts on locally attached subnets that are receiving multicast traffic or hosts on a subnet that is downstream from the locally attached subnet across another router. In other words, a multicast router might forward a multicast packet on a subnet for which there are no hosts listening. The multicast packet is forwarded because another router on that subnet indicated that a host in its direction is receiving the multicast traffic.

The multicast forwarding table does not record each multicast group member or the number of multicast group members. It records only that there is at least one multicast group member for a specific multicast address on a specific interface or link.

Receive and Process MLD or MLDv2 Multicast Listener Report and MLD Multicast Listener Done Messages

Multicast routers receive MLD or MLDv2 Multicast Listener Report messages from all hosts on all locally attached subnets. This information is used to track multicast group membership by placing entries in the multicast forwarding table. Because multicast routers have placed their network adapters in multicast promiscuous mode, they receive all MLD Multicast Listener Report messages sent to any multicast address.

To improve the leave latency, which is the time between when the last host on a subnet has left the group and when no more multicast traffic for that group is forwarded to that subnet, an IPv6 host that might be the last member of a group on a subnet sends an MLD Multicast Listener Done message. The IPv6 router then sends multicast-address-specific queries to the group reported in the MLD Multicast Listener Done message. If it receives no response, the IPv6 router determines that there are no more group members on that subnet.

Query Attached Subnets for Host Membership Status

To compensate for the loss of Multicast Listener Report and MLD Multicast Listener Done messages, IPv6 multicast routers periodically send Multicast Listener Query messages on the local subnet. A host that is still a member of a multicast group might respond to the query with a Multicast Listener Report message.

For MLD, to keep multiple hosts on a particular subnet from sending Multicast Listener Report messages for the same group, a random response timer is used on the hosts to delay the transmission of the Multicast Listener Report message. If another host sends the message on that subnet before the response timer expires, a message is not sent by the other hosts on that subnet.

Communicate Group Membership to Other IPv6 Multicast Routers

To create multicast-enabled IPv6 networks containing more than one router, multicast routers must communicate group membership information to each other so that group members can

Соседние файлы в папке Lecture 2_10