zoukankan      html  css  js  c++  java
  • ping localhost出现地址::1

    近期发现本机的localhost不好用了。
    症状:
    自己本机部署服务器时,浏览器地址栏访问localhost:8080不通;
    禁用网络连接,未果;
    拔出网线,OK。
    cmd里ping之,返回结果如下:
    C:Documents and SettingsAdministrator>ping localhost

    Pinging WWW-C4AB43513BE [::1] with 32 bytes of data:

    Reply from ::1: time<1ms
    Reply from ::1: time<1ms
    Reply from ::1: time<1ms
    Reply from ::1: time<1ms

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

    C:Documents and SettingsAdministrator>

    依据以上返回结果来看,没有错误提示,丢包也是0,ping通了,但“::1”就挺古怪了。

    经查是IPv6协议影响所致。
    卸载此协议即可。


    卸载之后ping的结果:

    C:Documents and SettingsAdministrator>ping localhost

    Pinging WWW-C4AB43513BE [127.0.0.1] with 32 bytes of data:

    Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=64

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

    C:Documents and SettingsAdministrator>

    参考资料:http://www.javaeye.com/topic/425989

    ===Update 2010年12月2日 20:43:01

    IPv6介绍:

    IPv6本身使用了不同于IPv4地址的点符号。与4个点分十进制不同的是,IPv6使用了128位,表示为1234:5678:90ab:cdef:1234:5678:90ab:cdef这样一组数字。为了保持向后兼容性,IPv4地址可以写为0000:0000:0000:0000:0000:0000:63.246.7.184(这也有助于说明IPv6相对于IPv4所带来的大量数字)。幸好,对于任意一个以0开头的数字来说,0是可以被推测出来的,因此0:0:0:0:0:0:63.246.7.184也表示与上面相同的地址。0的任意连续序列都可以使用两个冒号进行替换,这样::63.246.7.184也表达了相同的含义。

  • 相关阅读:
    BZOJ3435: [Wc2014]紫荆花之恋(替罪羊树,Treap)
    BZOJ2668: [cqoi2012]交换棋子(费用流)
    codeforces111D. Petya and Coloring(组合数学,计数问题)
    codeforces1114D. Flood Fill(区间Dp)
    BZOJ2137: submultiple(生成函数,二项式定理)
    BZOJ3645: Maze(FFT多项式快速幂)
    codeforces 140E.New Year Garland
    BZOJ1194: [HNOI2006]潘多拉的盒子(tarjan)
    BZOJ2337: [HNOI2011]XOR和路径(高斯消元,期望)
    BZOJ3569: DZY Loves Chinese II(线性基构造)
  • 原文地址:https://www.cnblogs.com/moqiang02/p/4061393.html
Copyright © 2011-2022 走看看