Article 5S84G how is ping -I address different from ping -I Interface

how is ping -I address different from ping -I Interface

by
KatrinAlec
from LinuxQuestions.org on (#5S84G)
I need to use -I with ping, and if I understand the man page correctly it shouldn't make a difference if I use
ping -I x.x.x.x y.y.y.y
or
ping -I interface y.y.y.y
if interface has the address x.x.x.x

If I use -I address it uses the routing table to find y.y.y.y and sends ping request out on the correct interface with the correct source IP.
If I use -I interface it still uses the correct source-IP, but it goes out that interface as well and I still want it to use the routing table.

Reason:
I want to use it in a script on different systems.
On each system the interface will have a different address, but it will always be the same interface.
So it would be nice if I could specify the interface as source address without using that interface as outgoing interface.

Did I misinterpret the man-page?latest?d=yIl2AUoC8zA latest?i=QJfh3X0AGC4:m4gRfbIcCGY:F7zBnMy latest?i=QJfh3X0AGC4:m4gRfbIcCGY:V_sGLiP latest?d=qj6IDK7rITs latest?i=QJfh3X0AGC4:m4gRfbIcCGY:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments