Multicasting on a LAN is a good place to start an investigation of multicasting at Layer 2. At Layer 2, multicast deals with media access control (MAC) frames and addresses instead of IPv4 or IPv6 packets and addresses. Consider a single LAN, without routers, with a multicast source sending to a certain group. The rest of the hosts are receivers interested in the multicast group’s content. So the multicast source host generates packets with its unicast IP address as the source and the multicast group address as the destination.
What will the MAC addresses used on the frame containing this packet be? The packet source address, the unicast IP address of the host originating the multicast content, translates easily and directly to the MAC address of the source. But what about the packet’s destination address? This is the IP multicast group address. What should be the frame’s destination MAC address that corresponds to the packet’s multicast group address?
LANs could simply use the LAN broadcast MAC address, which would make sure that the frame is processed by every station on the LAN. However, this procedure defeats the whole purpose of multicast, which is meant to limit the circulation of packets and frames to interested hosts. Also, hosts could have access to many multicast groups, which would multiply traffic to noninterested destinations. Broadcasting frames at the LAN level to support multicast groups makes no sense.
However, there is an easy way to effectively use Layer 2 frames for multicast purposes. The MAC address has a bit that is set to 0 for unicast (the LAN term is individual address) and set to a 1 to indicate that this is a multicast address. Some of these addresses are reserved for multicast groups of specific vendors or MAC-level protocols. Internet multicast applications use the range 0x01-00-5E-00-00-00 to 0x01-00-5E-FF-FF-FF. Multicast receivers, hosts running TCP/IP, listen for frames with one of these addresses when the application joins a multicast group. The host stops listening when the application terminates or the host leaves the group at the packet layer, Layer 3.
This means that three bytes, or 24 bits, are available to map IPv4 multicast addresses at Layer 3 to MAC multicast addresses at Layer 2. However, all IPv4 addresses, including multicast addresses, are 32 bits long. There are 8 IP address bits left over. How should IPv4 multicast addresses be mapped to MAC multicast addresses to minimize the chance of “collisions,” that is, two different IP multicast groups at the packet layer mapping to the same MAC multicast address at the frame layer?
First, it is important to realize that all IPv4 multicast addresses begin with the same 4 bits (1110), so LANs really only have to worry about 4 bits, not 8. Now, a LAN should not drop the last bits of the IPv4 address because these are almost guaranteed to be host bits, depending on subnet mask. But the high-order bits, the leftmost address bits, are almost always network bits, and there is only one LAN (for now).
One other bit of the remaining 24 MAC address bits is reserved (an initial 0 indicates an Internet multicast address), so the 5 bits following the initial 1110 in the IPv4 address are dropped. The 23 remaining bits are mapped, one for one, into the last 23 bits of the MAC address. An example of this procedure is shown in Figure 3.
Figure 3: Converting MAC addresses to Multicast Addresses

Note that this process means that there are 32 (25) IPv4 multicast addresses that could map to the same
MAC multicast addresses. For example, multicast IPv4 addresses 224.8.7.6 and 229.136.7.6 translate
to the same MAC address (0x01-00-5E-08-07-06). This is a
real concern, and because the host could be interested in frames sent
to both of the those multicast groups, the IP software must reject
one or the other.
This “collision” problem does not exist in IPv6 because of the way IPv6 handles multicast groups, but it is always a concern in IPv4. The procedure for placing IPv6 multicast packets inside multicast frames is nearly identical to that for IPv4, except for the MAC destination address 0x3333 prefix (and the lack of “collisions”).
Once the MAC address for the multicast group is determined, the host's operating system essentially orders the LAN interface card to join or leave the multicast group. Once joined to a multicast group, the host accepts frames sent to the multicast address as well as the host’s unicast address and ignores other multicast group’s frames. It is possible for a host to join and receive multicast content from more than one group at the same time, of course.