Specifying the source address for ICMP packets
Perform this task to specify the source IP address for outgoing ping echo requests and ICMP error messages. As a best practice, specify the IP address of the loopback interface as the source IP address. This feature helps users to locate the sending device easily.
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.
To specify the source IP address for ICMP packets:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Specify the source address for outgoing ICMP packets. | ip icmp source 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. |