Irwin W.
asked on
Netplan static configuration issue
ASKER
Thanks for that.
The file I modified was located in /etc/netplan
50-cloud-init.yaml
This was the only place the ip I tried to set was found.
The file I modified was located in /etc/netplan
50-cloud-init.yaml
This was the only place the ip I tried to set was found.
If you have 50-cloud-init.yaml this means you're running inside some container system, like LXD rather than at machine level.
Note: You must never, ever, ever modify 50-cloud-init.yaml because APT (package system) owns this file.
This file changes often, as Netplan is newish + changing a great deal right now.
If you modify this file, during updates you'll be asked if APT can over write this file...
1) If you say no (to keep your modifications), there's a good chance your container will brick - networking will die.
2) If you say yes, then your changes will be over written - networking will also die.
Instead of modifying system owned files (always a super bad idea), create a 60-public-init.yaml file with the contents similar to...
This way your networking will always survive package updates.
Tip: I notice you're using a /24 IP block which is 254 addresses or an entire Class C Network.
If this is correct, then use /24 if you only have a single IP (far more likely), use /32 or many subtle problems will occur.
Note: You must never, ever, ever modify 50-cloud-init.yaml because APT (package system) owns this file.
This file changes often, as Netplan is newish + changing a great deal right now.
If you modify this file, during updates you'll be asked if APT can over write this file...
1) If you say no (to keep your modifications), there's a good chance your container will brick - networking will die.
2) If you say yes, then your changes will be over written - networking will also die.
Instead of modifying system owned files (always a super bad idea), create a 60-public-init.yaml file with the contents similar to...
network:
version: 2
ethernets:
eth0:
addresses:
- x.x.x.x/32
This way your networking will always survive package updates.
Tip: I notice you're using a /24 IP block which is 254 addresses or an entire Class C Network.
If this is correct, then use /24 if you only have a single IP (far more likely), use /32 or many subtle problems will occur.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for that info. For now, I have reverted to Ubuntu 16.04 and can easily muddle my way through changing of the IP address.
Will review my use and understanding of netplan some time in the near future
Will review my use and understanding of netplan some time in the near future
The likely problem is you're working on the wrong file.
The file you posted has no path information. Looks like it's an /etc/netplan file which aren't used when booting Ubuntu.
What is used are netplan files owned by systemd... which usually live in...
Open in new window
At least that's where they live on machines provisioned by OVH.
The actual location of the file you'll be changing can be found via...
Open in new window
So as usual, systemd mucks up logic.