multicast MAC address

multicast MAC address

MAC addresses have the following rules:

  1. Consists of 48-bit code.
  2. OUI identifies the vendor.
  3. It is written by the vendor at the time of shipment, and in principle the user does not operate it.
  4. As a general rule, devices with the same MAC address do not exist.
  5. 48bit is divided into 6 blocks by 8bits with ":" and expressed in hexadecimal. For example "00:00:0C:A6:38:D8"

* You may separate with "-" or ".".

 Among bits in an octet, the most significant bit is called MSB (Most Significant Bit) and the least significant bit is called LSB (Least Significant Bit). I/G bits are called “Individual/Group”.

 An address whose I/G bit in the least significant bit of the first octet is "1" is a multicast MAC address.

 The broadcast MAC address is "FF:FF:FF:FF:FF:FF", all bits of 48 bits are "1", and the I/G bit is "1", so the multicast MAC address You can think of it as a special form.

 IEEE specifies that the multicast MAC address corresponding to the multicast IP address should start with the next 25 bits.

 0000 0001 0000 0000 1001 1110 0

 In hexadecimal, "01:00:5E" and the 25th bit is a "0", followed by the remaining 23 bits to map from the low order 23 bits of the Maritycast IP address.

 For example, the multicast IP address corresponding to the multicast IP address "224.0.0.5" is mapped as shown below.

 The multicast IP address corresponding to the multicast IP address "224.0.0.5" is "01:00:5E:00:00:05".

 There is a caveat here. This means that the 5 bits between "1110" and the lower 23 bits (beige colored bits in the figure above) are ignored.

 Multicast IP addresses start with "1110". This is fixed even if it is ignored, so there is no problem, but by ignoring the beige colored part, the correspondence between the multicast IP address and the multicast MAC address will not be a one-to-one correspondence. increase.

 For example, the multicast MAC address corresponding to "224.0.0.5" and "224.128.0.5" is the same multicast IP address "01:00:5E:00:00:05".

 Since 5 bits will be ignored, there will be 2 5 =32 multicast IP addresses associated with the same multicast MAC address.

Duplicate multicast MAC addresses occur, so adjustments are required on the application side.