在 Linux 机器上配置 IP v6

在 Linux 机器上配置 IP v6

我使用此命令来分配站点范围的 IP 地址:

$ sudo ifconfig eth0 inet6 add fee3::216:cbff:fe94:1a86/64
$

检查一下ifconfig

$ ifconfig
...
eth0      Link encap:Ethernet  HWaddr 00:16:76:5a:a2:6d  
          inet addr:192.168.163.54  Bcast:192.168.163.255  Mask:255.255.254.0
          inet6 addr: fe80::216:76ff:fe5a:a26d/64 Scope:Link
          inet6 addr: fee3::216:cbff:fe94:1a86/64 Scope:Site
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3614 errors:0 dropped:0 overruns:0 frame:0
          TX packets:596 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:792943 (792.9 KB)  TX bytes:77134 (77.1 KB)
...

但从另一台机器 ping 失败:

$ ping6 fee3::216:cbff:fe94:1a86
PING6(56=40+8+8 bytes) fee2::216:cbff:fe94:1a79 --> fee3::216:cbff:fe94:1a86
Request timeout for icmp_seq=0
Request timeout for icmp_seq=1
Request timeout for icmp_seq=2
Request timeout for icmp_seq=3
^C

我错在哪里了?

答案1

您缺少一些路由。您必须告诉路由器将所有路由从指定接口路由fec0::/10到指定接口。

但请注意站点本地地址已弃用

相关内容