netplan YAML file:
Code:
# This is the network config written by 'subiquity'
network:
ethernets:
ens001:
dhcp4: true
# dhcp4-overrides:
# route-metric: 10
routes:
- to: default
via: 10.222.55.254
table: 1
metric: 10
routing-policy:
- from: 10.222.52.250
table: 1
ens104:
dhcp4: true
# dhcp4-overrides:
# route-metric: 20
routes:
- to: default
via: 10.250.4.254
table: 2
metric: 20
version: 2
When I use "dhcp4-overrides: route-metric: 10", the network stops working on both interfaces.
My routing table:
Code:
debs@uni:~$:/etc/netplan$ sudo ip route list table 1
default via 10.20.50.254 dev ens001 proto static metric 10 onlink
debs@uni:~$:/etc/netplan$ sudo ip route list table 2
default via 10.25.40.254 dev ens104 proto static metric 20 onlink
debs@uni:~$:/etc/netplan$ sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.25.40.254 0.0.0.0 UG 100 0 0 ens104
0.0.0.0 10.20.50.254 0.0.0.0 UG 100 0 0 ens001
10.20.50.0 0.0.0.0 255.255.255.0 U 100 0 0 ens001
10.20.50.254 0.0.0.0 255.255.255.255 UH 100 0 0 ens001
10.25.40.0 0.0.0.0 255.255.255.0 U 100 0 0 ens104
10.25.40.254 0.0.0.0 255.255.255.255 UH 100 0 0 ens104
Bookmarks