I often use the ping -I
option to test if an interface forwards packets correctly.
A Raspberry Pi 3 has an interface named eth1. It is a USB to female ethernet connector. I manually configured this interface with the ip address 172.22.22.1/24.
When I perform ping -I eth1 example.com
I receive a "Destination host not reachable" message.
However when I issue ping -I 172.22.22.1 example.com
, the ping command replies correct.
I am curious why the results differ. Can anybody explain?
ip -br link; ip -4 -br address; ip -4 route; ip -4 rule
as well as (for a few hints)ip -4 neigh
after having tried both kinds of ping. Of course the effect of both kinds of ping is different but without seeing the configuration first, it's not worth trying to explain an hypothetical cause.