[lxc-users] [Solved]RE: Networking LXD containers

Mark Constable markc at renta.net
Tue Mar 15 05:41:04 UTC 2016


On 15/03/16 13:03, efersept wrote:
> Thank you Fajar, I have tried putting entries in
> /etc/network/interfaces on an Ubuntu host but they are completely
> ignored. Well that is not completely true, static IPs can be set for
> eth0 but bridge entries and wlan0 entries are ignored The only
> success I have had is creating bridge interface files using
> systemd-networkd in /etc/systemd/network. I don't really understand
> why.

FWIW I use a kubuntu xenial host and set USE_LXC_BRIDGE="false" in
/etc/default/lxc-net and use NetworkManager to configure my own lxcbr0
bridge (so I can easily switch to wifi). I also disable the NM invoked
dnsmasq and manage all my local containers and other local hosts via a
single /etc/dnsmasq.conf file...

~cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

[ifupdown]
managed=false

I've had trouble trying to use NM to configure a bridge but one time it
did work so I kept a copy of the system-connections file so now I just
copy this config file below to any new desktop system...

~ cat /etc/NetworkManager/system-connections/lxcbr0
[connection]
id=lxcbr0
uuid=a557cbf5-2f45-4958-a4bf-bfd1c00ce6c3
type=bridge
interface-name=lxcbr0
permissions=user:markc:;
secondaries=

[ipv4]
address1=192.168.0.2/24,192.168.0.1
dns=192.168.0.2;
dns-search=goldcoast.org;
method=manual

[ipv6]
dns-search=
method=auto



More information about the lxc-users mailing list