I'm facing a strange ipv6 behavior and I don't know how to solve it because I'm not familiar with ipv6. Maybe this behavior is normal. I hope that you will help me. ( I'm running under debian 6.0.9 with a custom kernel 3.2.58 )
machine A is "2a00:7d30:edf6:100::1" wants to ping machine B, which is "2a00:7d30:edf6:100::10". Both are on the same segment.
machine A asks for the address of machine B and I don't understand why machine B gives its global scope address instead of the local scope one ?
10:59:02.082785 IP6 2a00:7d30:edf6:100::1 > ff02::1:ff00:10: ICMP6, neighbor solicitation, who has 2a00:7d30:edf6:100::10, length 32
10:59:02.082821 IP6 2a00:7d30:edf6:100::10 > 2a00:7d30:edf6:100::1: ICMP6, neighbor advertisement, tgt is 2a00:7d30:edf6:100::10, length 32
after that machine A pings the global scope address of machine B and it works fine :
10:59:02.082927 IP6 2a00:7d30:edf6:100::1 > 2a00:7d30:edf6:100::10: ICMP6, echo request, seq 1, length 64
10:59:02.082960 IP6 2a00:7d30:edf6:100::10 > 2a00:7d30:edf6:100::1: ICMP6, echo reply, seq 1, length 64
Thank you for you help best regards Julien
NDP is for IPv6 what ARP is for IPv4: it gives you the layer-2 address (Ethernet MAC address) for the given layer-3 address (IP address). If you want to send a packet to a global IPv6 address that is on the same subnet as yourself then NDP will ask which MAC address will receive the traffic for that global address. The 'owner' of that IP address will then respond and let the sender of the discovery request know what its layer-2 MAC address is.
If you had sent a packet to a link-local IPv6 address then the NDP response would have communicated the MAC address for the link-local IPv6 address.