Re: hostapd in lxc

Michael Eager <eager-bkvJ7wkB361Wk0Htik3J/[email protected]>
Newsgroups gmane.org.user-groups.linux.svlug
Message-ID <[email protected]>
A couple random comments.

LXC is reasonably easy to install.  My impression is that it is more flexible than Docker.
Docker seems designed to run a single service, while LXC is essentially a complete virtual
environment.  If you want to run multiple services (DHCP, DNS, NFS, SAMBA), you probably
want to run them on a single LXC instance, rather than running multiple Docker instances
or trying to run multiple services on a single Docker instance.

If you want the container on your LAN, you need to set up a bridged network.  Essentially,
you create a bridge to the NIC/LAN, and create a virtual NIC on the host and in each container
that connects to the bridge.  (I've set up bridged networking many times, for VirtualBox
and various containers, and it always is a bit confusing.  I think that the terminology is
backward.  I think of eth0 as the NIC hardware, and br0 and a bridge to it.  That's opposite
from what it is in reality.  Br0 is connected to the LAN; eth0 is a virtual NIC.)


On 12/30/2016 11:38 AM, Ehud Kaldor wrote:
> Sorry for the time lag.
>
> I'm using Docker, so I'm not sure all will apply to lxc, but here goes:
> I want to set up my home network (DHCP, DNS, gateway, file server etc.) using containers. If for
> nothing else, than for the experience with containers.
>
> It works if the container is connected to the host's net directly (--net=host), but I want the
> container to be its own network entity, with a MAC and IP. That way, moving it between hosts is
> seamless.
>
> It seems a macvlan network is the best option, but I have not tried it yet. In fact, I tried it
> before libnetwork was released, so routing traffic to the container on the host's network we hard.
> But it needed to, as DHCP protocol is in effect before IP is up, so lower level protocols need to
> routed in to the container, which was not simple.
>
> These days, with Swarm and Docker network, it is probably simpler. Yet, I am hunting for insights
> before I start breaking things apart again...
>
> Ehud
>
> On Wed, Dec 28, 2016, 00:20 Ivan Sergio Borgonovo <[email protected]
> <mailto:[email protected]>> wrote:
>
>     On 12/28/2016 12:32 AM, Ehud Kaldor wrote:
>      > Hi Ivan,
>      > Do you also run DHCP in a container? If so, can you share how you did it?
>
>     No, I don't. dnsmasqd runs on my router.
>     I never configured a dhcp server (other than using the openwrt gui).
>     Still I can not envision what extra problems you had to face.
>     What went wrong? Which dhcp server?
>
>     --
>     Ivan Sergio Borgonovo
>     http://www.webthatworks.it http://www.borgonovo.net
>
>
>     _______________________________________________
>     svlug mailing list
>     [email protected] <mailto:[email protected]>
>     http://lists.svlug.org/lists/listinfo/svlug
>
>
>
> _______________________________________________
> svlug mailing list
> [email protected]
> http://lists.svlug.org/lists/listinfo/svlug
>


-- 
Michael Eager	 eager-bkvJ7wkB361Wk0Htik3J/[email protected]
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.