Answer the question
In order to leave comments, you need to log in
How to get internet working after restarting Ubuntu Server 17.10 Netplan?
/etc/netplan/01-netcfg.yaml like this for static containers:
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
dhcp4: no
dhcp6: no
bridges:
lxdbr0:
dhcp4: no
interfaces:
- enp1s0
addresses:
- 192.168.0.10/24
gateway4: 192.168.0.1
nameservers:
addresses:
- 192.168.0.1
- 8.8.8.8
parameters:
stp: false
forward-delay: 0
sudo netplan --debug generate
produces in the last lines:NetworkManager: definition lxdbr0 is not for us (backend 1)
NetworkManager: definition enp1s0 is not for us (backend 1)
sudo netplan apply
everything works, but after a reboot, the Internet does not work (while ping over the local network works). After completing the sudo netplan apply
Internet starts working again Answer the question
In order to leave comments, you need to log in
He asked himself - he answered.
In order for everything to rise, it is necessary not to create a bridge when initializing LXC, but to create its usual bridge br0 and add it to the netplan config instead of lxdbr0.
When initializing or reconfiguring LXC, you need to use the existing bridge and everything will be fine.
It may be worth installing the bridge-utils package before creating the bridge.
Hello. Please explain what "create its normal bridge br0" means.
I needed a bridge without dhcp, and I created it with the help of this article.
https://github.com/lxc/lxd/issues/3329
But, nevertheless, I still have to do sudo netplan apply so that the ip address appears on the br0 interface.
Config:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question