[lxc-users] Configuring interfaces with unprivileged containers

Heena Sirwani heenasirwani at gmail.com
Sat Jun 4 14:19:35 UTC 2016


On Fri, Jun 3, 2016 at 9:51 PM, Andrey Repin <anrdaemon at yandex.ru> wrote:

> Greetings, Heena Sirwani!
>
Hi!

>
> > I was trying to configure a container to behave as a router by connecting
> > one of its interfaces to a bridge that connects it to the internet and
> > another interface bridged to provide a private network to devices.
>
> Is the host connected to the internet directly?
> If so, I would recommend setting up the host itself to do the routing.
> If not, then why using brctl bridges when you have macvlans?
>

Yes, my host connects to the internet directly. I do not wish to set up the
host to do the routing as
I wish to give access to the router container to others and I wish to
simulate multiple networks with use cases
that accommodate their up and down.
What is it with unprivileged containers? Why does the configuration fail.

Thanks.

>
> > I was able to do this in a privileged container. In an unprivileged
> > container, it says unable to configure network. I would like to ask, how
> > will I be able to configure interfaces for a privileged container?
>
> > The error logs are something like this:
> >             lxc 1464950278.448 ERROR    lxc_start -
> start.c:lxc_spawn:1047
> > - failed to create the configured network
> >             lxc 1464950278.448 ERROR    lxc_start -
> > start.c:__lxc_start:1213 - failed to spawn 'test1'
>
> > And my configs are something like these:
> > lxc.network.type = veth
> > lxc.network.link = br0
> > lxc.network.flags = up
> > lxc.network.hwaddr = 00:16:3e:xx:xx:xx
>
> > lxc.network.type = veth
> > lxc.network.link = br5
> > lxc.network.flags = up
> > lxc.network.hwaddr = 00:16:3e:xx:xx:xx
>
> > Am I missing something?
>
> > Thanks,
> > Heena
>
>
> --
> With best regards,
> Andrey Repin
> Friday, June 3, 2016 19:08:00
>
> Sorry for my terrible english...
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160604/30f9b4d1/attachment.html>


More information about the lxc-users mailing list