使用Paping工具
paping工具支持Windows和Linux,根据平台下载相应的可执行程序,解压就能使用, 以下已Windows为例:
C:\>paping -c 2 www.aliyun.com -p 80
paping v1.5.5 - Copyright (c) 2011 Mike Lovell
Connecting to xjp-adns.aliyun.com.vipgds.alibabadns.com [47.88.198.69] on TCP 80:
Connected to 47.88.198.69: time=78.90ms protocol=TCP port=80
Connected to 47.88.198.69: time=82.69ms protocol=TCP port=80
Psping
这个psping可就NB了,只支持Windows,CTNND,但是这套工具的作者是鼎鼎大名 Mark Russinovich 现任Azure CTO 以下是下载连接:
https://learn.microsoft.com/zh-cn/sysinternals/downloads/psping
-t 是一直ping
C:\>psping -t www.aliyun.com:443
PsPing v2.10 - PsPing - ping, latency, bandwidth measurement utility
Copyright (C) 2012-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
TCP connect to 47.88.198.68:443:
Infinite iterations (warmup 1) ping test:
Connecting to 47.88.198.68:443 (warmup): from 10.193.44.137:52869: 73.78ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52874: 79.21ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52876: 73.71ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52880: 76.50ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52881: 77.56ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52882: 76.48ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52883: 74.59ms
Connecting to 47.88.198.68:443: from 10.193.44.137:52885: 73.92ms
TCPing
这个工具同样也是支持Windows和Linux
https://github.com/cloverstd/tcping/releases
> tcping google.com 443
Ping tcp://google.com:443 - Connected - time=15.425732ms
Ping tcp://google.com:443 - Connected - time=2.628025ms
Ping tcp://google.com:443 - Connected - time=2.400356ms
Ping tcp://google.com:443 - Connected - time=1.967587ms
Ping statistics tcp://google.com:443
4 probes sent.
4 successful, 0 failed.
Approximate trip times:
Minimum = 1.967587ms, Maximum = 15.425732ms, Average = 5.605425ms
> tcping -H hui.lu
Ping http://hui.lu:80 - http is open - time=232.880173ms method=GET status=200 bytes=10317
Ping http://hui.lu:80 - http is open - time=60.096446ms method=GET status=200 bytes=10317
Ping http://hui.lu:80 - http is open - time=56.750403ms method=GET status=200 bytes=10317
Ping http://hui.lu:80 - http is open - time=57.886907ms method=GET status=200 bytes=10317
Ping statistics http://hui.lu:80
4 probes sent.
4 successful, 0 failed.
Approximate trip times:
Minimum = 56.750403ms, Maximum = 232.880173ms, Average = 101.903482ms
测试端口
PS C:\> Test-Connection www.aliyun.com
Source Destination IPV4Address IPV6Address Bytes Time(ms)
------ ----------- ----------- ----------- ----- --------
CNPNB06183 www.aliyun.com 47.88.251.189 32 77
CNPNB06183 www.aliyun.com 47.88.251.189 32 77
CNPNB06183 www.aliyun.com 47.88.251.189 32 77
CNPNB06183 www.aliyun.com 47.88.251.189 32 78
PS C:\> TNC www.aliyun.com -p 443
ComputerName : www.aliyun.com
RemoteAddress : 47.88.251.189
RemotePort : 443
InterfaceAlias : WLAN
SourceAddress : 10.193.44.137
TcpTestSucceeded : True
PS C:\> Test-NetConnection www.aliyun.com -p 80 ComputerName : www.aliyun.com RemoteAddress : 47.88.128.4 RemotePort : 80 InterfaceAlias : WLAN SourceAddress : 10.193.44.137 TcpTestSucceeded : True