![ping命令测试网络](https://i-blog.csdnimg.cn/blog_migrate/c478ce0a35ff2d9a6e87fdb10174492b.png)
ping命令测试网络
Computer networking provides a lot of features for remote usage. But remote access may have some problems. Computer networks provides some basic tools in order to check and detect these problems. In this tutorial we will look some basic ping test in order to check network status.
计算机网络为远程使用提供了许多功能。 但是远程访问可能会有一些问题。 计算机网络提供了一些基本工具来检查和检测这些问题。 在本教程中,我们将查看一些基本的ping测试以检查网络状态。
ICMP (ICMP)
Internet Control Message Protocol is a network protocol designed to communicate between network hosts about network status. Ping test mostly uses ICMP protocol in order to check network connectivity. ICMP have different message types but ping test uses echo
and reply
messages in most situations. More detailed information aboutping
command can be found in the following tutorials.
Internet控制消息协议是一种网络协议,旨在在网络主机之间就网络状态进行通信。 Ping测试主要使用ICMP协议来检查网络连接。 ICMP具有不同的消息类型,但是ping测试在大多数情况下使用echo
和reply
消息。 在以下教程中可以找到有关ping
命令的更多详细信息。
Linux ping Command Tutorial With Examples
Windows Ping实用程序(Windows Ping Utility)
All windows operating systems provides ping
command by default so we do not need to install it explicitly.
默认情况下,所有Windows操作系统都提供ping
命令,因此我们无需显式安装它。
Linux Ping实用程序 (Linux Ping Utility)
Most of the Linux distributions like Fedora, CentOS, RedHat Ubuntu, Debian, Kali, Mint provides ping
by default.
默认情况下,大多数Linux发行版(如Fedora,CentOS,RedHat Ubuntu,Debian,Kali,Mint)都提供ping
。
平测 (Ping Test)
As Linux and Windows version of the ping command works in similar manner we will follow Windows version. We will open command prompt MSDOS or PwerShell like below by using Run
.
由于Linux和Windows版本的ping命令以相似的方式工作,因此我们将遵循Windows版本。 我们将使用Run
打开命令提示符MSDOS或PwerShell,如下所示。
cmd
OR
要么
powershell
Then will will specify the target or destination we want to test with ping command. In this example we will test the IP address 192.168.1.1
然后将使用ping命令指定我们要测试的目标或目的地。 在此示例中,我们将测试IP地址192.168.1.1
> ping 192.168.1.1
![Ping Test](https://i-blog.csdnimg.cn/blog_migrate/7ce97b90f1da0b3fecb67fdebd1212ab.png)
As we can see the ping test is completed without and error or packets loss. Let’s look the results.
如我们所见,ping测试已完成且没有错误或数据包丢失。 让我们看一下结果。
bytes
specifies the ICMP packet sizebytes
指定ICMP数据包大小times
specifies the the requires packet to transmit and receive to targettimes
指定目标数据包向目标发送和接收的需求TTL
specifies the intermediate host counts. Windowsping
uses 64 as defaultTTL
value.TTL
指定中间主机计数。 Windowsping
使用64作为默认TTL
值。sent
specifies the packet count sentsent
指定sent
的数据包计数received
specifies packet count receivedreceived
指定received
数据包计数lost
specifies packet count lostlost
指定lost
数据包计数
Ping测试主机名(Ping Test Host Name)
We can also use ping test to a host name. Host name specifies a host with a name not an IP address. Host name is easier to use and remember that a IP address. In this example we will ping test to poftut.com
as a target.
我们还可以对主机名使用ping测试。 主机名指定的主机名不是IP地址。 主机名更易于使用,并且记住该IP地址。 在此示例中,我们将ping测试以poftut.com
为目标。
> ping poftut.com
Ping测试Google.com (Ping Test Google.com)
One of the most used internet connectivity test is pinging google.com
. As google servers provides high availability which means they are all ways up we can use google.com
as a measure . We can ping test our internet with DNS and internet connection like below.
ping google.com
是最常用的互联网连接测试之一。 由于google服务器提供高可用性,这意味着它们可以使我们充分利用google.com
作为衡量标准。 我们可以使用DNS和如下所示的Internet连接ping测试我们的互联网。
> ping google.com
翻译自: https://www.poftut.com/do-a-computer-ping-test-command-to-check-network-connectivity/
ping命令测试网络