1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 猿创征文|【实用工具tcping】ping tcping的区别 使用命令 超全超详细使用手册(建议收藏)

猿创征文|【实用工具tcping】ping tcping的区别 使用命令 超全超详细使用手册(建议收藏)

时间:2022-09-01 23:14:54

相关推荐

猿创征文|【实用工具tcping】ping  tcping的区别 使用命令 超全超详细使用手册(建议收藏)

目录

ping简介使用tcping简介下载使用总结

ping

简介

ping (Packet Internet Groper)是一种英特网包探索器,用于测试网络连接量的程序 。Ping是工作在TCP/IP网络体系结构中应用层的一个服务命令, 主要是向特定的目的主机发送ICMP(Internet Control Message Protocol 因特网报文控制协议)Echo请求报文,测试目的站是否可达及了解其有关状态。ping用于确定本地主机是否能与另一台主机成功交换(发送与接收)数据包,再根据返回的信息,就可以推断TCP/IP参数是否设置正确,以及运行是否正常、网络是否通畅等。

Ping命令可以进行以下操作

通过将ICMP并侦听回显回复数据包来验证与一台或多台远程计算机的连接每个发送的数据包最多等待一秒打印已传输和接收的数据包数

需要注意的是,Ping成功并不一定就代表TCP/IP配置正确,有可能还要执行大量的本地主机与远程主机的数据包交换,才能确信TCP/IP配置的正确性。如果执行ping成功而网络仍无法使用,那么问题很可能出在网络系统的软件配置方面,ping成功只保证当前主机与目的主机间存在一条连通的物理路径。

使用

用法

ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]][-w timeout] [-R] [-S srcaddr] [-c compartment] [-p][-4] [-6] target_name

选项

示例

ping ip 端口(ICMP协议是属于ip层协议,通信不需要端口所以无法测试 tcp udp 运输层的端口)

ping 80

结果:

错误的参数 80。

ping ip

ping

结果:

正在 Ping www. [14.215.177.39] 具有 32 字节的数据:来自 14.215.177.39 的回复: 字节=32 时间=92ms TTL=52来自 14.215.177.39 的回复: 字节=32 时间=89ms TTL=52来自 14.215.177.39 的回复: 字节=32 时间=92ms TTL=52来自 14.215.177.39 的回复: 字节=32 时间=94ms TTL=5214.215.177.39 的 Ping 统计信息:数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),往返行程的估计时间(以毫秒为单位):最短 = 89ms,最长 = 94ms,平均 = 91ms

-选项 后的字段都是需要填入值的

ping -n count(要发送的回显请求数)

ping -n 7

结果:

正在 Ping www. [14.215.177.38] 具有 32 字节的数据:来自 14.215.177.38 的回复: 字节=32 时间=107ms TTL=52来自 14.215.177.38 的回复: 字节=32 时间=76ms TTL=52来自 14.215.177.38 的回复: 字节=32 时间=121ms TTL=52来自 14.215.177.38 的回复: 字节=32 时间=122ms TTL=52来自 14.215.177.38 的回复: 字节=32 时间=179ms TTL=52来自 14.215.177.38 的回复: 字节=32 时间=78ms TTL=52来自 14.215.177.38 的回复: 字节=32 时间=83ms TTL=5214.215.177.38 的 Ping 统计信息:数据包: 已发送 = 7,已接收 = 7,丢失 = 0 (0% 丢失),往返行程的估计时间(以毫秒为单位):最短 = 76ms,最长 = 179ms,平均 = 109ms

ping -l size(发送缓冲区大小)

ping -l 666

结果:

正在 Ping www. [14.215.177.38] 具有 666 字节的数据:来自 14.215.177.38 的回复: 字节=666 时间=95ms TTL=52来自 14.215.177.38 的回复: 字节=666 时间=124ms TTL=52来自 14.215.177.38 的回复: 字节=666 时间=99ms TTL=52来自 14.215.177.38 的回复: 字节=666 时间=90ms TTL=5214.215.177.38 的 Ping 统计信息:数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),往返行程的估计时间(以毫秒为单位):最短 = 90ms,最长 = 124ms,平均 = 102ms

tcping

简介

tcping(Transmission Control Packet Internet Groper)命令使用TCP传输层协议,可以检测IP端口状态和查看ping值,即使服务器禁 ping 也可以通过 tcping 来监控服务器网络状态。如果没有通过服务器端口,则默认为80。

tcping命令可操作

可以在对方阻止ping的情况下探测指定端口的连通性可以检测IP端口状态和查看ping 值使用TCP协议进行数据连通性检测的程序

下载

tcping下载

下载后放到目录:C:\Windows\System32,这样就可以在任意路径下运行tcping命令了,ping也是在这个目录下,两者不影响。之后按下win+r输入cmd,打开控制台,输入tcping,如果输出帮助文档,则表示成功

使用

用法

tcping [-t] [-d] [-i interval] [-n times] [-w ms] [-b n] [-r times] [-s] [-v] [-j] [-js size] [-4] [-6] [-c] [-g count] [-S source_address] [--file] [--tee filename] [-h] [-u] [--post] [--head] [--proxy-port port] [--proxy-server server] [--proxy-credentials username:password] [-f] server-address [server-port]

选项

HTTP选项

调试选项

示例

tcping ip 端口

tcping 80

结果:

Probing 14.215.177.38:80/tcp - Port is open - time=104.043msProbing 14.215.177.38:80/tcp - Port is open - time=95.994msProbing 14.215.177.38:80/tcp - Port is open - time=99.670msProbing 14.215.177.38:80/tcp - Port is open - time=105.977msPing statistics for 14.215.177.38:804 probes sent.4 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 95.994ms, Maximum = 105.977ms, Average = 101.421ms

tcping -t ip(一直检测,Ctrll+C停止)

tcping -t 80

结果:

** Pinging continuously. Press control-c to stop **Probing 14.215.177.38:80/tcp - Port is open - time=85.118msProbing 14.215.177.38:80/tcp - Port is open - time=84.338msProbing 14.215.177.38:80/tcp - Port is open - time=82.035msProbing 14.215.177.38:80/tcp - Port is open - time=86.691msProbing 14.215.177.38:80/tcp - Port is open - time=104.070msProbing 14.215.177.38:80/tcp - Port is open - time=122.593msProbing 14.215.177.38:80/tcp - Port is open - time=163.882msProbing 14.215.177.38:80/tcp - Port is open - time=106.062msProbing 14.215.177.38:80/tcp - Port is open - time=242.789msProbing 14.215.177.38:80/tcp - Port is open - time=91.095msProbing 14.215.177.38:80/tcp - Port is open - time=118.070msProbing 14.215.177.38:80/tcp - Port is open - time=131.803msProbing 14.215.177.38:80/tcp - Port is open - time=171.199msProbing 14.215.177.38:80/tcp - Port is open - time=94.432msProbing 14.215.177.38:80/tcp - Port is open - time=170.511msControl-CPing statistics for 14.215.177.38:8015 probes sent.15 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 82.035ms, Maximum = 242.789ms, Average = 123.646ms

tcping --fqdn 80(每一行打印域名)

tcping --fqdn 80

结果:

Probing :80/tcp - Port is open - time=89.863msProbing :80/tcp - Port is open - time=97.284msProbing :80/tcp - Port is open - time=222.348msProbing :80/tcp - Port is open - time=86.891msPing statistics for 14.215.177.38:804 probes sent.4 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 86.891ms, Maximum = 222.348ms, Average = 124.096ms

tcping -n 5 80(发送5个tcping)

tcping -n 5 80

结果:

Probing 14.215.177.38:80/tcp - Port is open - time=88.883msProbing 14.215.177.38:80/tcp - Port is open - time=88.871msProbing 14.215.177.38:80/tcp - Port is open - time=85.013msProbing 14.215.177.38:80/tcp - Port is open - time=81.591msProbing 14.215.177.38:80/tcp - Port is open - time=90.829msPing statistics for 14.215.177.38:805 probes sent.5 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 81.591ms, Maximum = 90.829ms, Average = 87.037ms

tcping -w 3 80(等待响应3秒)

tcping -w 3 80

结果:

Probing 14.215.177.39:80/tcp - Port is open - time=89.445msProbing 14.215.177.39:80/tcp - Port is open - time=91.247msProbing 14.215.177.39:80/tcp - Port is open - time=94.874msProbing 14.215.177.39:80/tcp - Port is open - time=81.502msPing statistics for 14.215.177.39:804 probes sent.4 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 81.502ms, Maximum = 94.874ms, Average = 89.267ms

tcping -h 80(使用HTTP模式url)

tcping -h 80

结果:

Probing 14.215.177.39:80/tcp - HTTP is open - time=99.764ms rcv_time=96.177 status=200 bytes=8102 kbit/s=~673.926Probing 14.215.177.39:80/tcp - HTTP is open - time=86.338ms rcv_time=98.719 status=200 bytes=8102 kbit/s=~656.569Probing 14.215.177.39:80/tcp - HTTP is open - time=77.414ms rcv_time=92.856 status=200 bytes=8102 kbit/s=~698.024Probing 14.215.177.39:80/tcp - HTTP is open - time=80.852ms rcv_time=93.861 status=200 bytes=8102 kbit/s=~690.555Ping statistics for 14.215.177.39:804 probes sent.4 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 77.414ms, Maximum = 99.764ms, Average = 86.092msApproximate download times in milli-seconds:Minimum = 92.856ms, Maximum = 98.719ms, Average = 95.403ms

tcping --block 80(检测连接与超时)

tcping --block 80

结果:

Probing 14.215.177.39:80/tcp - Port is open - time=82.162msProbing 14.215.177.39:80/tcp - Port is open - time=138.086msProbing 14.215.177.39:80/tcp - Port is open - time=110.414msProbing 14.215.177.39:80/tcp - Port is open - time=105.083msPing statistics for 14.215.177.39:804 probes sent.4 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:Minimum = 82.162ms, Maximum = 138.086ms, Average = 108.936ms

总结

以上就是关于ping和tcping的相关知识了,其实平时项目部署过程中用的比较多的还是端口监测,可以用来检测项目是否运行。

有问题可以评论区留言,看到第一时间回复,感谢支持!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。