From 552df65422627c7efb53b75bb52629a91d7f3f24 Mon Sep 17 00:00:00 2001 From: Yeri Tiete Date: Fri, 4 Sep 2020 17:49:41 +0800 Subject: [PATCH] Make sure IPv4 works when eth0 is connected Resolves an issue where IPv4 traffic would not work when eth0 is connected (i.e. usb-ethernet adapter over OTG). The static route for usb0 precedes the DHCP route for eth0. Only IPv6 traffic would work, but not IPv4 until the metric for usb0 is increase and thus lowered in priority. If no eth0 is plugged in, internet works fine over usb0. --- builder/data/etc/network/interfaces.d/usb0-cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/data/etc/network/interfaces.d/usb0-cfg b/builder/data/etc/network/interfaces.d/usb0-cfg index 445ed90..18c428d 100644 --- a/builder/data/etc/network/interfaces.d/usb0-cfg +++ b/builder/data/etc/network/interfaces.d/usb0-cfg @@ -4,4 +4,5 @@ iface usb0 inet static netmask 255.255.255.0 network 10.0.0.0 broadcast 10.0.0.255 - gateway 10.0.0.1 \ No newline at end of file + gateway 10.0.0.1 + metric 20