开发者

C# - Ping server with ICMP disabled

I开发者_JS百科 am trying to ping a series of servers frequently using the PingReply class. Most of the time this is fine, but other times I get failed pings. I'm guessing this has something to do with ICMP being disabled on the remote server(s). Is there any way to get a ping to from a server even if ICMP is disabled?


If the remote server won't respond to an ICMP ECHO request, it won't work with the Ping command. Odds are there is some difference between the packet you're sending and the one Ping is sending. You can use something like Network Monitor or Wireshark to see the packets and compare them.

Odds are you're sending a packet with a lower TTL (or maybe too big of a buffer). I would try increasing PingOptions.Ttl first.


The ping command also uses ICMP. If you know of a port that will reliably be open on that machine, you can always establish a telnet connection.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜