1 |
Paul Hartman wrote: |
2 |
> On Fri, Jan 6, 2012 at 3:09 PM, Michael Mol <mikemol@×××××.com> wrote: |
3 |
>> Grant Edwards wrote: |
4 |
>>> I've enabled ipv6 support in my kernel and it appears to be working on |
5 |
>>> the "lo" interface: |
6 |
>>> |
7 |
>>> # ip -6 addr show lo |
8 |
>>> |
9 |
>>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 |
10 |
>>> inet6 ::1/128 scope host |
11 |
>>> valid_lft forever preferred_lft forever |
12 |
>>> |
13 |
>>> # ping6 -c3 ::1 |
14 |
>>> |
15 |
>>> PING ::1(::1) 56 data bytes |
16 |
>>> 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.022 ms |
17 |
>>> 64 bytes from ::1: icmp_seq=2 ttl=64 time=0.021 ms |
18 |
>>> 64 bytes from ::1: icmp_seq=3 ttl=64 time=0.021 ms |
19 |
>>> |
20 |
>>> --- ::1 ping statistics --- |
21 |
>>> 3 packets transmitted, 3 received, 0% packet loss, time 1998ms |
22 |
>>> rtt min/avg/max/mdev = 0.021/0.021/0.022/0.003 ms |
23 |
>>> |
24 |
>>> And the other interfaces all have link-local addresses: |
25 |
>>> |
26 |
>>> # ip -6 addr show eth1 |
27 |
>>> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 |
28 |
>>> inet6 fe80::216:17ff:fe84:a7b3/64 scope link |
29 |
>>> valid_lft forever preferred_lft forever |
30 |
>>> |
31 |
>>> But I can't ping6 any of the "real" interfaces (or any external |
32 |
>>> address): |
33 |
>>> |
34 |
>>> # ping6 -c3 fe80::216:17ff:fe84:a7b3 |
35 |
>>> |
36 |
>>> connect: Invalid argument |
37 |
>>> |
38 |
>>> Why can I ping "lo" at ::1 and not "eth1" at fe80::216:17ff:fe84:a7b3? |
39 |
>>> |
40 |
>>> I'm guessing there might other packages I have to re-emerge with the |
41 |
>>> ipv6 use flag. But, I do not want to rebuild everything capable of |
42 |
>>> supporting ipv6, since there are only a few selected programs that |
43 |
>>> I'll be using with ipv6. I thought I might have to rebuild glibc, but |
44 |
>>> it doens't list ipv6 as one of it's use flags. |
45 |
>>> |
46 |
>>> Any hints? |
47 |
>>> |
48 |
>> |
49 |
>> ping6 -c3 fe80::216:17ff:fe84:a7b3%eth0 |
50 |
>> |
51 |
>> Link-local addresses are only valid at the link-level scope, and you |
52 |
>> have to specify which link you're referring to. Global-scope addresses |
53 |
>> don't have the same limitation. |
54 |
> |
55 |
> and to see the scope you can view the output of ifconfig, see |
56 |
> something in there like this next to each address: |
57 |
> |
58 |
> scopeid 0x0<global> |
59 |
> scopeid 0x20<link> |
60 |
> |
61 |
|
62 |
Likewise, if you use iproute2: |
63 |
|
64 |
shortcircuit:0@××××××××××××××××××.org~ |
65 |
Fri Jan 06 09:24 PM |
66 |
!502 #2 j0 ?0 $ ip -6 addr show eth0 |
67 |
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 |
68 |
inet6 2605:2700:0:3::4713:91bf/64 scope global |
69 |
valid_lft forever preferred_lft forever |
70 |
inet6 fe80::a800:ff:fe13:91bf/64 scope link |
71 |
valid_lft forever preferred_lft forever |
72 |
|
73 |
|
74 |
The phrase "scope global" or "scope link" appears after each of my IPv6 |
75 |
addresses on that interface. |