I spent the whole morning trying to solve this.
I have two IP addresses available on the same interface (different gateways), let’s say 100.100.100.100 and 220.127.116.11.
My YAML is:
network: version: 2 renderer: networkd ethernets: eth0: match: macaddress: u.u.u.u addresses: - 100.100.100.100/32 - 18.104.22.168/32 #gateway6: fe80::1 routes: - to: 0.0.0.0/0 via: 100.100.100.1 on-link: true nameservers: search: ( invalid ) addresses: - x.x.x.x - y.y.y.y
I tought that, to let this server surf the net with 22.214.171.124, it would be easy as changing the “via” line to:
This doesn’t work. I launch netplan apply and nothing changes, I always surf the web with 100.100.100.100 (as stated by curl icanhazip.com and also in ifconfig).
What am I missing?