1 Star 0 Fork 4.9K

bill / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ping.md 6.15 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

ping

Command Function

This command is used to test whether the network connection is normal.

Syntax

ping_ [-n cnt_] [-w interval] [-l data_len]_ <IP>_

ping [-t] [-w interval] <IP>

ping -k

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

IP

Indicates the IPv4 address whose network connectivity is to be tested.

N/A

-n cnt

Indicates the number of execution times. If this parameter is not specified, the default value is 4.

1-65535

-w interval

Indicates the interval between two ping packets, in ms.

>0

-l data_len

Indicates the length of the ping packet, that is, the ICMP echo request packet.

The ICMP packet header is not included.

0-65500

-t

Indicates a permanent ping thread, which will be killed until the ping -k command is executed.

N/A

-k

Kills the ping thread and stops the ping operation.

N/A

Usage

  • Run the ping command by setting a destination IP address to check whether the network connection to the destination IP address is normal.
  • If the destination IP address is unreachable, the system displays a message indicating that the request times out.
  • If no route is available to the destination IP address, an error message is displayed.
  • This command can be used only after the TCP/IP protocol stack is enabled.

Example

Enter ping 192.168.1.10.

Output

Figure 1 Output of pinging the IP address of the TFTP server

1
https://gitee.com/ximeibaba/docs.git
git@gitee.com:ximeibaba/docs.git
ximeibaba
docs
docs
master

搜索帮助