Multicast Flooding

Because no specific host is associated with the multicast MAC address in the content-addressable memory (CAM) table, multicast traffic is flooded throughout the VLAN. (See Figure 9-1.) This type of setup creates unnecessary traffic on the VLAN and wastes precious network resources. Each host machine has to process the packet as it arrives on the interface card, thus, wasting CPU cycles. If the volume of the multicast stream is high enough, it could potentially cause other relevant and control traffic to be dropped. This problem worsens if the VLAN is extended to various other campus switches.

Figure 9-1. Each Host Receives the Multicast Stream


One easy method to address this problem is to manually map the ports that require the multicast traffic to the multicast MAC address. For example, Host2 on port 10/1 is interested in receiving the multicast stream as shown in Figure 9-2.

Figure 9-2. Multicast Traffic Is Sent Only to Host2


To manually configure ports to receive the multicast stream, it is important to know how to derive the Layer 2 MAC address for the multicast group The first 4 bits of the 32-bit address are defined as a Class D address (1110); now, only 28 bits of meaningful address space remain. A Layer 2 MAC address has 48 bits. The first 25 bits are static (01005e), leaving only 23 bits for the IP address to be placed. Because there are 28 bits of meaningful IP addresses, 5 bits must be thrown away to allow the remaining 23 bits to fit. As a result of the 5 bits thrown away, 32 multicast IP addresses (2^5) are mapped to a single Layer 2 MAC address.

The calculation in Figure 9-3 shows how to derive the Layer 2 MAC address for multicast group

Figure 9-3. Calculating MAC Address for Multicast Group


Port 10/1 is configured to accept the stream on VLAN 3. (See Example 9-2.) All other ports should not receive this traffic anymore because the CAM table has only one port associated with the multicast traffic. After the configuration change, the show mac command shows port 10/1 as the recipient for the multicast traffic.

Example 9-2. Creating a Static CAM Entry

Switch1 (enable) set cam static 01-00-5e-01-01-01 10/1 3

Static multicast entry added to CAM table.

Switch1 (enable) show mac 10/1

Port     Rcv-Unicast          Rcv-Multicast        Rcv-Broadcast

-------- -------------------- -------------------- --------------------

10/1                        2                    5                    0

Port     Xmit-Unicast         Xmit-Multicast       Xmit-Broadcast

-------- -------------------- -------------------- --------------------

10/1                        1                13766                    0

Port     Rcv-Octet            Xmit-Octet

-------- -------------------- --------------------

10/1                      504             20684066

Realistically, manually associating ports with specific multicast streams is not a viable option. Each time a new multicast stream is generated, manual intervention is required to configure specific ports to receive the traffic. In a different situation, if Host3 now wants to receive traffic or Host2 no longer wants the traffic, this, too, must be manually configured. Multicast support on a switch needs to be efficient, dynamic, and relatively easy to implement.