[lxc-users] LXC Containers and Bridge Networking in Arch Linux
Saurabh Deshpande
saurabh.n.deshpande at gmail.com
Wed Jan 4 20:27:08 UTC 2017
>
>
> >
> > ---------- Forwarded message ----------
> > From: Saurabh Deshpande <saurabh.n.deshpande at gmail.com>
> > To: lxc-users at lists.linuxcontainers.org
> > Cc:
> > Date: Tue, 3 Jan 2017 08:21:35 -0500
> > Subject: [lxc-users] LXC Containers and Bridge Networking in Arch Linux
> >
> > 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.
> >
> > Regards,
> >
> > Saurabh
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: "Fajar A. Nugraha" <list at fajar.net>
> > To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
> > Cc:
> > Date: Wed, 4 Jan 2017 14:32:23 +0700
> > Subject: Re: [lxc-users] LXC Containers and Bridge Networking in Arch
> Linux
> > On Tue, Jan 3, 2017 at 8:21 PM, Saurabh Deshpande <
> saurabh.n.deshpande at 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
>
>
> First of all apologies if I am not replying to this message correctly.
> Second of all apologies for not explaining my question correctly.
> I will try to elaborate on the problem I am facing.
>
> I am looking to run lxc containers on Arch Linux.
> Hypothetically this Arch Linux server has a local IP of 10.10.10.120 with
> Gateway of 10.10.10.250 and DNS Address as 10.10.10.249
> I would like to have the containers on this servers running on Subnet of
> 10.20.20.1/24. They should have access to Internet but no one on the
> Local Lan (10.10.10.1/24) should have direct connectivity to it. The only
> way these containers can be accessed is via IPTables or via Proxy.
>
> --
> Saurabh N. Deshpande
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170104/194dbc2e/attachment.html>
More information about the lxc-users
mailing list