On Tue, Jan 3, 2017 at 8:21 PM, Saurabh Deshpande < saurabh.n.deshpa...@gmail.com> wrote:
> Hello Guys, > > > I am trying to set up LXC on Arch Linux with systemd-networkd for > networking. > I see that the bridge can be set up to either use DHCP or a static IP but > we lose a static IP set on actual connected nic (eth0). > Can someone please tell me if it is possible to achieve below. > eth0 / ens192 : This should have its own static IP address for connecting > and managing the host. > br0 / lxcbr0 : This should have it's own subnet so that all subsequent > guests will have a IP from the alloted range. > > Do you mean "eth0 and br0 should be in the same network (which has an external DHCP server, managed by someone else), but eth0 has static ip address, and br0 manage dynamic ip range for lxc guest"? If yes -> short answer: not possible. Not really lxc-specific, but generic TCP/IP networking. If no -> describe what you want in more detail. Using ASCII art and dummy IP addresses (e.g. 10.0.0.1, etc) often helps. The usual scenarios are: (1) let lxc manage its own bridge, using a private network that exists only on that host (the default setup). Create NAT for each service in the container that you need to access from outside the host (2) create a bridge with host's eth0 as slave, put containers there as well. The containers will then behave (frm networking perspective) just like any other host on that network (e.g. it can get dynamic IP address from whatever-dhcp-server on that network) -- Fajar
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users