I have two different default gateways for different network interfaces like below
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.16.18.1 0.0.0.0 UG 10 0 0 wlp0s20f0u3
0.0.0.0 192.168.13.1 0.0.0.0 UG 5 0 0 enp3s0
The second one has low metric value and it means my active network interface is enp3s0.My queistion is that how to check internet connection using the first(passive) network interface when the second is active ? When i use the
ping -I wlp0s20f0u3 www.google.com
It cannot ping google. But when i use
ping -I enp3s0 www.google.com
I got the answer from ping. Why the first ping command is not working ?
Someone can help me ?