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

  • Hello,does your PC have multiple DGs ? Also may be do a sh ip route to see which route the router is preferring and may be some debug feature. Traceroute ? If you can share your topology then it could be easier to get the option. – Bharat C Penumutchu Apr 25 at 13:26

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.


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

ping -I
PING ( from : 56(84) bytes of data.
64 bytes from 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.

| improve this answer | |
  • in this case you are simply binding the interface not sure if the -I flag is available on Cisco IOS. I think trace route may be the best option ? – Bharat C Penumutchu Apr 25 at 13:28

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.