7

As I understand it, when Host Alice knows Host Bob's IPv6 address but not its MAC, Alice sends an NDP Neighbor Solicitation (NS) message to the solicited-node multicast address for Bob.

Alice knows Bob's unicast address, so why send the NS to a multicast? What purpose is served by some other hosts possibly receiving the packet?

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
Jacktose
  • 476
  • 4
  • 22
  • 1
    If Alice could send Bob a NS, then why resolve anything at all? Why not simply communicate directly with Bob? @RonMaupin's answer is spot on. I would also suggest studying up on the roll of [Layer2](http://www.practicalnetworking.net/series/packet-traveling/osi-model/#osi-layer-2) vs the roll of [Layer3](http://www.practicalnetworking.net/series/packet-traveling/osi-model/#osi-layer-3), and how they are [both important](http://www.practicalnetworking.net/series/packet-traveling/osi-model/#osi-layer-23) to move packets through a network. – Eddie Mar 25 '16 at 21:24

1 Answers1

6

I don't think you quite understand that Alice needs Bob's MAC address before she can send anything to him. What RFC 4861, Neighbor Discovery for IP version 6 (IPv6) says:

4.3. Neighbor Solicitation Message Format

Nodes send Neighbor Solicitations to request the link-layer address of a target node while also providing their own link-layer address to the target. Neighbor Solicitations are multicast when the node needs to resolve an address and unicast when the node seeks to verify the reachability of a neighbor.

When used as the equivalent of ARP in IPv4, Alice does not know Bob's MAC address, so Alice can't send anything to Bob's IPv6 address. Alice needs to resolve Bob's IPv6 address to his MAC address in order to be able to send anything to Bob. Alice does this by sending a request to the solicited node multicast address, based on the last 24 bits of Bob's IPv6 address, so it is likely that only Bob will receive the request.

Contrast this to ARP in IPv4 where ARP requests are sent to the broadcast address, interrupting all hosts on the LAN.

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
  • 1
    Ah, you made me realize I was asking the wrong question. Of course a unicast packet needs to be encapsulated in a frame with a destination MAC. Then the real questions are: What destination MAC is used for the frame containing a packet addressed to a multicast address? FFFF.FFFF.FFFF? Why not address the NS packet to the known unicast IP and put that in the broadcast/multicast frame? – Jacktose Mar 25 '16 at 21:38
  • 2
    The MAC address is the layer-2 version of the layer-3 solicited-node multicast address. IPv6 doesn't have broadcast. This uses the last 24 bits of the IPv6 unicast address, so it is likely to only go to the single host. IPv4 uses the broadcast address which goes to _all_ hosts. Remember that IPv6 hosts can, and will, have multiple IP addresses on an interface. With SLAAC, all the IPv6 addresses on an interface would have the same last 24 bits, allowing one solicited-node multicast address for all the unicast addresses on the interface, reducing the number of multicast groups it must join. – Ron Maupin Mar 25 '16 at 21:50
  • 1
    Oh, I think I'm getting it. Thanks to you Ron, and [Wikipedia](https://en.wikipedia.org/wiki/IP_multicast#Layer_2_delivery). The detail I was missing is that, at layer 2, it's multicast to 3333.xxxx.yyyy, where the last eight hex characters are the last eight hex characters of the IP. In this case, that would be FF (from the solicited-node spec) plus the last six characters of the unicast IP. Right? – Jacktose Mar 25 '16 at 21:52
  • 2
    You should also look at https://en.wikipedia.org/wiki/Solicited-node_multicast_address – Ron Maupin Mar 25 '16 at 22:19
  • @Ron I want to know with ipv6 multicast is done in l2? Not l3? Am I right? – S. M. Sep 25 '21 at 14:55
  • Multicast, in either IPv4 or IPv4, starts with a layer-3 multicast address, and on MAC addressed layer-2 protocols, that get translated to a layer-2 multicast MAC address. There are rules around how that happens for both IPv4 and IPv6. – Ron Maupin Sep 25 '21 at 14:58
  • @Ron I Understood.. That means multicast in l3 not happening. Any l3 multicast address after traslating to l2 Mac address then multicasting in l2? Am I right? – S. M. Sep 25 '21 at 15:02
  • Only for layer-2 protocols that use MAC addressing. That means the IEEE protocols (ethernet, token ring, Wi-Fi, etc.). Other layer-2 protocols (PPP, frame relay, HDLC, ATM, etc.) do not use MAC addressing. – Ron Maupin Sep 25 '21 at 15:04