I have a private network interface, as follows, on a Ubuntu 16.04 VM:
# Private network
auto ens19
iface ens19 inet static
address 10.10.10.179
netmask 255.255.255.0
mtu 1450
My vLAN requires a gateway to be specified in order for it to work, so I append it as follows:
# Private network
auto ens19
iface ens19 inet static
address 10.10.10.179
netmask 255.255.255.0
mtu 1450
gateway 10.10.10.1
However, whenever I add that gateway and restart the networking service, it won't start with the following error:
Dec 15 10:50:08 postfix0 ifup[1968]: RTNETLINK answers: File exists
Dec 15 10:50:08 postfix0 ifup[1968]: Failed to bring up ens19.
Executing ip addr flush dev xxx does not help.
So, how do I fix this?
RTNETLINK answers: File exists