I have 17.10 server with LXD 2.21 installed via snap (2 containers).
I’ve configured host to have static IP and let containers be accessible from LAN.
My 01-netcfg.yaml in /etc/netplan:
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,8.8.4.4]
parameters:
stp: false
forward-delay: 0
After running sudo netplan apply everything works, I have internet access from host.
ifconfig gives the following:
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 2c:4d:54:4f:33:30 txqueuelen 1000 (Ethernet)
RX packets 5412 bytes 5196030 (5.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4483 bytes 624400 (624.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 222 bytes 19478 (19.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 222 bytes 19478 (19.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lxdbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::60c5:c9ff:fee3:a28f prefixlen 64 scopeid 0x20<link>
ether 62:c5:c9:e3:a2:8f txqueuelen 1000 (Ethernet)
RX packets 2646 bytes 1973322 (1.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2640 bytes 332354 (332.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethAUK196: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fca4:95ff:fed5:a908 prefixlen 64 scopeid 0x20<link>
ether fe:a4:95:d5:a9:08 txqueuelen 1000 (Ethernet)
RX packets 1787 bytes 291994 (291.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2916 bytes 3204729 (3.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethBY974H: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fccc:7dff:fe51:3ae6 prefixlen 64 scopeid 0x20<link>
ether fe:cc:7d:51:3a:e6 txqueuelen 1000 (Ethernet)
RX packets 23 bytes 1958 (1.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 326 bytes 26711 (26.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethP62W14: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fce2:c7ff:fe4d:d7da prefixlen 64 scopeid 0x20<link>
ether fe:e2:c7:4d:d7:da txqueuelen 1000 (Ethernet)
RX packets 46 bytes 3508 (3.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 317 bytes 26407 (26.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
After reboot there’s no internet in host (though, ping inside LAN subnet works and internet in containers works).
ifconfig shows exactly the same, except lxdbr0 has broadcast 0.0.0.0 instead of original value broadcast 192.168.0.255.
After running sudo netplan apply after reboot it starts working again and broadcast for lxdbr0 again fills with working value.
Any ideas?
I’ll provide any additional info/logs/configs, just tell me which one may help.