1

I'm trying to figure out what commands I can use to help me map IPv6 to IPv4 addresses on a local network.

I would like to be able to do the operation both ways (IPv4 -> IPv6 and IPv6 -> IPv4) where possible.

I'm hoping there's a better solution than what I'm currently doing:

  1. Get MAC address from IPv4 address:

    arping 192.168.1.1
    
  2. Get MAC address from IPv6 address:

    ndisc6 fe80::a00:27ff:feec:bb4c wlan0
    
  3. See if they match

3

I am going to assume that by "map IPv6 to IPv4 addresses on a local network" you mean "find an IPv6 address that some host is using given an IPv4 address it is using", or vice versa.

Your method of identifying hosts by their MAC address is about as good as you're going to get.

IPv4 and IPv6 are different network protocols. There does not exist any kind of "mapping" between them. A host may use one or more IPv6 addresses, it may use one or more IPv4 addresses, it may use some of both, or none of either. They are not "connected" to each other.

  • IPv6 does include an embedding of IPv4. Some of the machines on the network might be using that. – Gilles Mar 11 '17 at 23:51
  • @Gilles the OP's question doesn't seem to be about things like ::ffff:0:0/96 and 2002::/32 – Celada Mar 12 '17 at 12:00

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.