Why ping with source address

ping

What is the practical use of it?

Just pinging the target from whatever interfaces and then getting the reply can already ensure the target is up. So, why do we have to specify the source IP Address?

Thanks.

Best Answer

The biggest reason is that the return path from the destination back to you may depend on the source address. Often you want to test the network path in both directions.

Furthermore things like policy routing, ingress filtering, firewalls, NAT etc may behave differently depending on the source address.