Configuring the ICMP echo operation

The ICMP echo operation measures the reachability of a destination device. It has the same function as the ping command, but provides more output information. In addition, if multiple paths exist between the source and destination devices, you can specify the next hop for the ICMP echo operation.

To configure the ICMP echo operation:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create an NQA operation and enter NQA operation view.

nqa entry admin-name operation-tag

By default, no NQA operations exist.

3. Specify the ICMP echo type and enter its view.

type icmp-echo

N/A

4. Specify the destination IP address for ICMP echo requests.

  • IPv4 address:destination ip ip-address

  • IPv6 address:destination ipv6 ipv6-address

By default, no destination IP address is specified.

5. (Optional.) Set the payload size for each ICMP echo request.

data-size size

The default setting is 100 bytes.

6. (Optional.) Specify the payload fill string for ICMP echo requests.

data-fill string

The default payload fill string is the hexadecimal string 00010203040506070809.

7. (Optional.) Specify the output interface for ICMP echo requests.

out interface interface-type interface-number

By default, the output interface for ICMP echo requests is not specified. The NQA client determines the output interface based on the routing table lookup.

8. (Optional.) Specify the source IP address for ICMP echo requests.

  • Use the IP address of the specified interface as the source IP address:source interface interface-type interface-number

  • Specify the source IPv4 address:source ip ip-address

  • Specify the source IPv6 address:source ipv6 ipv6-address

By default, the requests take the primary IP address of the output interface as their source IP address.

If you execute the source interface, source ip, and source ipv6 commands multiple times, the most recent configuration takes effect.

The specified source interface must be up.

The specified source IP address must be the IP address of a local interface, and the interface must be up. Otherwise, no probe packets can be sent out.

9. (Optional.) Specify the next hop IP address for ICMP echo requests.

  • IPv4 address:next-hop ip ip-address

  • IPv6 address:next-hop ipv6 ipv6-address

By default, no next hop IP address is configured.