On Fri, Oct 07, 2016 at 03:32:12PM -0700, Jeff Kowalczyk wrote: > On Tue, Sep 13, 2016 at 6:10 PM, Fajar A. Nugraha <l...@fajar.net> wrote: > > > By default lxdbr0 exists by itself, without the need of any physical network > > adapter as slave. > > > So yes, it can be used without eth0 active, assuming that you also some kind > > of dhcp and NAT/proxy active for the containers (which should be enabled by > > default) > > I'm running lxd-2.4.1 now, and would like to take another shot at > using the new networking commands to getting basic networking up and > running. I was unable to get a bridged connection up with an inactive > eth0 using lxd-2.1. > > The host OS is Gentoo Linux, so I may need to manually recreate > infrastructure handled by package install on Ubuntu. Greatly > appreciated if lxd requisites on the host can be spelled out in detail > so I don't miss a critical item. > > Host info: > - Gentoo Linux > - dnsmasq installed w stock config but not running, not listening for > DHCP or NAT on host > - connman daemon manages wlan0 and eth0, only one active at a time in > current config > - wlan0 active with dhcp > - eth0 inactive, configured for dhcp when wired connection available > - Host LAN address 192.168.1.x > > Objectives: > - LXD containers internet access out via host as gateway, host IP is via DHCP > - LXD containers on shared network to interact with each other > - Host access to LXD containers, explicit port forwarding is fine if > that would work better with wifi-only host. > > Any suggestions on how to achieve this using lxd-2.4.1's new network commands? > > % lxc network list > NAME,TYPE,MANAGED,USED BY > eth0,physical,NO,0 > wlan0,physical,NO,0 > > Does LXD 2.4.1 provide/use an internal DHCP server and NAT proxy, or > is dnsmasq or similar required to be configured and running on the > host? I'm accustomed to qemu-kvm and its internal DHCP/NAT. Is LXD > doing something similar?
LXD managed bridges come with dnsmasq as a DNS and DHCP(v6) server. LXD also configures ebtables and iptables as required and toggles any needed sysctls. In most cases, all you need is: lxc network create blah lxc network attach-profile blah default eth0 Which will create a bridged called blah with IPv4 and IPv6 connectivity and then add it to the default profile. You can set static leases for IPv4 and IPv6 by setting ipv4.address or ipv6.address on the network device entry. We don't do port forwarding directly in LXD, so you'll still need to do that by hand. > Any manual routes I need to add? > > Thanks, > Jeff > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: PGP signature
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users