V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
donghao
V2EX  ›  宽带症候群

IP 地址能像域名一样用吗?

  •  
  •   donghao · 2016-10-20 00:38:58 +08:00 · 3564 次点击
    这是一个创建于 2752 天前的主题,其中的信息可能已经有所发展或是发生改变。
    为什么 8.8.8.8 在任(chu)何(le)地(da)方(lu)ping 都是 less than 9ms ?
    22 条回复    2016-10-21 14:38:49 +08:00
    bazingaterry
        1
    bazingaterry  
       2016-10-20 00:47:36 +08:00 via iPhone   ❤️ 3
    Anycast
    msg7086
        2
    msg7086  
       2016-10-20 00:56:21 +08:00
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=38.8 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=38.8 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=45 time=38.8 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=45 time=38.8 ms
    v9ox
        3
    v9ox  
       2016-10-20 00:58:17 +08:00   ❤️ 3
    300000km*9/1000 = 2700km 算了下觉得不太可能是 ip:host 一对一

    然后搜了一下:

    Source: https://www.quora.com/How-is-Google-Public-DNS-able-to-maintain-such-a-low-ping

    ```
    IP addresses can be shared among many servers. This is usually done through something called BGP anycast that's really only used by large networks like Google, ISPs and internet backbone providers.

    BGP stands for Border Gateway Protocol and is a system that describes how traffic flows around these large global networks. Anycast is a subsystem that allows for multiple servers or regions to "announce" the same IP address. This way, any request that you send to that IP address will receive a response from the closest and/or fastest server to you.

    This is used often with DNS and CDN services so that all the servers share the same IP address and users can be anywhere in the world and automatically reach the closest server for them.
    ```
    v9ox
        4
    v9ox  
       2016-10-20 00:59:51 +08:00
    然后是传说中的秀网速 /带宽 /博客时刻:

    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=13.053 ms
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=11.535 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=12.519 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=12.403 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=13.103 ms
    strggle
        5
    strggle  
       2016-10-20 01:05:03 +08:00
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=300.264 ms
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=300.060 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=337.602 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=356.831 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=298.119 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=54 time=399.536 ms
    64 bytes from 8.8.8.8: icmp_seq=6 ttl=54 time=320.803 ms
    64 bytes from 8.8.8.8: icmp_seq=7 ttl=54 time=300.805 ms
    64 bytes from 8.8.8.8: icmp_seq=8 ttl=54 time=348.589 ms
    64 bytes from 8.8.8.8: icmp_seq=9 ttl=54 time=302.068 ms

    我默默擦着眼泪
    redsonic
        6
    redsonic  
       2016-10-20 01:35:42 +08:00
    linux-fr:~ # ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=59 time=1.36 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=59 time=1.54 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=59 time=1.47 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=59 time=1.40 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=59 time=1.52 ms
    64 bytes from 8.8.8.8: icmp_seq=6 ttl=59 time=1.42 ms
    64 bytes from 8.8.8.8: icmp_seq=7 ttl=59 time=1.39 ms
    64 bytes from 8.8.8.8: icmp_seq=8 ttl=59 time=1.47 ms
    64 bytes from 8.8.8.8: icmp_seq=9 ttl=59 time=1.42 ms
    64 bytes from 8.8.8.8: icmp_seq=10 ttl=59 time=1.48 ms
    64 bytes from 8.8.8.8: icmp_seq=11 ttl=59 time=1.48 ms
    64 bytes from 8.8.8.8: icmp_seq=12 ttl=59 time=1.49 ms
    ^C
    --- 8.8.8.8 ping statistics ---
    12 packets transmitted, 12 received, 0% packet loss, time 11018ms
    rtt min/avg/max/mdev = 1.367/1.459/1.549/0.063 ms

    当然这不是在天朝,别人家的。天朝内低于 100ms 的恐怕都是“被 anycast ”了。
    shakoon
        7
    shakoon  
       2016-10-20 09:27:22 +08:00
    一个是搬瓦工的 VPS ,一个是自己 PC ,擦擦眼泪


    ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=59 time=0.237 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=59 time=0.250 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=59 time=0.420 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=59 time=1.32 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=59 time=0.274 ms
    64 bytes from 8.8.8.8: icmp_seq=6 ttl=59 time=0.246 ms
    64 bytes from 8.8.8.8: icmp_seq=7 ttl=59 time=0.304 ms
    64 bytes from 8.8.8.8: icmp_seq=8 ttl=59 time=0.267 ms
    64 bytes from 8.8.8.8: icmp_seq=9 ttl=59 time=3.00 ms
    ^C
    --- 8.8.8.8 ping statistics ---
    9 packets transmitted, 9 received, 0% packet loss, time 8567ms
    rtt min/avg/max/mdev = 0.237/0.703/3.008/0.878 ms



    ping 8.8.8.8 -t
    正在 Ping 8.8.8.8 具有 32 字节的数据:
    来自 8.8.8.8 的回复: 字节=32 时间=66ms TTL=44
    来自 8.8.8.8 的回复: 字节=32 时间=67ms TTL=44
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=66ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=66ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=69ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=66ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=69ms TTL=44
    来自 8.8.8.8 的回复: 字节=32 时间=77ms TTL=44
    来自 8.8.8.8 的回复: 字节=32 时间=70ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=68ms TTL=44
    来自 8.8.8.8 的回复: 字节=32 时间=68ms TTL=44
    请求超时。

    8.8.8.8 的 Ping 统计信息:
    数据包: 已发送 = 19 ,已接收 = 11 ,丢失 = 8 (42% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 66ms ,最长 = 77ms ,平均 = 68ms
    lcatt
        8
    lcatt  
       2016-10-20 09:46:27 +08:00
    ping 8.8.8.8 -t

    正在 Ping 8.8.8.8 具有 32 字节的数据:
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=40
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=40
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=40
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=40
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=40
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=40

    8.8.8.8 的 Ping 统计信息:
    数据包: 已发送 = 6 ,已接收 = 6 ,丢失 = 0 (0% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 60ms ,最长 = 61ms ,平均 = 60ms
    zhenjiachen
        9
    zhenjiachen  
       2016-10-20 09:46:35 +08:00
    ➜ ~ ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    Request timeout for icmp_seq 0
    Request timeout for icmp_seq 1
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=43 time=98.269 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=43 time=85.815 ms
    Request timeout for icmp_seq 4
    Request timeout for icmp_seq 5
    64 bytes from 8.8.8.8: icmp_seq=6 ttl=43 time=104.779 ms
    64 bytes from 8.8.8.8: icmp_seq=7 ttl=43 time=90.338 ms
    lcatt
        10
    lcatt  
       2016-10-20 09:47:25 +08:00
    @v9ox 和节点有关吧。。 TTL 差距有点大
    allce231
        11
    allce231  
       2016-10-20 09:57:02 +08:00
    [root@localhost ~]# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=59 time=0.330 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=59 time=0.821 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=59 time=0.381 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=59 time=0.380 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=59 time=0.355 ms
    64 bytes from 8.8.8.8: icmp_seq=6 ttl=59 time=2.21 ms
    64 bytes from 8.8.8.8: icmp_seq=7 ttl=59 time=0.404 ms
    64 bytes from 8.8.8.8: icmp_seq=8 ttl=59 time=0.388 ms
    64 bytes from 8.8.8.8: icmp_seq=9 ttl=59 time=0.353 m
    yhxx
        12
    yhxx  
       2016-10-20 10:09:48 +08:00
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    64 bytes from 8.8.8.8: icmp_seq=0 ttl=52 time=294.862 ms
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=333.420 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=721.658 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=52 time=426.897 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=52 time=267.061 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=52 time=309.702 ms
    ^C
    --- 8.8.8.8 ping statistics ---
    6 packets transmitted, 6 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 267.061/392.267/721.658/155.532 ms
    adminsvv
        13
    adminsvv  
       2016-10-20 10:17:17 +08:00
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    Request timeout for icmp_seq 0
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=44 time=63.945 ms
    Request timeout for icmp_seq 2
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=44 time=64.113 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=44 time=87.144 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=44 time=66.722 ms
    Request timeout for icmp_seq 6
    Request timeout for icmp_seq 7
    Request timeout for icmp_seq 8
    Request timeout for icmp_seq 9
    Request timeout for icmp_seq 10
    Request timeout for icmp_seq 11
    Request timeout for icmp_seq 12
    64 bytes from 8.8.8.8: icmp_seq=13 ttl=44 time=64.630 ms
    64 bytes from 8.8.8.8: icmp_seq=14 ttl=44 time=63.979 ms
    64 bytes from 8.8.8.8: icmp_seq=15 ttl=44 time=63.952 ms
    Request timeout for icmp_seq 16
    Request timeout for icmp_seq 17
    Request timeout for icmp_seq 18
    Request timeout for icmp_seq 19
    64 bytes from 8.8.8.8: icmp_seq=20 ttl=44 time=70.874 ms
    Request timeout for icmp_seq 21
    ^C
    --- 8.8.8.8 ping statistics ---
    23 packets transmitted, 8 packets received, 65.2% packet loss
    round-trip min/avg/max/stddev = 63.945/68.170/87.144/7.513 ms
    blackboar
        14
    blackboar  
       2016-10-20 10:26:45 +08:00
    Anycast+BGP

    简单的说域名通过 DNS 服务器返回给你最近的地址,达到这个效果;而它这种属于网络设备种路由转发到最近的地方。
    soli
        15
    soli  
       2016-10-20 10:46:53 +08:00
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=1.83 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=58 time=1.76 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=58 time=1.90 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=58 time=1.77 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=58 time=1.83 ms
    Showfom
        16
    Showfom  
       2016-10-20 11:12:50 +08:00 via iPhone
    IP 都可以买 ov is 证书 为啥不能当域名用 而且这样的话少了一步 DNS 解析 速度还有优势了 只要你线路好 或者用 anycast

    需要 anycast 服务的老板可以联系我
    datou
        17
    datou  
       2016-10-20 14:51:32 +08:00
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=0.498 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=0.535 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=0.544 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=60 time=0.455 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=60 time=0.468 ms
    64 bytes from 8.8.8.8: icmp_seq=6 ttl=60 time=0.570 ms
    64 bytes from 8.8.8.8: icmp_seq=7 ttl=60 time=0.452 ms
    64 bytes from 8.8.8.8: icmp_seq=8 ttl=60 time=0.435 ms
    64 bytes from 8.8.8.8: icmp_seq=9 ttl=60 time=0.601 ms
    64 bytes from 8.8.8.8: icmp_seq=10 ttl=60 time=0.543 ms
    64 bytes from 8.8.8.8: icmp_seq=11 ttl=60 time=0.466 ms
    64 bytes from 8.8.8.8: icmp_seq=12 ttl=60 time=0.483 ms
    64 bytes from 8.8.8.8: icmp_seq=13 ttl=60 time=0.585 ms
    64 bytes from 8.8.8.8: icmp_seq=14 ttl=60 time=0.542 ms
    Baymaxbowen
        18
    Baymaxbowen  
       2016-10-20 15:33:58 +08:00
    正在 Ping 8.8.8.8 具有 32 字节的数据:
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=53ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=53ms TTL=44
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=44
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=44
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=44
    请求超时。
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=44
    请求超时。
    请求超时。
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=44
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=60ms TTL=44
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=44
    请求超时。
    请求超时。
    请求超时。
    来自 8.8.8.8 的回复: 字节=32 时间=62ms TTL=44
    来自 8.8.8.8 的回复: 字节=32 时间=61ms TTL=44
    请求超时。
    wizardforcel
        19
    wizardforcel  
       2016-10-20 16:38:14 +08:00 via Android
    你用过独立 ip 主机嘛??
    HannibaI
        20
    HannibaI  
       2016-10-20 17:14:10 +08:00
    曾经发过这问题。。被嘲讽月经贴了。。
    zoudeze
        21
    zoudeze  
       2016-10-20 17:53:59 +08:00
    电话线猫固定增加 20ms 延迟~~~
    ppwangs
        22
    ppwangs  
       2016-10-21 14:38:49 +08:00
    公司网络
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=36 time=232 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=36 time=232 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=36 time=232 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=36 time=232 ms
    64 bytes from 8.8.8.8: icmp_seq=5 ttl=36 time=236 ms
    ---
    家里网络
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    64 bytes from 8.8.8.8: seq=0 ttl=52 time=219.425 ms
    64 bytes from 8.8.8.8: seq=1 ttl=52 time=219.242 ms
    64 bytes from 8.8.8.8: seq=2 ttl=52 time=219.151 ms
    64 bytes from 8.8.8.8: seq=3 ttl=52 time=219.662 ms
    64 bytes from 8.8.8.8: seq=4 ttl=52 time=219.078 ms
    ---

    香港 VPS
    64 bytes from 8.8.8.8: icmp_seq=125 ttl=47 time=21.1 ms
    64 bytes from 8.8.8.8: icmp_seq=126 ttl=47 time=21.3 ms
    64 bytes from 8.8.8.8: icmp_seq=127 ttl=47 time=23.0 ms
    64 bytes from 8.8.8.8: icmp_seq=128 ttl=47 time=21.1 ms
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2252 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 12:02 · PVG 20:02 · LAX 05:02 · JFK 08:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.