winterball 发表于 2011-3-22 16:49:59

求助:关于ping问题,xp系统

我是xp的系统,启用了ipv6后,得到自动产生的ipv6地址,ipconfig后得到:

Ethernet adapter 本地连接:

      Connection-specific DNS Suffix. :
      IP Address. . . . . . . . . . . . : 192.168.0.158
      Subnet Mask . . . . . . . . . . . : 255.255.255.0
      IP Address. . . . . . . . . . . . : fe80::20c:29ff:fe2f:9e63%4
      Default Gateway . . . . . . . . . : 192.168.0.1

Tunnel adapter Teredo Tunneling Pseudo-Interface:

      Connection-specific DNS Suffix. :
      IP Address. . . . . . . . . . . . : fe80::ffff:ffff:fffd%5
      Default Gateway . . . . . . . . . :

Tunnel adapter Automatic Tunneling Pseudo-Interface:

      Connection-specific DNS Suffix. :
      IP Address. . . . . . . . . . . . : fe80::5efe:192.168.0.158%2
      Default Gateway . . . . . . . . . :

然后我用另一台也启动了ipv6的xp机器ping这台机器,返回:
C:\Debug>ping6 fe80::20c:29ff:fe2f:9e63%4

Pinging fe80::20c:29ff:fe2f:9e63%4
from fe80::20c:29ff:fe08:1d27%4 with 32 bytes of data:

Reply from fe80::20c:29ff:fe08:1d27%4: 无法到达目标地址。
Reply from fe80::20c:29ff:fe08:1d27%4: 无法到达目标地址。
Reply from fe80::20c:29ff:fe08:1d27%4: 无法到达目标地址。
Reply from fe80::20c:29ff:fe08:1d27%4: 无法到达目标地址。

Ping statistics for fe80::20c:29ff:fe2f:9e63%4:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

这是啥意思?

ping Teredo 地址成功:

C:\Debug>ping6 fe80::ffff:ffff:fffd%5

Pinging fe80::ffff:ffff:fffd%5
from fe80::ffff:ffff:fffd%5 with 32 bytes of data:

Reply from fe80::ffff:ffff:fffd%5: bytes=32 time<1ms
Reply from fe80::ffff:ffff:fffd%5: bytes=32 time<1ms
Reply from fe80::ffff:ffff:fffd%5: bytes=32 time<1ms
Reply from fe80::ffff:ffff:fffd%5: bytes=32 time<1ms

Ping statistics for fe80::ffff:ffff:fffd%5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

这两台机器处在一个局域网内,那么,请问这两台机器彼此之间可以通过ipv6通信吗?自己写代码的话可以吧?
第一个ping说 "无法到达目标地址"是啥意思?

满天星 发表于 2011-3-22 21:50:46

XP系统对IPv6支持很差,如果可能的话,尽量使用Windows Vista活Windows 7
XP有时候会出现同一个局域网也无法直接通讯的情况,无法解决,怀疑是Windows XP的Bug,即使此时你手工配置双方的IPv6地址,且都在同一个局域网上,不管是link-local地址还是手工配置的地址都可能会不通(并不一定是所有情况都是这样,不确定是何原因)
建议通过router来通讯,即使在同一个局域网,设置一个router为网关以后看是否能解决……
这个问题很头疼,目前好像无解……

winterball 发表于 2011-3-23 10:51:04

谢谢啊!
那请问,为啥ping Teredo 地址又能成功呢?

还有微软有个例子,不知道星哥看了没,我在xp的机器上用vc6调了这个例子,debug通过了,用debug版本运行,也是连不通,返回的错误是:
C:\Debug>cpp1.exe -s fe80::ffff:ffff:fffd%5 -f PF_INET6
socket call with family: 23 socktype: 1, protocol: 0
Attempting to connect to: fe80::ffff:ffff:fffd%5
connect() to fe80::ffff:ffff:fffd%5 failed with error 10061: 由于目标机器积极拒
绝,无法连接。
Fatal error: unable to connect to the server.

不知道为啥啊,也是你说的这个原因吗?

winterball 发表于 2011-3-23 11:18:49

还有,只要ping的通,就代表能够用程序通信吗?

满天星 发表于 2011-3-23 19:14:05

你能ping通的Teredo地址是否是系统默认的地址?貌似你根本没有接入Teredo啊!
二台机器上默认的Teredo地址是否相同?你确认一下吧!
VC6的那个问题我也不晓得原因……多年不碰这东西,已经不认识它了……
能ping通不一定代表可以通信的,这个需要看具体的环境和服务的功能是否开启!甚至有可能是防火墙等拒绝,各种情况都可能存在……

winterball 发表于 2011-3-24 09:31:28

是的,我昨天也才弄明白,那个Teredo地址是系统默认的地址,两台机器确实是一样的;
感谢星哥,俺对IPv6现在几乎还是毛也不懂,努力学习!!ing~

满天星 发表于 2011-3-24 22:05:07

:victory:
大家都一样,还只是了解皮毛而已,互相学习,有问题一起交流讨论!
页: [1]
查看完整版本: 求助:关于ping问题,xp系统