常用的网络工具

一、基础环境

操作系统:Windows 或 Linux

二、常用工具

1、ping
操作系统自带。使用的 ICMP(Internet Control Message Protocol 因特网报文控制协议) 但是有很多忽略ping.

PS C:\WINDOWS\system32> ping www.baidu.com

正在 Ping www.a.shifen.com [14.215.177.38] 具有 32 字节的数据:
来自 14.215.177.38 的回复: 字节=32 时间=31ms TTL=55
来自 14.215.177.38 的回复: 字节=32 时间=31ms TTL=55
来自 14.215.177.38 的回复: 字节=32 时间=31ms TTL=55
来自 14.215.177.38 的回复: 字节=32 时间=31ms TTL=55

14.215.177.38 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 31ms,最长 = 31ms,平均 = 31ms
PS C:\WINDOWS\system32>

telnet
操作系统自带,但已弃用。默认不安装。
tcping
第三方工具。不使用 ICMP 协议。可以对端口是否开放实行探测。

tcping 主机名或IP地址 [端口号]
PS C:\Users> tcping www.baidu.com

Probing 36.152.44.95:80/tcp - Port is open - time=33.801ms
Probing 36.152.44.95:80/tcp - Port is open - time=30.847ms
Probing 36.152.44.95:80/tcp - Port is open - time=61.770ms
Probing 36.152.44.95:80/tcp - Port is open - time=38.466ms

Ping statistics for 36.152.44.95:80
     4 probes sent.
     4 successful, 0 failed.
Approximate trip times in milli-seconds:
     Minimum = 30.847ms, Maximum = 61.770ms, Average = 41.221ms
PS C:\Users> tcping www.baidu.com 443

Probing 36.152.44.95:443/tcp - Port is open - time=37.494ms
Probing 36.152.44.95:443/tcp - Port is open - time=49.394ms
Probing 36.152.44.95:443/tcp - Port is open - time=27.642ms
Probing 36.152.44.95:443/tcp - Port is open - time=62.850ms

Ping statistics for 36.152.44.95:443
     4 probes sent.
     4 successful, 0 failed.
Approximate trip times in milli-seconds:
     Minimum = 27.642ms, Maximum = 62.850ms, Average = 44.345ms
PS C:\Users>

如果不写端口号,默认探测80端口。

netstat -ano

开启允许ping 命令。

netsh firewall set icmpsetting 8

关闭 禁止Ping 命令。

 netsh firewall set icmpsetting 8 disable
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值