刷新 DNS 缓存后,检查网络连接是否正常可以通过以下几种方法进行验证。这些方法可以帮助您确认网络连接的稳定性、DNS 解析是否正确以及是否能够正常访问目标资源。
1. 使用 ping 命令
ping 是一个常用的网络工具,用于测试主机之间的网络连接是否正常。它通过发送 ICMP(Internet Control Message Protocol)回显请求来验证目标主机是否可达。
操作步骤:
打开命令提示符(Win + R,输入 cmd,按 Enter)。
输入以下命令并按回车键:
ping www.example.com
替换 www.example.com 为您想测试的域名或 IP 地址。
如果网络连接正常,您会看到类似以下的输出:
复制Pinging www.example.com [1.1.1.1] with 32 bytes of data: Reply from 1.1.1.1: bytes=32 time=10ms TTL=55 Reply from 1.1.1.1: bytes=32 time=10ms TTL=55 Reply from 1.1.1.1: bytes=32 time=10ms TTL=55 Reply from 1.1.1.1: bytes=32 time=10ms TTL=55 Ping statistics for 1.1.1.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 10ms, Maximum = 10ms, Average = 10ms
如果收到 Reply from 的响应,说明网络连接正常。
如果收到 Request timed out 或 Destination host unreachable,说明网络连接有问题。
如果网络连接正常,您会看到数据包经过的每一跳路径:
复制Tracing route to www.example.com [1.1.1.1] over a maximum of 30 hops: 1 1 ms 1 ms 1 ms router.example.com [192.168.1.1] 2 5 ms 5 ms 5 ms 10.0.0.1 3 10 ms 10 ms 10 ms 1.1.1.1 Trace complete.