I'm trying to add a route on an Ubuntu 18.04 machine, but I'm missing something.
Traffic to 89.19.153.0/24 needs to go through 10.32.57.142.
This is the config I'm trying in /etc/netplan/99-netcfg-vmware.yaml
After this I run:
netplan apply
Nothing happens.
When I check the routes with route -n I get this:
When I run "sudo netplan –debug generate" I get:
I realize I'm doing something wrong, but since I'm new to netplan I haven't been able to google up the result.
Thank you for reading.
Best Answer
I also make it a habit to configure the metric. I am not sure if it is necessary!
Remove the
gateway4
option and configure them using routes manually if you want to use multiple gateways. (Not needed in this case)At last. The IP address
10.32.57.142
is not in your subnet. So we need to provide an additional route to it.Your configuration would become something like: