大网数据广告活动
服务器运维问答

Windows to Linux Ping not working while Telnet works

· 52CE 我爱测

On Linux we have a service running which is listening on port 9999 but when we try to check it from a Windows machine on same network with PING it says : Ping request could not find host 10.32.9.82:9999 while when I tried using t…

问题原文

原帖链接 · Ehsan Sajjad · CC BY-SA 4.0

On Linux we have a service running which is listening on port 9999 but when we try to check it from a Windows machine on same network with PING it says :

Ping request could not find host 10.32.9.82:9999

while when I tried using telnet like

telnet 10.32.9.82 9999

and Telnet got connected successfully.

So what I am trying to understand that why the telnet worked but does PING not as the service is listening on the IP and port on TCP.

已采纳解答

原帖链接 · Swisstone · CC BY-SA 4.0

You can't ping a port number (ping says that the device is reachable, nothing more).

But you can use something like this powershell cmdlet instead: Test-NetConnection

Test-NetConnection 10.32.9.82 -Port 9999

You'll get an output like that, note that the output shows if Ping succeeded, and if the port is reachable, that's two different things !

RemoteAddress          : 10.32.9.82
RemotePort             : 9999
InterfaceAlias         : Ethernet
SourceAddress          : 192.168.1.166
PingSucceeded          : True
PingReplyDetails (RTT) : 1 ms
TcpTestSucceeded       : True

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-12-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。