Specifying the source address for ICMP packets

About specifying source address for ICMP packets

Specifying the source IP address for outgoing ping echo requests and ICMP error messages helps users to locate the sending device easily. As a best practice, specify the IP address of the loopback interface as the source IP address.

Restrictions and guidelines

If you specify an IP address in the ping command, ping echo requests use the specified address as the source IP address rather than the IP address specified by the ip icmp source command.

Procedure

  1. Enter system view.

    system-view

  2. Specify the source address for outgoing ICMP packets.

    ip icmp source [ vpn-instance vpn-instance-name ] ip-address

    By default, no source address is specified for outgoing ICMP packets. The device uses the IP address of the sending interface as the source IP address for outgoing ICMP packets.