Question

In RFC2464, the prefix of ethernet IPv6 multicast address is defined as 33:33, but as I captured some packets in Wireshark, I found this prefix is actually implemented as 33:33:ff.

For example, when sending an ICMPv6 Neighbour Solicitation packet, the destination mac address I captured is 33:33:ff:f8:67:0d, and the last bits of destination IP address are ...:d3f5:31f8:670d. As RFC2464, the mac address should be 33:33:31:f8:67:0d.

So is this RFC deprecated? How should I implement it in my program?

Was it helpful?

Solution

You are looking at a solicited node multicast address. You are trying to convert directly from the IPv6 unicast address of a node to an ethernet MAC address, but you are missing a step in between. To get the multicast MAC address you first convert the node's unicast IPv6 address to the solicited node multicast IPv6 address as described in section 2.7.1 of RFC2373. Then you get the multicast MAC address that corresponds to that IPv6 multicast address as described in section 7 of RFC2464.

An example: Let's start with IPv6 address 2001:db8::d3f5:31f8:670d. The corresponding solicited node IPv6 multicast address is ff02:0:0:0:0:1:fff8:670d. Then you apply the algorithm to get the multicast MAC address of 33:33:ff:f8:67:0d.

In applications you shouldn't need to worry about neighbour discovery though. That is the operating system's job. When using multicast in an application you should just bind/subscribe to the IPv6 multicast address and the operating system will deliver all packets destined for that multicast address to your application. If you are doing multicast over different LANs this will involve other protocols like MLDv2 (Multicast Listener Discovery version 2) between the host and the multicast router and multicast routing protocols like PIM-SM (Protocol Independent Multicast - Sparse Mode) between the multicast routers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top