2

When we ping from a router to a host in an external network, how do we know what is the origin IP of the packet?
I searched and I didn't find a way to select which interface is the starting point of the ping.
So is the router taking a default pattern of "what to do in case we ping something"?
I'm using Packet Tracer 7.1.1

3

The default behavior of a ping (of any traffic originated from a machine unless explicitly configured to behave differently) is to use the IP address of the interface closest to the destination.

The device will lookup its routing table, find the interface that will be used to send the packet and use the (primary) IP address of this interface.

On real device, you can often override this behavior with the -I option of ping followed by the interface name or the IP address you want to use.

Example:

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=4.72 ms

ping -I 198.51.100.193 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 198.51.100.193 : 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=56 time=4.87 ms

I don't know if this option is available in packet tracer, which is a simulator with a limited set of features and options, but you can try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.