How is the source IP address of ping packets specified

The -a parameter specifies the source IP address of ping packets.

If -a is not specified, the system searches for the outbound interface mapping the destination IP address in the routing table and uses the outbound interface's IP address as the source IP address of ping packets.

If there are equal-cost routes to the destination IP address, the system performs the hash algorithm based on the destination IP address, protocol number, ICMP type, and ICMP mode and selects the outbound interface's IP address as the source IP address of ping packets.

Scroll to top