0


常见网络测试命令使用【windows】就这几个就够用了

  • 在日常运维过程中常用的windows网络测试命令很多,就这几个就够用了
  • 启动命令行环境:按win+R键,打开运行,输入cmd,点击确定,进入命令行环境
Microsoft Windows [版本 10.0.19044.2251]
(c) Microsoft Corporation。保留所有权利。

C:\Users\Administrator>

1、ping:最常用的测试网络通断的命令

  • 测试网络不通(或者目标主机ip禁ping)
C:\Users\Administrator>ping 58.74.89.10

正在 Ping 58.74.89.10 具有 32 字节的数据:
请求超时。
请求超时。
请求超时。
请求超时。

58.74.89.10 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 0,丢失 = 4 (100% 丢失),
  • 测试是网络连通
C:\Users\Administrator>ping 8.8.8.8

正在 Ping 8.8.8.8 具有 32 字节的数据:
来自 8.8.8.8 的回复: 字节=32 时间=171ms TTL=114
来自 8.8.8.8 的回复: 字节=32 时间=94ms TTL=114
来自 8.8.8.8 的回复: 字节=32 时间=404ms TTL=114
来自 8.8.8.8 的回复: 字节=32 时间=92ms TTL=114

8.8.8.8 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 92ms,最长 = 404ms,平均 = 190ms

2、tracert:路由追踪

C:\Users\Administrator>tracert 8.8.8.8

通过最多 30 个跃点跟踪
到 dns.google [8.8.8.8] 的路由:

  1     4 ms     2 ms     3 ms  DESKTOP-6SI8NI9 [192.168.43.1]
  2    12 ms    15 ms    16 ms  DESKTOP-6SI8NI9 [192.168.50.22]
  3     *        *        *     请求超时。
  4    14 ms   196 ms    97 ms  85.13.221.60.adsl-pool.sx.cn [60.221.13.85]
  5    96 ms    97 ms    98 ms  33.10.221.60.adsl-pool.sx.cn [60.221.10.33]
  6     *        *        *     请求超时。
  7    54 ms    51 ms    60 ms  219.158.19.66
  8    49 ms    54 ms    60 ms  219.158.24.134
  9    72 ms    53 ms    53 ms  219.158.24.230
 10    56 ms    58 ms    58 ms  72.14.213.114
 11    76 ms    68 ms    62 ms  108.170.241.97
 12    55 ms    54 ms    62 ms  142.251.64.175
 13    73 ms    61 ms    64 ms  dns.google [8.8.8.8]

跟踪完成。

3、telnet:查看目的主机ip的端口号是否开放

  • 不开放
C:\Users\Administrator>telnet 192.168.43.88 443
正在连接192.168.43.88...无法打开到主机的连接。 在端口 443: 连接失败
  • 端口开发:输入完后,命令行里面只有一个光标闪动

4、tcping:查看目的主机ip的端口号是否开放(推荐用这个测试端口,因为这个测试端口一目了然)

  • 测试端口不通:
C:\Users\Administrator>tcping 192.168.43.88 8080

Probing 192.168.43.88:8080/tcp - No response - time=2040.514ms
Probing 192.168.43.88:8080/tcp - No response - time=2001.246ms
Probing 192.168.43.88:8080/tcp - No response - time=2004.035ms
Probing 192.168.43.88:8080/tcp - No response - time=2002.689ms

Ping statistics for 192.168.43.88:8080
     4 probes sent.
     0 successful, 4 failed.  (100.00% fail)
Was unable to connect, cannot provide trip statistics.
  • 测试端口通
C:\Users\Administrator>tcping 192.168.43.88 3306

Probing 192.168.43.88:3306/tcp - Port is open - time=41.909ms
Probing 192.168.43.88:3306/tcp - Port is open - time=15.947ms
Probing 192.168.43.88:3306/tcp - Port is open - time=3.582ms
Probing 192.168.43.88:3306/tcp - Port is open - time=15.425ms

Ping statistics for 192.168.43.88:3306
     4 probes sent.
     4 successful, 0 failed.  (0.00% fail)
Approximate trip times in milli-seconds:
     Minimum = 3.582ms, Maximum = 41.909ms, Average = 19.216ms

5、ipconfig:查看本机网卡信息

C:\Users\Administrator>ipconfig

Windows IP 配置

以太网适配器 以太网 3:

   连接特定的 DNS 后缀 . . . . . . . :
   本地链接 IPv6 地址. . . . . . . . : fe80::c97a:e000:f95c:6bb2%12
   IPv4 地址 . . . . . . . . . . . . : 2.0.0.1
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . :

6、route print :查看本机路由信息

C:\Users\Administrator>route print
===========================================================================
接口列表
 12...00 ff 91 f3 3a 22 ......Sangfor aTrust VNIC
 23...e4 e7 49 4a 39 44 ......Realtek PCIe GBE Family Controller
 20...02 00 4c 4f 4f 50 ......Npcap Loopback Adapter
  9...0a 00 27 00 00 09 ......VirtualBox Host-Only Ethernet Adapter
 19...0e 96 e6 17 3e 97 ......Microsoft Wi-Fi Direct Virtual Adapter
 21...8e 96 e6 17 3e 97 ......Microsoft Wi-Fi Direct Virtual Adapter #2
  3...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
 18...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
 24...00 ff fb 7b ec ec ......Sangfor SSL VPN CS Support System VNIC #2
 17...0c 96 e6 17 3e 97 ......Realtek RTL8822BE 802.11ac PCIe Adapter
 14...0c 96 e6 17 3e 98 ......Bluetooth Device (Personal Area Network)
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 路由表
===========================================================================
活动路由:
网络目标        网络掩码          网关       接口   跃点数
          0.0.0.0          0.0.0.0     192.168.43.1    192.168.43.70     55
          2.0.0.0    255.255.255.0            在链路上           2.0.0.1    257
          2.0.0.1  255.255.255.255            在链路上           2.0.0.1    257
        2.0.0.255  255.255.255.255            在链路上           2.0.0.1    257
        127.0.0.0        255.0.0.0            在链路上         127.0.0.1    331
        127.0.0.1  255.255.255.255            在链路上         127.0.0.1    331
  127.255.255.255  255.255.255.255            在链路上         127.0.0.1    331
      169.254.0.0      255.255.0.0            在链路上    169.254.164.83    291
      169.254.0.0      255.255.0.0            在链路上     169.254.57.77    291
      169.254.0.0      255.255.0.0            在链路上   169.254.242.169    281

本文转载自: https://blog.csdn.net/weixin_43313333/article/details/128245757
版权归原作者 小强在学习的路上 所有, 如有侵权,请联系我们删除。

“常见网络测试命令使用【windows】就这几个就够用了”的评论:

还没有评论