Ubuntu 18.04 Static IP with NetPlan require reboot
Solution 1:
I had the same issue with my machine.
It was an issue with the renderer
, it is documented that Ubuntu server should come with networkd
but in my machine (Ubuntu Server 18.04) the network manager that installed is network-manager
so I changed the renderer
to NetworkManager
and it started to work again.
You can check if network-manager
is installed by sudo service network-manager status
.
I still don't know why network-manager
is installed instead of networkd
but at least it is working for me now.
Solution 2:
In your .yaml file, you're missing the renderer definition. It should say:
renderer: networkd
See if the ip
command will help...
Bring interfaces up or down
Previously users were used to using the ifconfig command. Users should now familiarize themselves with the more powerful ip
command. Manually modifying network devices is now accomplished via the ip
command.
As an example to bring up an interface and bring it back down:
ip link set enp0s3 up
ip link set enp0s3 down
See "man ip" for more information on how to manipulate the state of routing, network devices, interfaces and tunnels.
source: https://netplan.io/faq