Networking – Get IPv6 address of an IPv4 machine

arpipv4ipv6networking

Given two machines on a local network, both connected via IPv4 and IPv6, can machine A get the IPv6 of machine B if it has machine B's IPv4 address?

I presume the ARP cache should be able to provide some indication of the IPv6 address, provided traffic has passed between the two has passed to the computer over IPv6? Answers for both Windows and *nix are welcome.

Best Answer

If the mapping between the IPv4 address and MAC address is found in machine A's ARP cache, then you can guess some of machine B's IPv6 addresses (usually one or two) as follows:

  • The Link local address, which is fe80::Modified-EUI-64. The modified EUI-64 is derived from the MAC address.
  • One autoconfigured IPv6 address per subnet on the local link. Like the link local address, the bottom 64 bits of this address are the modified EUI-64.

However, note that the link local address may not be that useful (it can only be used to communicate on-link with machine A) and as for autoconfigured addresses, that function is not always enabled.

If you don't know machine A's MAC address then you can't predict anything about iuts IPv6 address(es) from its IPv4 address(es).

Related Question