Мой /etc/network/interfaces
выглядит так:
# The primary network interface
allow-hotplug enp3s0
iface enp3s0 inet dhcp
# iface enp3s0 inet6 dhcp
# USB 3.0 Gigabit Ethernet
allow-hotplug enx00249b170da2
iface enx00249b170da2 inet static
address 192.168.1.67
netmask 255.255.255.0
# WiFi
allow-hotplug wlp2s0
iface wlp2s0 inet dhcp
# iface wlp2s0 inet6 dhcp
wpa-conf /etc/wpa_supplicant.conf
И route -n
как это:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlp2s0
25.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 ham0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp2s0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp3s0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enx00249b170da2
Я бы хотел enp3s0
быть шлюзом по умолчанию (и иметь приоритет над wlp2s0
)
Ключевым требованием является завершение загрузки при любых обстоятельствах, когда любой из интерфейсов отсутствует или не работает.