Why do you need IPv6 Neighbor Solicitation to get the MAC address?

Every node automatically generates a link-local address, but:

  • That address might not be generated with the EUI-64 format specified in RFC 2464. IPv6 addresses may also be cryptographically generated addresses (RFC 3972), temporary privacy addresses (RFC 4941), or in modern operating systems, stable privacy addresses (RFC 7217).

  • An address that looks like it has an EUI-64 interface ID might not actually correspond to the indicated MAC address due to explicit configuration by an administrator.

Because you can’t just “convert the address back” to a MAC address, you must send a Neighbor Solicitation to determine the MAC address.

There are other reasons why Neighbor Solicitations are necessary, as well. Some of these are:

  • Duplicate address detection (RFC 4862). It’s possible that some other host may have (rightly or wrongly) claimed an address that a host wants to use.
  • Neighbor unreachability detection. A lack of response to a Neighbor Solicitation is one indicator that the neighbor is unreachable.

Books are all well and good, but very out of date books may not be so useful. Even IPv6 has had significant revisions in the last ten years. The best source of truth is the relevant RFCs, both the original ones and any that are marked as having updated or obsoleted them. RFCs are specified in sufficient detail to allow conforming implementations to be written. You can learn all the details of neighbor discovery by reading RFC 4861.

Leave a Comment