AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1662861
Accepted
Haseeb Ahmed
Haseeb Ahmed
Asked: 2021-07-16 16:14:40 +0800 CST2021-07-16 16:14:40 +0800 CST 2021-07-16 16:14:40 +0800 CST

如何使用 ping 命令获取发送和接收时间

  • 772

如何 ping 计算机/服务器并分别获取传输和接收时间,而不是获取一个往返时间。我正在使用 hrping,我可以从本地网络上的计算机获取传输和接收时间。

D:\Portable\hrping>hrping 192.168.1.1 -M
This is hrPING v5.07.1148 by cFos Software GmbH -- http://www.cfos.de

Source address is 192.168.1.17; using ICMP timestamp, ID=801c
Pinging 192.168.1.1 [192.168.1.1]
with 0 bytes data (40 bytes IP):

From 192.168.1.1: bytes=40 seq=0001 TTL=64 ID=62f3 time=0.626ms tx=1ms rx=0ms
From 192.168.1.1: bytes=40 seq=0002 TTL=64 ID=62f4 time=0.923ms tx=1ms rx=0ms
From 192.168.1.1: bytes=40 seq=0003 TTL=64 ID=62f5 time=0.336ms tx=1ms rx=-1ms
From 192.168.1.1: bytes=40 seq=0004 TTL=64 ID=62f6 time=0.320ms tx=1ms rx=-1ms

Packets: sent=4, rcvd=4, error=0, lost=0 (0.0% loss) in 1.502086 sec
RTTs in ms: min/avg/max/dev: 0.320 / 0.551 / 0.923 / 0.246
Bandwidth in kbytes/sec: sent=0.106, rcvd=0.106  

但它不适用于互联网上的任何东西。

D:\Portable\hrping>hrping google.com -M
This is hrPING v5.07.1148 by cFos Software GmbH -- http://www.cfos.de

Source address is 192.168.1.17; using ICMP timestamp, ID=082b
Pinging google.com [172.217.16.238]
with 0 bytes data (40 bytes IP):

Timeout waiting for seq=0001
Timeout waiting for seq=0002
Timeout waiting for seq=0003
Timeout waiting for seq=0004

Packets: sent=4, rcvd=0, error=0, lost=4 (100.0% loss) in 1.503945 sec
RTTs in ms: min/avg/max/dev: 0.000 / 0.000 / 0.000 / 0.000
Bandwidth in kbytes/sec: sent=0.106, rcvd=0.000   

我从 hrping 收到此消息,并设置了防火墙规则。仍然一无所有。

hrPing did not get any replies.  This might be due to a firewall setting.

If you use Windows firewall with default settings, you need to add a rule to
allow hrPing full incoming ICMP traffic:

Go to Control Panel, Windows Firewall and click on Advanced settings on the
left.  A new dialog appears: on its left pane right-click 'Inbound Rules' and
select 'New rule...'  In the following wizard select 'Custom', click Next,
select 'All programs', click Next, select 'ICMPv4' as 'Protocol type', click
Next 4 times and enter 'hrPing' as 'Name' and click 'Finish'.

Don't forget to disable or delete this rule when you no longer need it!
ping
  • 2 2 个回答
  • 152 Views

2 个回答

  • Voted
  1. Keltari
    2021-07-16T17:11:55+08:002021-07-16T17:11:55+08:00

    您很可能正在 ping 已禁用 ICMP ping 的网络。许多网络出于安全考虑禁用 ping,例如防止 ping 泛滥。谷歌就是这样一家公司。

    尝试 ping amazon.com 和 yahoo.com,因为它们目前允许 ping。

    • 0
  2. Best Answer
    user1686
    2021-07-16T22:05:14+08:002021-07-16T22:05:14+08:00

    hrping -M使用 ICMP Timestamp Request数据包而不是通常的 Echo Request。

    许多管理员将他们的服务器配置为只允许非常有限的 ICMP 请求类型列表——他们通常允许 ICMP Echo(每个人都将其与“ping”相关联),而没有其他任何东西。

    因此,虽然 hrPing 的消息是正确的,这可能是防火墙问题,但问题出在另一端的防火墙上,您真的对此无能为力 - 除了尝试 ping 其他东西。

    (例如,“superuser.com”确实回答了时间戳请求,而“google.com”根本不回答。我下载 hrPing 的“cfos.de”网站也回答了时间戳请求,但方式有点奇怪。 )

    • 0

相关问题

  • 如何在 4g 网络上 ping 移动设备

  • Cygwin 使用哪种 ping 实现?

  • 为两台机器之间的 ping 测试解释 Wireshark 输出

  • 我可以 ping 通 IP 地址,但我不知道网络中的设备是什么

  • 是什么导致我的网络丢包?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve