I'm migrating from 16.04 where I had several NICs configured in /etc/network/interfaces like this:
auto enp0s8 iface enp0s8 inet static address 192.168.0.5 netmask 255.255.255.0 up route add -host 192.168.0.100 dev enp0s8 up route add -host 192.168.0.101 dev enp0s8
My only goal is to create a route from that NIC to those IP's using the specified NIC. This is for software that pulls data from the devices' assigned to those IP's. The static route is necessary because the default route is on a different subnet and NIC.
But I am unable to figure out how to do this using Netplan.
network: ethernets: enp0s8: dhcp4: no addresses: [192.168.0.5/24] routes: - to: 192.168.0.101 via: 192.168.0.101 version: 2
Netplan's routes seems to always require
via but in my case that won't make sense because via would be the same as to.
How can this by achieved using Netplan?