I have two NIC both connected to private networks one that goes to a dead end network and the other that can get to the internet through NAT.
When I bring up both the defaut route gets switched to the network that goes nowhere and none of the networking works anymore.
routes: - to: 0.0.0.0/0 via: <gateway address> metric: 1
from the freaking man page and netplan generate return unknown key routes
Got to love it when the documentation is evidently wrong.
Anyone know how I tell netplan which nic to use for the internet? Set a default route?
EDIT: Okay... appears I've figured it out. Routes are associated with the interfaces rather than being global. As in...
ethernets: enp0: name: enp0s3 addresses: [192.168.0.128/24] gateway4: 192.168.0.1 nameservers: addresses: [18.104.22.168,22.214.171.124] routes: - to: <network> via: <gateway address> metric: 1 enp1: <etc...> routes: - to: <network> via: <gateway address> metric: 5
At least generate doesn't throw errors and the routes apper to change.