Hello,
I am trying to configure a linux ubuntu server 16.04 with LXD 3.1 such that each container shares the LAN connection of the host.
For that I’ve modified /etc/network/interfaces as followed:
auto o
iface lo inet loopback
auto br0
iface br0 inet dhcp
bridge-ifaces enp0s31f6
bridge-ports enp0s31f6
up ifconfig enp0s31f6 up
iface enp0s31f6 inet manual
Some stuff like ‘apt-get update’ works well, whereas other commands like ‘ping google.com’ fail:
lxc exec c1 – sh -c “ping google.com”
–> ‘PING google.com (216.58.206.14) 56(84) bytes of data.’ but no reply or retries
I wonder if this is an IP routing issue or something else?
Our DHCP server is administrated by another department and not under my control (we use dynamic IPs)
the LXD config of my default profile:
devices:
eth0:
name: eth0
nictype: bridged
parent: br0
type: nic
root: …
used_by:
/1.0/containers/c1
executing ‘lxc exec c1 – ip -4 route’ gives
‘default via 141.21.32.1 dev eth0
141.21.32.0/19 dev eth0 proto kernel scope link src 141.21.63.24’
executing ‘ifconfig br0’ on the host OS gives
br0 Link encap: Ethernet HWaddr b0:6e:bf:36:00:fu:
inet addr: 141.21.47.39 Bcast: 141.21.63.255 Mask 255.255.224.0
inet6 addr: …
inet6 addr: …
inet6 addr: ,…
RX packets: 18900 errors:0 dropped: 0 …
TX packets: 4 errors:0 dropped:0…
RX bytes: … (2.4 MB) TX bytes: … (9.0 KB)