Definition

On Ethernet, an IPv4 multicast destination maps to a multicast MAC address with 25 fixed leading bits and the lowest 23 bits of the IP address.

Intuition

The Ethernet frame needs a link-layer destination. The mapping copies part of the group address into that destination. It leaves some bits out, so the IP layer still needs to check the exact group.

Example

Added worked mapping:

Group: 239.1.1.1
MAC:   01:00:5e:01:01:01

For an IPv4 address written a.b.c.d, the mapped MAC is 01:00:5e:(b & 0x7f):c:d, with each MAC component written in hexadecimal. The bitwise AND keeps only the lowest seven bits of b.

239.129.1.1 also maps to 01:00:5e:01:01:01: discarding the top bit of 129 leaves 1. IP filtering distinguishes the two destination groups.

Important rules

  • An IPv4 address has 32 bits; its multicast prefix fixes four, leaving 28 varying group bits.
  • A MAC address has 48 bits; this mapping fixes 25 and copies 23.
  • Five varying IP bits are omitted, so 2^5 = 32 multicast IP addresses map to each resulting MAC.
  • The fixed prefix occupies 25 bits, not merely the three bytes 01:00:5e: the next bit is also zero.
  • The mapping is deterministic; it does not require an ARP lookup for the group.

Common mistakes

  • Copying all 32 IP bits into the MAC address.
  • Assuming every multicast IP has a unique Ethernet destination.
  • Confusing an address-mapping collision with simultaneous Ethernet transmissions colliding.

Source

Lecture 01f - IPv4 Multicast, PDF pages 6-7. Calculations, formula, examples, and the ARP distinction are added study explanations.