Using Ping to Check Link Connectivity on an IPv4 or IPv6 Network

The ping operation monitors link connectivity and host reachability on a network. In a ping operation, the source sends an Internet Control Message Protocol (ICMP) Request message to the destination and the destination returns an ICMP Response message to the source.

Context

Ping is a common debugging tool used to test the reachability of devices. It uses ICMP Echo messages to determine the following:
  • Whether the remote device is available.

  • Round-trip delay of the communication with the remote host.

  • Whether packet loss occurs.

The ping command labels each ICMP Echo Request message with a sequence ID that starts from 1 and is increased by 1. The number of ICMP Echo Request messages to be sent is determined by the device, and the default number is 5. The number of ICMP Echo Request messages to be sent can also be set. If the destination is reachable, it sends five ICMP Echo Reply messages to the source, with their sequence numbers identical with that of ICMP Echo Request messages.

Perform the following steps in any view on the client:

Procedure

  1. Check whether network connectivity is proper. You can run a different command to display detailed or brief information.

    • To check detailed information, run the 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 | -system-time | -ri | -8021p 8021p-value| | -name | -detail ] * host [ ip-forwarding ] }
    • To check brief informaiton, run the 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 ] | -ri | -8021p 8021p-value | | -name | -brief | -service-class classValue ] * host [ ip-forwarding ] } or 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 ] } command.

    The ping command output includes the following:

    • Response to each ping packet: If no ICMP Echo Reply message is received within a specified period of time, the message reading "Request time out" is displayed. If a Reply message is received, the data bytes, packet sequence number, TTL value, and response time carried in the message are displayed.

    • Final statistics: The number of ICMP Echo Request messages, number of ICMP Echo Reply messages, percentage of non-response packets, and the minimum, maximum, and average values of the response time are displayed.

    <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

    On an IPv6 network, you need to run the ping ipv6 command. For details, see the Command Reference.

  2. (Optional) Enable the fast ICMP reply function.

    In VS mode, this command is supported only by the admin VS.

    1. Run the icmp-reply fast command in the system view to enable the fast ICMP reply function on a device.
    2. Run the icmp-reply fast command in the slot view to enable the fast ICMP reply function on a specified the interface board.
    3. Run the commit command to commit the configuration.

    The jitter time and delay time in ping processes are great. This is because the ICMP packets used in ping operations need to be processed by the CPUs of devices and the processing produces great delays. The details are as follows:
    • To minimize the impact of ping attacks on itself, the NetEngine 8000 F reduces the ICMP packet processing priority to the lowest level.

    To resolve ping delay and jitter issues, devices provide the ICMP fast reply function. After this function is enabled, received ICMP request packets are not sent to the CPU for processing. Instead, the PFE of the interface board responds to the source end with ICMP reply packets, greatly shortening the ping delay.

    After the undo icmp-reply fast command is run in the system or slot view, the fast ICMP reply function is disabled on the interface board. After the fast ICMP reply function is disabled on the interface board, the fast ICMP reply function takes effect on the interface board only after the icmp-reply fast command is run in both the system and slot views.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >