ping.exe成功时会导致ICMPsendEcho失败的原因 [英] what would cause ICMPsendEcho to fail when ping.exe succeeds

查看:100
本文介绍了ping.exe成功时会导致ICMPsendEcho失败的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我手头有一个有趣的情况,但我不确定如何进行故障排除.我做了几次搜索,寻找与我的情况类似的东西,但没有找到与之相符的东西.如果答案已经存在于此,我将不胜感激能为我指出正确方向的人.

I have an interesting situation on my hands, and I'm not quite sure how to go about troubleshooting it. I did a few searches for something similar to my situation, but nothing quite matches it. If the answer already exists somewhere here, I would appreciate anyone that could point me in the right direction.

好的,到这一点.

我正在编写一个用于监视Internet连接的看门狗应用程序.它的设计目的是按设定的时间间隔对一组域执行ping操作,当其中任何一个响应ping时,状态计时器将重置.如果状态计时器超过了设置的阈值,则将尝试采取多个阶段的纠正措施来解决此问题.

I'm writing a watchdog application for monitoring internet connectivity. Its designed to ping a set of domains at a set interval, and when any of them respond to the ping, the status timer is reset. If the status timer ever goes beyond a set threshold, several stages of corrective action are attempted to fix the problem.

足够简单吧?

在这里很奇怪.

我正在使用ICMPsendecho发出ping请求.在我的开发环境(win7)上,它似乎可以正常工作,进行测试并且一切顺利.但是,在部署它的环境中,它无法收到响应.部署环境是Windows XP sp3计算机.

I'm using ICMPsendecho to issue the ping request. On my development environment (win7) it seems to work fine, testing and everything went smoothly. However, in the environment where its being deployed it fails to receive a response. The deployment environment is a windows XP sp3 machine.

在整个故障排除过程中,我注意到了几件事,这可能或可能对实际尝试解决此问题没有帮助.

Throughout the trouble shooting process I've noted several things, which may or may not be helpful in actually trying to solve this problem.

windows ping.exe在部署环境中可以很好地用于我用来测试连接状态的所有域,这只是我的ICMPsendecho调用,似乎无法生成响应.

windows ping.exe works just fine on the deployment environment for all of the domains i'm using to test connectivity status, its only my ICMPsendecho calls that seem to fail to generate responses.

我在部署环境上安装了Wireshark,可以看到两种类型的ping都成功发出了针对请求的数据包. Windows ping将生成长度为74字节的请求数据包,而我的程序调用将生成长度为42字节的数据包. Windows响应数据包在收到时同样为74个字节.

I've installed wireshark on deployment environment and I can see packets being issue successfully for the requests on both types of ping. the windows ping generates request packets with a length of 74 bytes, and my programs call generates packets with a length of 42 bytes. Windows response packets are similarly 74 bytes when they are received.

在安装了Wireshark之​​后切换到开发环境一分钟. Windows ping会像在部署环境中一样使用数据包生成类似的情况.但是,我的应用程序在生成请求时,数据包的长度为42个字节(与部署环境相同),但是收到的响应的长度为60个字节.

Switching to the development environment for a minute, with wireshark installed. Windows ping generates a similiar circumstance as in the deployment environment with the packets. However, my application, when it generates requests the packets are 42 bytes in length(same as the deployment environment), but the responses it receives are 60 bytes in length.

正如我所说,该信息可能有用也可能没有用,但是我试图找出为什么Windows ping在该计算机上可以正常工作时,该应用程序无法生成ICMP响应的原因.

As i said, that information may or may not be useful, but I'm trying to find out why this application is failing to generate ICMP responses when windows ping seems to work fine on that machine.

另一个可能有用的小窍门,互联网连接正在监视使用AT& T升高的4g热点,实际设备是sierra无线MC8790 AirPrime卡.

Another little tidbit that may help, the internet connection were monitoring uses AT&T's elevate 4g hotspots, the actual device is a sierra wireless MC8790 AirPrime card.

有人对为什么这些ping失败有任何想法吗?

Anyone have any ideas on why these pings are failing?

提前感谢您可能提供的任何有用信息以及花时间阅读我的帖子.

thanks ahead of time for any useful information you might have and for taking the time to read my post.

PS.

推荐答案

答案可能与您发送的ping大小有关(有效负载的最小字节数似乎未公开).有关更多信息,请参见此帖子: http://groups.google .com/group/microsoft.public.win32.programmer.networks/browse_thread/thread/2b28b994a8067713?pli = 1

The answer might be in the size of the ping you send (there seems to be an undocumented minimum size of 20 bytes for the payload). See this post for more info: http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_thread/thread/2b28b994a8067713?pli=1

这篇关于ping.exe成功时会导致ICMPsendEcho失败的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆