2

I am building my fundamentals on IPv6 and have realised the multicast group is nothing but FF02::1:FFXX:XXXX. Here xxx is nothing but 24-bits of Mac-address (48 bits) with simple 7th bit magic. However, if the address is based on EUI-64 then why a host can't do some maths to figure out the Mac Address by its own rather than using Neighbour discovery protocol. This way, IPv6 will be faster since there is no need to resolve IP address to mac address. I know that Microsoft doesn't like EUI-64 concept due to security. However, the logic is pretty straight forward use 24bits of Mac-address. So, anyway you are exposing 24-bits of your mac-address and the rest 24-bits is actually a manufacturing ID. So, basically I am trying to understand the rationale behind the Neighbour discovery protocol - multicast address intelligence if the address scheme will use EUI-64 with no randomness.

  • 1
    Modified EUI-64 is only one of many possible ways an IPv6 address might be assigned to a host. – Michael Hampton Aug 8 '18 at 13:08
8

... and have realized the multicast group is nothing but FF02::1:FFXX:XXXX. Here xxx is nothing but 24-bits of Mac-address ...

You are right: IF the IPv6 address is based on the MAC address a Neighbor Discovery would not be needed.

So, basically I am trying to understand the rationale behind the Neighbour discovery protocol ...

The question is: Why is the MAC address not always coded into the IPv6 address.

RFC 1970 (introducing Neighbor Discovery protocol in August 1996) names some reasons:

  • Computers having fixed IP addresses - such as servers: When replacing the network card the IP address has to be changed.
  • Anycast: This would only be possible if all computers sharing one IP address have the same MAC address.
  • IPv6 should not only work on Ethernet but also on layer-2 protocols possibly using a "MAC" address which is longer than 64 bits.

If only one computer uses an IPv6 address not reflecting its MAC address you need the ND protocol.

1

Like ARP for IPv4, ND for IPv6 is trying to resolve the layer-3 network address to the layer-2, e.g. MAC, address. Most OSes now use privacy extensions and random addressing, so the IPv6 network address is not based on the original modified EUI-64.

Also, remember that not all layer-2 protocols even use MAC addressing. The IEEE LAN protocols do, but some use 48-bit MAC addresses that are converted to EUI-64, and some (particularly the new wireless protocols used by many IOT devices that depend on IPv6 use 64-bit MAC addresses that can be directly used without conversion to the modified EUI-64). There are also other protocols, mostly used for WAN addressing that do not use MAC addressing.

IPv6 ND must be designed so that it works whether or not the network address is based on EUI-64 addressing.

ND also covers many more things than layer-3 to layer-2 address resolution. See RFC 4861, Neighbor Discovery for IP version 6 (IPv6), Section 3.1. Comparison with IPv4:

3.1. Comparison with IPv4

The IPv6 Neighbor Discovery protocol corresponds to a combination of the IPv4 protocols Address Resolution Protocol [ARP], ICMP Router Discovery [RDISC], and ICMP Redirect [ICMPv4]. In IPv4 there is no generally agreed upon protocol or mechanism for Neighbor Unreachability Detection, although the Hosts Requirements document [HR-CL] does specify some possible algorithms for Dead Gateway Detection (a subset of the problems Neighbor Unreachability Detection tackles).

The Neighbor Discovery protocol provides a multitude of improvements over the IPv4 set of protocols:

  • Router Discovery is part of the base protocol set; there is no need for hosts to "snoop" the routing protocols.
  • Router Advertisements carry link-layer addresses; no additional packet exchange is needed to resolve the router's link-layer address.
  • Router Advertisements carry prefixes for a link; there is no need to have a separate mechanism to configure the "netmask".
  • Router Advertisements enable Address Autoconfiguration.
  • Routers can advertise an MTU for hosts to use on the link, ensuring that all nodes use the same MTU value on links lacking a well-defined MTU.
  • Address resolution multicasts are "spread" over 16 million (2^24) multicast addresses, greatly reducing address-resolution-related interrupts on nodes other than the target. Moreover, non-IPv6 machines should not be interrupted at all.
  • Redirects contain the link-layer address of the new first hop; separate address resolution is not needed upon receiving a redirect.
  • Multiple prefixes can be associated with the same link. By default, hosts learn all on-link prefixes from Router Advertisements. However, routers may be configured to omit some or all prefixes from Router Advertisements. In such cases hosts assume that destinations are off-link and send traffic to routers. A router can then issue redirects as appropriate.
  • Unlike IPv4, the recipient of an IPv6 redirect assumes that the new next-hop is on-link. In IPv4, a host ignores redirects specifying a next-hop that is not on-link according to the link's network mask. The IPv6 redirect mechanism is analogous to the XRedirect facility specified in [SH-MEDIA]. It is expected to be useful on non-broadcast and shared media links in which it is undesirable or not possible for nodes to know all prefixes for on-link destinations.
  • Neighbor Unreachability Detection is part of the base, which significantly improves the robustness of packet delivery in the presence of failing routers, partially failing or partitioned links, or nodes that change their link-layer addresses. For instance, mobile nodes can move off-link without losing any connectivity due to stale ARP caches.
  • Unlike ARP, Neighbor Discovery detects half-link failures (using Neighbor Unreachability Detection) and avoids sending traffic to neighbors with which two-way connectivity is absent.
  • Unlike in IPv4 Router Discovery, the Router Advertisement messages do not contain a preference field. The preference field is not needed to handle routers of different "stability"; the Neighbor Unreachability Detection will detect dead routers and switch to a working one.
  • The use of link-local addresses to uniquely identify routers (for Router Advertisement and Redirect messages) makes it possible for hosts to maintain the router associations in the event of the site renumbering to use new global prefixes.
  • By setting the Hop Limit to 255, Neighbor Discovery is immune to off-link senders that accidentally or intentionally send ND messages. In IPv4, off-link senders can send both ICMP Redirects and Router Advertisement messages.
  • Placing address resolution at the ICMP layer makes the protocol more media-independent than ARP and makes it possible to use generic IP-layer authentication and security mechanisms as appropriate.
  • This doesn't answer the question really - NDP and RS,RA are different. Also, I am not comparing complete IPv6 with IPv4 like I know IPv6 - DAD is really great. However, I believe the only reason why ND is required is that you can have IP address not based on Mac-address. – dexterous_stranger Aug 8 '18 at 21:01
  • 1
    "NDP and RS,RA are different." No, they are all part of the IPv6 ND protocol. IPv6 ND encompasses several IPv4 protocols. You are trying to isolate ND to a small part of what ND does. It is explained in the RFC I linked: RFC 4861, Neighbor Discovery for IP version 6 (IPv6). That RFC defines IPv6 ND. Section 3. Protocol Overview makes it very clear that IPv6 ND encompasses a lot more than IPv4 ARP. – Ron Maupin Aug 8 '18 at 21:10
  • so, if we say that in a particular network, I am going to use only EUI-64 addressing scheme then why doesn't it allow to not use NDP to get Mac-address instead decode the mac-address by itself. This provision will help in the flexibility. Obviously, there is a gain out of it. – dexterous_stranger Aug 8 '18 at 21:22
  • How do you tell IPv6 that the network only uses EUI-64 addressing? There is also a difference between EUI-64 and modified EUI-64 (which is what I think you mean). You want to add complexity to the protocol, and that is something you could propose to the IETF (anyone can submit an RFC for consideration), but I'm pretty confident that IETF members, probably the authors of ND, thought about that. – Ron Maupin Aug 8 '18 at 21:27
  • @dexterous_stranger, the IPv6 auto-configuration with the modified EUI-64 is mostly not used (almost extinct) today, except for link-local addressing, although many businesses will manually configure link-local addressing for network devices (e.g. fe80::1 for Router 1) and hosts like servers that people may want to know specifically what the link-local address is. – Ron Maupin Aug 8 '18 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.