How to route traffic over specific interface on linux (debian)?
1
vote
1
answer
1982
views
I would like to route traffic over usb0 (a cellular modem) when it is available instead of eth0. The ip address for usb0 may change over time. How do I create a route in this scenario since the ip address may change?
I tried:
ip route add default dev usb0
but when I do this, I am able to ping from usb0 but no longer through eth0. Any thoughts why?
Destination Gateway Genmask Flags Metric Ref Use Iface
default 172.24.1.1 0.0.0.0 UG 10 0 0 eth0
172.19.200.136 * 255.255.255.252 U 0 0 0 usb0
172.24.1.0 * 255.255.255.0 U 0 0 0 eth0
Asked by Felix
(11 rep)
May 17, 2018, 01:32 AM
Last activity: Apr 30, 2025, 11:00 PM
Last activity: Apr 30, 2025, 11:00 PM