On 04/02/2017 09:48 PM, James Knott wrote:
On 04/02/2017 08:58 PM, John Andersen wrote:
On 04/02/2017 01:52 PM, James Knott wrote:
So, it appears the ip route metric overrides the ping -I <interface> and chooses the lowest cost path regardless. Nope.
ping -I wlan0 lists.opensuse.org will never go out any other interface than wlan0. Metric plays no part.
Actually, I tried it and watched what happened with Wireshark. I also verified the arp cache to see what MAC address was used. As I mentioned, I tried it first with both interfaces on the same network and even though I specified WiFi, it went via Ethernet. When I put the Ethernet port on a different network, the ping then went via WiFi.
I've been wondering, does -I actually force an interface or just specify where the ping command starts from and routing sends it out the other port? I seem to recall Cicso routers do that, but I'll have to verify. When I use -I to specify wlan0, the IP address is the one for wlan0, but the ping still comes out eth0. I just tried an experiment. I used -I wlan0 and used Wireshark to monitor wlan0. There I see the MAC for wlan0 on outgoing pings, but I don't see any replies. Wireshark on the target computer shows packets in both directions, but with the MAC for eth0. When I monitor eth0, I see only the replies to the wlan0 IP address, but eth0 MAC. The ARP cache on the target computer shows the eth0 MAC for both eth0 and wlan0 IP addresses. This implies the ARP reply for the wlan0 address came out through eth0 too. In all cases, the wlan0 IP address was shown. Bottom line, the ping originates from the wlan0 IP & MAC address, gets passed out eth0 with the eth0 MAC and replies are to the wlan0 IP address, but eth0 MAC. The computer is routing to the appropriate interface, based on the metric. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org