13

I am working on a project related to networking/compression. One of the machines is Windows Vista, which already has IPv6 configured.

When I try ipconfig, I see an address in the following format: fe80::9dc8:72fa:aacd:76e2%10

But when I try to ping this machine from another with ping fe80::9dc8:72fa:aacd:76e2%10, I get the following error:

Ping request could not find host fe80::9dc8:72fa:e327:76e2%10.
Please check the name and try again.

Any ideas/comments are very helpful.

mpontillo
  • 13,559
  • 7
  • 62
  • 90
pdk
  • 535
  • 3
  • 5
  • 16

3 Answers3

28

The %10 after the address is called the scope zone. When you use link-local IPv6 addresses, the scope zone is required so that the system knows which interface to send the packet out on.

On Windows, if you issue the netsh interface ipv6 show addresses command, you'll see the addresses assigned to the system complete with their zone IDs. Notice that the zone IDs match the interface index. For example:

Interface 22: VirtualBox Host-Only Network

Addr Type  DAD State   Valid Life Pref. Life Address
---------  ----------- ---------- ---------- ------------------------
Other      Preferred     infinite   infinite fe80::15c3:6bea:aaac:a015%22

This address is scoped %22 because it is on an interface whose index is 22. Similarly, on Linux, you might see a link-local address like fe80::15c3:6bea:aaac:a016%eth0. The format of the zone ID is unique to each individual machine running IPv6, which is why it might be different if you try the ping from the other system.

For example, if you have:

System A (Windows): fe80::15c3:6bea:aaac:a015%22
System B (Linux):   fe80::15c3:6bea:aaac:a016%eth0

... and you want to ping the Linux box from the Windows box, you cannot do ping fe80::15c3:6bea:aaac:a016%eth0. But you can do ping fe80::15c3:6bea:aaac:a016%22. This is the problem. Link-local addresses can be tricky in this way.

Try specifying the correct zone ID. That is, when you do your ping fe80::9dc8:72fa:aacd:76e2%10, first do netsh interface ipv6 show addresses on the machine you are pinging from, and change the %10 to the interface index for whichever interface you want to use on the source system.

If the machine you are pinging from is Linux, you will have to do ping6 -I eth0 fe80::9dc8:72fa:aacd:76e2 (assuming the other system is on eth0), because the Linux command-line utility does not support the % way of specifying the zone (the last time I checked, anyway).

Ideally you should set up an IPv6-capable router on your network to do router advertisements, so that you can use stateless address auto-configuration (SLAAC) and get global unicast addresses. Then this will not be an issue.

Community
  • 1
  • 1
mpontillo
  • 13,559
  • 7
  • 62
  • 90
0

The number after % is the interface name. if you open the status->detail of your network interface, you will see the ipv6 link-local address, with the %xx at the end of the address, which is the index of the interface, in case you want to find the index for some application. The System Information or ipconfig might just give you different index numbers, at least on my Windows 7 Pro, which is very confusing. The description you get from the OS could also be wrong.

0

you cannot ping ipv6 addresses with the classic ping utility, only ipv4 addresses. linux has a commandline tool called ping6 to ping ipv6 addresses, windows probably has something similar. a little research told me that windows uses ping -6 for pinging ipv6 addresses.

knittl
  • 246,190
  • 53
  • 318
  • 364
  • i tried ping -6 fe80:0000:0000:0000:9dc8:72fa:e327:76e2 i get the following error ::: Unable to initialize Windows Sockets interface, error code 10047. – pdk Apr 21 '11 at 15:38
  • @pdk: so? did it work? was there an error? as mentioned in my first comment and other comments, try without the `%10`. (you did not put that in your last comment though, i wonder) – knittl Apr 21 '11 at 15:40
  • @knittl: i got this error (without %) . "Unable to initialize Windows Sockets interface, error code 10047." Any hint on this error ? – pdk Apr 21 '11 at 15:41
  • pdk, i found this [article in the mkb](http://support.microsoft.com/kb/131353/en-us) – not sure if that helps anything – knittl Apr 21 '11 at 15:43
  • But i tried from another machine and i get the Error ! "Ping request could not find host fe80:0000:0000:0000:9dc8:72fa:e327:76e2. Please check the name and try again." Looks like , the % has something to do with addressing ? – pdk Apr 21 '11 at 15:51
  • does a host with that address exist? – knittl Apr 21 '11 at 15:51
  • from wikipedia i gathered that the percent sign identifies the [zone index](http://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices), that is which interface to use when routing (lan, wifi, …). it should not matter in this case – knittl Apr 21 '11 at 15:55
  • 3
    This answer is incorrect in that the Windows `ping` utility will ping IPv6 addresses without the `-6` flag (this *forces* IPv6 to be used, if a hostname resolves to both an IPv4 and an IPv6 address, for example), but correct in that there is a separate `ping6` utility for Linux. – mpontillo Apr 22 '11 at 19:09