1.6 Multicast on the LAN
Throughout this book we focus primarily on the protocols that enable multicast packets to be forwarded within and between different domains. However, to provide a complete picture, we should examine what occurs on the link, or local area network (LAN), on which group members reside.
When a host wants to become a multicast receiver, it must inform the routers on its LAN. The Internet Group Management Protocol (IGMP) is used to communicate group membership information between hosts and routers on a LAN.
To join a multicast group that is not already being forwarded on its LAN, a host sends an IGMP Report to a well-known multicast group. All IGMP-enabled routers on that LAN are listening to this group. Upon hearing a host's IGMP Report for a multicast group, G, one of the routers on the LAN uses a multicast routing protocol to join that group. In the case of PIM-SM, this router sends a (*,G) Join toward the RP for the specified group.
IGMP versions 1 and 2 allow a host to specify only the group address that it is interested in receiving. IGMP version 3 allows a host to express interest in only specified sources of a group, triggering an (S,G) Join by a PIM-SM router on the LAN. This is a key component of Source-Specific Multicast, which we examine in section 1.7.
A host must support IGMP in order to receive multicast packets. The version of IGMP supported is a function of the host's operating system. For example, unless otherwise modified, PCs running Windows 95 support IGMPv1. Likewise, PCs running Windows 98 or 2000 support IGMPv2, while IGMPv3 is available in Windows XP.
1.6.2 IGMP Proxying
When a host reports interest in a multicast group from a source outside its LAN, it is the responsibility of a router on the LAN to join that group using a multicast routing protocol like PIM-SM. However, some routers do not support any multicast routing protocols. Low-end routers and legacy equipment such as dialup remote access servers (RAS) are examples of routing devices that sometimes do not support any multicast routing protocols.
Nearly all routing devices support IGMP. A common technique used in routers that do not support any multicast routing protocols is IGMP proxying. A router that hears an IGMP Report from a host simply relays that IGMP message to an upstream router that does support a multicast routing protocol. IGMP messages simply "hop over" a local router and reach a router that is capable of joining the group via a protocol like PIM-SM. IGMP proxying lowers the bar that low-end routing devices need to meet in order to deliver multicast.
1.6.3 Layer 3 to Layer 2 Mapping
The layers of the OSI reference model that we are most concerned with in this book are the data link, or layer 2, and the network, or layer 3. Here we focus on Ethernet, by far the most common layer 2 LAN technology. All layer 3 packets, in this case IP, are encapsulated with an Ethernet header and trailer and transmitted onto a LAN as an Ethernet frame.
All devices on the Ethernet have a unique 48-bit Media Access Control (MAC) address. To speak to one another, devices on the LAN keep a table that maps unicast IP addresses to MAC addresses. When packets are encapsulated in frames, the destination MAC address in the frame header is set to the MAC address corresponding to the IP address in the header of the IP packet.
IP multicast packets are destined to class D group addresses, which do not correspond with a single end host. Likewise, the MAC address used for multicast packets cannot be the address of a single station on the LAN. A special range of MAC addresses must be used for multicast.
The high order four bits of the first octets of class D addresses are always the same. Thus 28 bits may be varied in a multicast IP address. To provide a 1:1 mapping between MAC addresses and multicast IP addresses, the MAC address range must allow up to 28 bits to be varied.
The MAC address range that is assigned for multicast is only 24 bits long. One other bit in the address range is reserved, so that leaves only 23 bits of a MAC address to map to 28 bits of an IP address. As legend has it, Steve Deering, the father of multicast and a graduate student at the time, had only enough funding to purchase a 24-bit block of MAC addresses from IEEE. Because of this, every multicast MAC address corresponds to 32 different IP addresses.
As we see in Figure 1-7, the first 24 bits of a MAC address corresponding to an
Figure 1-7 Layer 3 to layer 2 address mapping
Collisions caused by oversubscription are handled by the IP stack of the receiving host. That is, a host interested in receiving 18.104.22.168 also receives Ethernet frames containing packets for 22.214.171.124 if they are on the LAN. After decapsulating the Ethernet frame and discovering the IP address of the unwanted packet, the host discards the packet.
1.6.4 Layer 2 Switches
Ethernet switches have replaced hubs as the most popular way to connect hosts on a LAN because they inexpensively create a separate collision domain on each port. That is, while hubs transmit all traffic out all ports, switches transmit traffic only out a port that is destined for the station connected to that port. Frames destined for MAC addresses that a switch does not know the owner of are broadcast out all switch ports. Multicast packets fit in this category and, accordingly, are broadcast out all ports by a switch.
Flooding multicast packets out all switch ports wastes valuable network resources. Also, hosts that receive this unwanted traffic must use processing cycles to examine packets that they will eventually discard. IGMP snooping is one way to eliminate this inefficiency. Switches that support IGMP snooping can usurp responsibilities not usually associated with switches. An IGMP snooping switch looks at IGMP messages to determine which hosts are actually interested in receiving multicast traffic. Multicast packets are forwarded only out ports that connect to a host that is an interested listener of a specified group.
Cisco Group Management Protocol (CGMP) is a proprietary mechanism that provides the same functionality as IGMP snooping. CGMP enables Cisco System routers and switches to communicate with one another to determine which hosts are interested in each multicast group. CGMP works only in an environment of Cisco routers and Cisco switches. No other router or switch vendors are known to provide implementations of CGMP.
In switched environments that connect hosts to routers, IGMP snooping and CGMP generally provide a sufficient solution for eliminating broadcast traffic. However, not all switched environments involve IGMP. Switches are commonly used to connect routers together across multiaccess interfaces, forming transit LANs.
When only routers are connected together on a transit LAN, multicast routing protocols, not IGMP, are involved in controlling transit multicast traffic. The switch does not look at the multicast routing protocol packets, so there is no way to see which port connects to a router that has joined a group. There has been some discussion of "PIM snooping," but it would be very difficult to implement because PIM is far more complex than IGMP.
The only way to prevent multicast traffic from being flooded out all switched ports in this environment is to change the logical topology with virtual LANs (VLANs). VLANs can be used to create a point-to-point logical interface, or subinterface, between every router connected to the switch. By changing the logical topology from broadcast to point-to-point, multicast traffic is sent only to routers interested in receiving it. However, using VLANs to create this kind of logical topology can force routers to perform more replication out these logical interfaces and consume more bandwidth over the physical interface than the logical interfaces use. Additionally, creating all of these VLANs can be a significant administrative and operational burden.