Hello, how to rioritaze eth0, eth1 or bond0 interface over wlan0 / WiFi interface?
I have Orange Pi 5 Plus and so respectvely created bond0 interface by joining eth0 and eth1, also using tailscale, and want to have WiFi as just as backup so I want to have prioritizied my bond0 interface over wlan0.
I tried the to add like this:
sudo tee -a /etc/network/interfaces.d/wlan0 << 'EOF'
auto wlan0
iface wlan0 inet dhcp
metric 101
EOF
sudo systemctl restart networking ; sudo ifup wlan0
when I do so - I can connect via tailscale but system DNS can not resolv anything even though it has correctly setup /etc/resolv.conf. When I delete /etc/network/interfaces.d/wlan0 - everything starts to work normally again and /etc/resolv.conf stays the same - resolving works again, but priority goes back to wlan0 interface. The only solution to disable WiFi adapter, but I do not want to do so.
Can you be more specific about what you did where? Normally it is not a problem to customise /etc/network/interfaces as it is a standard Debian configuration file for ifupdown. In any case, it is not DietPi-specific.
.
.
.
tailscale works, but resolving something else - is impossible
jjaard@JJRD-Fida:~$ ip route show table all
100.66.244.28 dev tailscale0 table 52
100.69.15.29 dev tailscale0 table 52
100.69.151.87 dev tailscale0 table 52
100.74.76.125 dev tailscale0 table 52
100.81.29.125 dev tailscale0 table 52
100.85.57.108 dev tailscale0 table 52
100.90.24.12 dev tailscale0 table 52
100.90.211.85 dev tailscale0 table 52
100.100.100.100 dev tailscale0 table 52
100.105.165.69 dev tailscale0 table 52
100.106.207.33 dev tailscale0 table 52
100.108.131.124 dev tailscale0 table 52
100.111.254.111 dev tailscale0 table 52
100.112.84.36 dev tailscale0 table 52
100.112.184.45 dev tailscale0 table 52
100.114.208.19 dev tailscale0 table 52
100.115.227.110 dev tailscale0 table 52
100.116.54.60 dev tailscale0 table 52
100.122.29.87 dev tailscale0 table 52
100.127.134.96 dev tailscale0 table 52
default via 192.168.0.1 dev eth0 onlink
default via 192.168.8.1 dev bond0 metric 100
default via 192.168.8.1 dev wlan0 metric 110
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.100
192.168.8.0/24 dev bond0 proto kernel scope link src 192.168.8.96
192.168.8.0/24 dev wlan0 proto kernel scope link src 192.168.8.69
local 100.77.104.17 dev tailscale0 table local proto kernel scope host src 100.77.104.17
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.0.0 dev eth0 table local proto kernel scope link src 192.168.0.100
local 192.168.0.100 dev eth0 table local proto kernel scope host src 192.168.0.100
broadcast 192.168.0.255 dev eth0 table local proto kernel scope link src 192.168.0.100
broadcast 192.168.8.0 dev bond0 table local proto kernel scope link src 192.168.8.96
broadcast 192.168.8.0 dev wlan0 table local proto kernel scope link src 192.168.8.69
local 192.168.8.69 dev wlan0 table local proto kernel scope host src 192.168.8.69
local 192.168.8.96 dev bond0 table local proto kernel scope host src 192.168.8.96
broadcast 192.168.8.255 dev bond0 table local proto kernel scope link src 192.168.8.96
broadcast 192.168.8.255 dev wlan0 table local proto kernel scope link src 192.168.8.69
fd7a:115c:a1e0::/48 dev tailscale0 table 52 metric 1024 pref medium
fd7a:115c:a1e0::3601:6811 dev tailscale0 proto kernel metric 256 pref medium
fe80::/64 dev tailscale0 proto kernel metric 256 pref medium
fe80::/64 dev bond0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
local ::1 dev lo table local proto kernel metric 0 pref medium
local fd7a:115c:a1e0::3601:6811 dev tailscale0 table local proto kernel metric 0 pref medium
local fe80::7f42:be2d:de85:3050 dev tailscale0 table local proto kernel metric 0 pref medium
local fe80::c274:2bff:fefe:94a9 dev bond0 table local proto kernel metric 0 pref medium
local fe80::ca8a:d8ff:fe12:64fa dev wlan0 table local proto kernel metric 0 pref medium
multicast ff00::/8 dev tailscale0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev bond0 table local proto kernel metric 256 pref medium
multicast ff00::/8 dev wlan0 table local proto kernel metric 256 pref medium
jjaard@JJRD-Fida:~$
removed metric parameter from /etc/network/interfaces or /etc/network/interfaces.d/bond0 or both – issue persists, so I can for some reason connect via Tailscale and priority goes to eth0 but nothing else can be resolved.
with disabled WiFi adapter via sudo dietpi-config – Solves the non-working resolving issue, but priority goes to WiFi
Well, you are using the same subnet in both bond and wlan, hence it’s expected to face such issues.
I’d remove the wlan altogether, the metric is not helping with the failover you want to achieve anyway.
Also from the last configuration post, I don’t see any dns configured, they are all commented out.
All parameters (including commented DNS) is what automatically done by system. Only thing what I have added is “metric 110”. But for failover I think it would be somehow easier to do via some scripting.