ping

Function

The ping command checks the connectivity of an IP network and reachability of a host.

Format

ping [ ip ] { [ -c count | { { -i { interface-name | interface-type interface-number } | -nexthop nexthop-address } * | -si { source-interface-name | source-interface-type source-interface-number } } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -q | -r | -vpn-instance vpn-instance-name | -v | -name | -system-time | -ri | -8021p 8021p-value | -detail ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { { -i { interface-name | interface-type interface-number } | -nexthop nexthop-address } * | -si { source-interface-name | source-interface-type source-interface-number } } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -vpn-instance vpn-instance-name | -name | -8021p 8021p-value | -brief ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { { -i { interface-name | interface-type interface-number } | -nexthop nexthop-address } * | -si { source-interface-name | source-interface-type source-interface-number } } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | { -vpn-instance vpn-instance-name [ peer peerIpv6 ] } | -8021p 8021p-value | -name | -brief ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { { -i { interface-name | interface-type interface-number } | -nexthop nexthop-address } * | -si { source-interface-name | source-interface-type source-interface-number } } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -q | -r | { -vpn-instance vpn-instance-name [ peer peerIpv6 ] } | -v | -d | -system-time | -ri | -8021p 8021p-value | -name | -detail ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { -i { interface-name | interface-type interface-number } [ -fri ] } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -vpn-instance vpn-instance-name | -8021p 8021p-value | -name | { -brief | [ -q | -detail | -v | -d | -system-time | -ri ] * } | -service-class classValue ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { { -i { interface-name | interface-type interface-number } | -nexthop nexthop-address } * } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -q | -r | -vpn-instance vpn-instance-name | -v | -d | -system-time | -ri | -8021p 8021p-value | -name | -detail | -service-class classValue ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { { -i { interface-name | interface-type interface-number } | -nexthop nexthop-address } * } | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -vpn-instance vpn-instance-name | -8021p 8021p-value | -name | -brief | -service-class classValue ] * host [ ip-forwarding ] }

ping [ ip ] { [ -c count | { -s packetsize | -range [ [ min min-value | max max-value | step step-value ] * ] } | -t timeout | -m time | -a source-ip-address | -h ttl-value | -p pattern | { -tos tos-value | -dscp dscp-value } | { -f | ignore-mtu } | -q | -vpn-instance vpn-instance-name | -v | -system-time | -ri | -name ] * host bypass -si { frrSrcIfName | frrSrcIfType frrSrcIfNum } }

Parameters

Parameter Description Value
ip

Specifies the IPv4 protocol.

The default value is IPv4.

-c count

Specifies the maximum number of times for sending ICMP echo request packets.

After you run the ping command, the sequence number of an ICMP echo request packet starts from 1 and is incremented by 1 each time an ICMP echo request packet is sent. By default, five ICMP echo request packets are sent. You can use count to specify the number of ICMP echo request packets to be sent. If the peer is reachable, it sends five ICMP Echo Response packets with the same sequence numbers as those of the ICMP echo request packets.

In the case of a poor network quality, increase the count value and monitor network quality based on the packet loss ratio.

The value is an integer ranging from 1 to 4294967295. The default value is 5.

-i interface-name

Specifies the interface through which ICMP echo request packets are sent.

For broadcast links (on the Ethernet), the specified destination address functions as the next hop address.

The value is a string of 1 to 63 characters.

interface-type

Specifies the type of an interface through which ICMP echo request packets are sent.

For broadcast links (on the Ethernet), the specified destination address functions as the next hop address.

-

interface-number

Specifies the number of an interface through which ICMP echo request packets are sent.

For broadcast links (on the Ethernet), the specified destination address functions as the next hop address.

-

-nexthop nexthop-address

Specifies an IP address for the next hop.

If you have specified this parameter, the device no longer searches the routing table before sending ICMP Echo Response packets. This process prevents ping failures caused by incorrect routing entries.

The value is in dotted decimal notation.

  • The specified next hop address must be the next hop address of a directly connected physical interface.
  • When specifying the next hop address, you can configure -i interface-type interface-number to specify the outbound interface. The following conditions must be met to ensure a test success:
    1. The specified next hop address must match the outbound interface.
    2. The specified outbound interface cannot be a logical interface';s member interface.
  • When you specify the next hop address, you cannot specify a VPN.
-si source-interface-name

Specifies the inbound interface name of ICMP echo request packets to simulate the sending of packets by a remote device. This parameter is set to check faults in the path for forwarding packets received from a specified interface.

The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces.

source-interface-type

Specifies the inbound interface type of ICMP echo request packets to simulate the sending of packets by a remote device. This parameter is set to check faults in the path for forwarding packets received from a specified interface.

-

source-interface-number

Specifies the inbound interface number of ICMP echo request packets to simulate the sending of packets by a remote device. This parameter is set to check faults in the path for forwarding packets received from a specified interface.

-

-s packetsize

Specifies the length of an ICMP Echo Request message (excluding the IP header and ICMP header).

The value is an integer ranging from 20 to 9600, in bytes. The default value is 56, in bytes.

-range

Enables the device to send ICMP echo request messages with variable payload lengths.

  • If -range is not specified, the length of the sent packet is -s packetsize. The default value is 56.
  • If -range is specified, the length of the first sent packet is min min-value, and the lengths of subsequent packets increase by step step-value until the packet length reaches max max-value.

By default, the payload length ranges from 56 to 9600, and the step is 1.

  • During the execution, you can press Ctrl+C to terminate the execution.
  • You can adjust the values of min min-value and max max-value to control the number of packets to be sent. The value of min min-value must be smaller than that of max max-value.
  • If both the -range and -c count parameters are specified, the device sends ICMP Echo Request messages of the same payload length for the number of times specified by the -c count parameter.
min min-value

Specifies the minimum payload length of an ICMP echo request message.

The value is an integer ranging from 20 to 9600, in bytes. The default value is 56, in bytes.

max max-value

Specifies the maximum payload length of an ICMP echo request message.

The value is an integer ranging from 20 to 9600, in bytes. The default value is 9600.

step step-value

Specifies the step length of an ICMP echo request message.

The value is an integer in the range from 1 to 1000. The default value is 1.

-t timeout

Specifies the timeout period for waiting for an ICMP Echo Reply message after an ICMP Echo Request message is sent.

The ping command sends an ICMP Echo Request message to an IP address and waits for an ICMP Echo Reply message. If the ICMP Echo Request message reaches the destination IP address and an ICMP Echo Reply message is sent to the source IP address within the timeout period, the destination IP address is reachable. If no response is received within the timeout period, a timeout message is displayed on the sender.

In normal cases, a reply message is received within 1 to 10 seconds after an ICMP Echo Request message is sent. When the network transmission rate is low, you can use this parameter to increase the timeout time of the response to the ICMP Echo Request message.

The value is an integer ranging from 0 to 65535, in milliseconds. The default value is 2000.

-m time

Specifies the time to wait before sending the next ICMP Echo Request message.

After sending an ICMP Echo Request message, the device waits for a reply message. By default, the device waits for 500 ms before sending the next ICMP Echo Request message. You can use the time parameter to set the interval at which ICMP Echo Request messages are sent. If network quality is poor, setting this parameter to a value greater than or equal to 2000 ms is recommended.

The value is an integer ranging from 1 to 10000, in milliseconds. The default value is 500.

-a source-ip-address

Specifies the source IP address for ICMP echo request packets.

If no source IP address is specified, the IP address of the outbound interface is used.

The value is in dotted decimal notation.

-h ttl-value

Specifies the TTL value.

If the TTL value in a packet is reduced to 0 during forwarding, the device that receives the packet sends an ICMP timeout packet to the source, indicating that the destination is unreachable.

The value is an integer that ranges from 1 to 255. The default value is <b>255</b>.

-p pattern

Specifies the padding byte of ICMP echo request packets.

The padding byte allows the system to identify a specific packet among a great number of received ICMP Echo Response packets.

The value is a hexadecimal number ranging from 0 to FFFFFFFF. By default, the padding starts from 0x00.

-tos tos-value

Specifies the ToS value of an ICMP echo request packet.

The priority of an ICMP packet is determined by the ToS value.

The value is an integer that ranges from 0 to 255. The default value is 0.

-dscp dscp-value

Specifies a DSCP value for ICMP Echo Request messages to be sent.

The value is an integer in the range from 0 to 63. The default value is <b>0</b>.

-f

Indicates that packets are not fragmented during transmission.

By default, packets will be fragmented during transmission.

ignore-mtu

Indicates that the system does not check the interface MTU when a packet is sent.

-

-q

Indicates that only statistics are displayed. By default, all information is displayed.

If -q is specified in the ping command, the system displays only statistics about sent and received packets, packet loss ratio, and minimum, average, and maximum RTTs.

By default, the system displays all information.

-r

Records routes.

If -r is configured, the IP address of each device that the IP packet passes along the packet transmission path is recorded in the Options field. When the IP packet reaches the destination, all IP addresses recorded in the Options field are copied to an ICMP Echo Response packet. In addition, the IP address of each device that the ICMP Echo Response packet passes through is recorded. When the ping program receives the reply, IP addresses of the passed devices are displayed.

By default, the route along which an IP packet is forwarded is not recorded.

-vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value is a string of 1 to 31 case-sensitive characters. It cannot contain spaces. The VPN instance name cannot be _public_. If spaces are used, the string must be enclosed in double quotation marks (").

-v

Enables the device to display ICMP echo reply packets that are received by but not for this device. For example, a packet times out, or the sequence number of a packet is incorrect.

  • If -v is not configured, the system displays only the ICMP Echo Response packets received by the local user.If -v is configured, the system displays all received ICMP Echo Response packets.
  • If the sequence number of a received ICMP Echo Response packet is incorrect or the packet delay is longer than the timeout period, the system displays a detailed message.

By default, non-user ICMP Echo Reply messages are not displayed.

-d

Specifies the SO_DEBUG option on the socket being used.

-

-system-time

Displays the time when ICMP Echo Request packets are sent.

-

-ri

Indicates that the source interface of echo response packet is displayed.

-

-8021p 8021p-value

Specifies the 802.1p value of ICMP Echo Request messages to be sent.

The value is an integer ranging from 0 to 7. The default value is <b>0</b>.

-name

Displays the host name of the destination address.

-

-detail

Displays detailed information about packet loss.

-

host

Specifies the IP address or hostname of a remote system.

The value is a string of case-sensitive characters and cannot contain spaces.

ip-forwarding

Indicates that the ping packets are forcibly forwarded through IP on the first node.

-

-brief

Displays brief information about packet loss.

-

peer peerIpv6

Specifies a peer SID, that is, the address of the last hop in the SRv6 domain, in EVPN L3VPN over SRv6 BE scenarios.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

-fri

An echo reply packet is rapidly sent from the specified Eth-Trunk member interface. If the -fri flag is set to true, only an Eth-Trunk member interface can be specified as an outbound interface. In this case, specifying the ri flag is recommended, which facilitates the query of the actual interface that responds to the packets.

This function takes effect only in directly connected scenarios where an Eth-Trunk member interface functions as the inbound interface. In scenarios where this function does not take effect, response packets are sent based on the routing table.

Fragmented packets do not support fast reply, and therefore the fri flag does not take effect.

-

-service-class classValue

In an SRv6 TE Policy group scenario, you can specify this parameter to select a path.

The value is of the numerated type, and can be be, af1, af2, af3, af4, ef, cs6, or cs7.

bypass

Indicates that packets are sent through the bypass IP path.

-

frrSrcIfName

Specifies the inbound interface name of ICMP echo request packets to simulate the sending of packets by a remote device. This parameter is set to check faults in the path for forwarding packets received from a specified interface.

-

frrSrcIfType

Specifies the inbound interface type of ICMP echo request packets to simulate the sending of packets by a remote device. This parameter is set to check faults in the path for forwarding packets received from a specified interface.

-

frrSrcIfNum

Specifies the inbound interface number of ICMP echo request packets to simulate the sending of packets by a remote device. This parameter is set to check faults in the path for forwarding packets received from a specified interface.

-

Views

All views

Default Level

0: Visit level

Task Name and Operations

Task Name Operations
tailmode2 execute

Usage Guidelines

Usage Scenario

Ping is a common debugging tool used to test the network connectivity. It uses ICMP packets to check the following items:

  • Whether the remote device is available.
  • Round-trip delay of packets transmitted between the local and remote devices.
  • Whether packet loss occurs and what is the packet loss ratio.

    You can use the ping command to check network connectivity or line quality in the following scenarios:
  • Check the protocol stack on the local device. The ping loopback-address command checks whether the TCP/IP protocol suite works properly on the local device.
  • Check whether the destination host is reachable on an IP network. You can run the ping host command to send an ICMP echo request packet to the destination host. If a reply is received, it means that the destination host is reachable.
  • Check whether the peer is reachable on an L3VPN. On an L3VPN, devices may lack routing information about each other, and run the ping -vpn-instance vpn-instance-name host command, not the ping host command, to check whether the peer is reachable. If the VPN instance name is specified, an ICMP echo request packet can reach the peer. If a reply is received, the peer is reachable.
  • On an unstable network, run the ping -c count -t timeout host command to roughly determine the network quality between the local device and the peer host. The command output contains the packet loss rate and average delay for you to evaluate the network quality. If the network quality is poor, setting greater values for the count and timeout parameters is recommended to obtain more accurate testing results.
  • Check the path. You can run the ping -r host command to obtain information about nodes along the path from the local device to the peer.
  • Check the path MTU. You can run the ping { -f | ignore-mtu } -s packetsize host command to prevent ICMP packet fragmentation, or the system does not check the interface MTU when a packet is sent, and set the length of an ICMP packet so as to obtain the path MTU after multiple probes.
  • Check whether the ping operation failed due to a failure in an MPLS or IP network. You can run the ping -si command to specify forcible IP forwarding of ping packets on the first node to check whether the IP network fails. Currently, only ICMP echo request packets can be forcibly forwarded over an IP network, although ICMP echo reply packets cannot be forcibly forwarded over an IP network. The ip-forwarding command can be used only with the parameter -c, -m, -p, -q, -s, -t, or -tos. Note: This scenario supports only basic networking directly connected to an LDP LSP, but does not support networking connected to non-LDP LSP tunnels or load balancing on the ingress.
  • If system resources are insufficient, error information is displayed.
  • To display brief information about packet loss, set the -brief parameter.

Prerequisites

  • Before running the ping command, ensure that the ICMP module is working properly.
  • If the -vpn-instance parameter is specified, ensure that the VPN module is working properly.

Configuration Impact

  • If the destination host is unreachable, you cannot run the ping command to check network connectivity or locate a line fault. In this case, the system displays "Request time out", indicating that the ICMP Echo Request packet times out.
  • If an intermediate device is disabled from responding to ICMP packets, detection on this node fails.

Precautions

  • If an exception occurs during the execution of the ping command, you can press Ctrl+C to terminate the execution.
  • The ping command does not allow users to send ping packets to a broadcast address, such as XX.XX.XX.255/24.
  • If both -c and -range are configured, -c indicates the number of packets sent at each step.
  • In an SRv6 TE flow group scenario where routes are recursed based on DSCP values, if the -service-class keyword is specified, the ping command fails to be run.

Example

# Check whether the host with IP address 10.1.1.2 is reachable.
<HUAWEI> ping 10.1.1.2
  PING 10.1.1.2 : 56 data bytes , press CTRL_C to break 
    Reply from 10.1.1.2 : bytes=56 sequence=1 ttl=255 time = 1ms 
    Reply from 10.1.1.2 : bytes=56 sequence=2 ttl=255 time = 2ms 
    Reply from 10.1.1.2 : bytes=56 sequence=3 ttl=255 time = 1ms 
    Reply from 10.1.1.2 : bytes=56 sequence=4 ttl=255 time = 3ms 
    Reply from 10.1.1.2 : bytes=56 sequence=5 ttl=255 time = 2ms 

  --10.1.1.2 ping statistics-- 
    5 packet(s) transmitted 
    5 packet(s) received 
    0.00% packet loss 
    round-trip min/avg/max = 1/2/3 ms
# Check whether the host with IP address 10.1.1.2 is reachable. Set the source address to 1.1.1.1 and the number of ICMP echo request packets to be sent to 8.
<HUAWEI> ping -a 1.1.1.1 -c 8 10.1.1.2
  PING 10.1.1.2: 56 data bytes, press CTRL_C to break 
    Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=6 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=7 ttl=255 time=32 ms 
    Reply from 10.1.1.2: bytes=56 Sequence=8 ttl=255 time=32 ms 

  --- 10.1.1.2 ping statistics --- 
    8 packet(s) transmitted 
    8 packet(s) received 
    0.00% packet loss 
    round-trip min/avg/max = 32/32/32 ms
# Check whether the host with IP address 10.1.1.3 is reachable and display detailed information.
<HUAWEI> ping -detail 10.1.1.3
  PING 10.1.1.3: 56 data bytes, press CTRL_C to break
    Request time out (unroutable)
    Request time out (unroutable)
    Request time out (unroutable)
    Request time out (unroutable)
    Request time out (unroutable)

  --- 10.1.1.3 ping statistics ---
    5 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss
# Enable the device to send ICMP echo request messages with variable payload lengths.
<HUAWEI> ping -range min 56 max 60 192.168.1.9
  PING 192.168.1.9: 56-60  data bytes, press CTRL_C to break
    Reply from 192.168.1.9: bytes=56 Sequence=1 ttl=255 time=80 ms
    Reply from 192.168.1.9: bytes=57 Sequence=2 ttl=255 time=60 ms
    Reply from 192.168.1.9: bytes=58 Sequence=3 ttl=255 time=80 ms
    Reply from 192.168.1.9: bytes=59 Sequence=4 ttl=255 time=80 ms
    Reply from 192.168.1.9: bytes=60 Sequence=5 ttl=255 time=50 ms

  --- 192.168.1.9 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 50/70/80 ms
# Check whether the host with IP address 10.1.1.2 is reachable. Set the length of an ICMP echo request packet to 300 bytes, the time for waiting for the next ICMP echo request packet to 3000 ms, and the VPN instance name to vpna.
<HUAWEI> ping -m 3000 -s 300 -vpn-instance vpna 10.1.1.2
  PING 10.1.1.2: 300 data bytes, press CTRL_C to break 
    Reply from 10.1.1.2: bytes=300 Sequence=1 ttl=255 time=31 ms 
    Reply from 10.1.1.2: bytes=300 Sequence=2 ttl=255 time=31 ms 
    Reply from 10.1.1.2: bytes=300 Sequence=3 ttl=255 time=31 ms 
    Reply from 10.1.1.2: bytes=300 Sequence=4 ttl=255 time=31 ms 
    Reply from 10.1.1.2: bytes=300 Sequence=5 ttl=255 time=31 ms 

  --- 10.1.1.2 ping statistics --- 
    5 packet(s) transmitted 
    5 packet(s) received 
    0.00% packet loss 
    round-trip min/avg/max = 31/31/31 ms
# Enable the device to display ICMP echo reply packets that are received by but not for this device. The sequence numbers of the packets are incorrect, and the packet delay is longer than the timeout period.
<HUAWEI> ping -v -m 300 -t 300 10.0.0.1
  PING 10.0.0.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 10.0.0.1: bytes=56 Sequence=2 ttl=255 time=259 ms
    Error: Sequence number = 1 is less than the correct = 3!
    Request time out
    Error: Trip time = 320 ms is longer than wait time = 300 ms!
    Reply from 10.0.0.1: bytes=56 Sequence=4 ttl=255 time=280ms
    Reply from 10.0.0.1: bytes=56 Sequence=5 ttl=255 time=256 ms

  --- 10.0.0.1 ping statistics ---
    5 packet(s) transmitted
    3 packet(s) received
    40.00% packet loss
    round-trip min/avg/max = 256/265/280 ms
# Perform reverse domain name parsing to convert the IP address into a domain name.
<HUAWEI> ping -c 2 -a 192.168.10.2 -name 192.168.10.2
  PING 192.168.10.2 (www.huawei.com): 56  data bytes, press CTRL_C to break
    Reply from 192.168.10.2: bytes=56 Sequence=1 ttl=255 time=18 ms
    Reply from 192.168.10.2: bytes=56 Sequence=2 ttl=255 time=8 ms

  --- 192.168.10.2 ping statistics ---
    2 packet(s) transmitted
    2 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 8/13/18 ms
# Check the connectivity of the bypass path with the destination address of 192.168.12.2.
<HUAWEI> ping 192.168.12.2 bypass -si GigabitEthernet 0/1/24
  PING 192.168.12.2: 56 data bytes, press CTRL_C to break 
    Reply from 192.168.12.2: bytes=56 Sequence=1 ttl=254 time=1 ms 
    Reply from 192.168.12.2: bytes=56 Sequence=2 ttl=254 time=1 ms 
    Reply from 192.168.12.2: bytes=56 Sequence=3 ttl=254 time=1 ms 
    Reply from 192.168.12.2: bytes=56 Sequence=4 ttl=254 time=1 ms 
    Reply from 192.168.12.2: bytes=356 Sequence=5 ttl=254 time=1 ms 

  --- 192.168.12.2 ping statistics --- 
    5 packet(s) transmitted 
    5 packet(s) received 
    0.00% packet loss 
    round-trip min/avg/max = 1/1/1 ms
# Check whether the host with IP address 10.1.1.2 is reachable and display brief information.
<HUAWEI> ping -brief 10.1.1.2
  PING 10.1.1.2: 56  data bytes, press CTRL_C to break
    !!!!!

  --- 10.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms
# Perform forward domain name parsing to convert the domain name into an IP address.
<HUAWEI> ping www.huawei.com
  PING www.huawei.com (192.168.10.2): 56  data bytes, press CTRL_C to break
    Reply from 192.168.10.2: bytes=56 Sequence=1 ttl=255 time=7 ms
    Reply from 192.168.10.2: bytes=56 Sequence=2 ttl=255 time=10 ms
    Reply from 192.168.10.2: bytes=56 Sequence=3 ttl=255 time=7 ms
    Reply from 192.168.10.2: bytes=56 Sequence=4 ttl=255 time=11 ms
    Reply from 192.168.10.2: bytes=56 Sequence=5 ttl=255 time=11 ms

  --- www.huawei.com ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 7/9/11 ms
Table 1 Description of the ping command output
Item Description
PING x.x.x.x

IP address of the destination host.

press CTRL_C to break

You can terminate the ongoing ping test by pressing Ctrl+C.

Reply from x.x.x.x

Response from the destination host to each ICMP Echo Request message, including:

  • bytes: length of the ICMP Echo Reply message.
  • sequence: sequence number of the response packet.
  • ttl: TTL value of the ICMP Echo Reply packet.
  • time: response time, in ms. If no response packet is received after the timeout period, the message "Request time out" is displayed.
Request time out(xxxx)

Request times out. The timeout cause is displayed, which can be:

  • unroutable: The route is not reachable.
  • no ARP: There are no ARP entries.
  • outgoing interface down: The outbound interface is down.
  • icmp_id is xxxx not xxxx: The ICMP ID is incorrect.
  • sequence is xxxx not xxxx: The sequence is incorrect.
  • ttl iquals 0 during transit: The TTL times out, causing an error.

Other causes of packet loss are not displayed.

x data bytes

Length of the sent ICMP Echo Request message.

x.x.x.x ping statistics

Statistics collected after the ping test is performed on the destination host, including:

  • packets transmitted: number of the sent ICMP Echo Request packets.
  • packets received: number of received ICMP Echo Reply packets.
  • % packet loss: percentage of the number of packets with no response to the total number of packets with responses.
  • round-trip min/avg/max: minimum, average, and maximum response time.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >