[lxc-users] no ping between host and lxc container

Fajar A. Nugraha list at fajar.net
Tue Dec 20 11:06:38 UTC 2016


On Tue, Dec 20, 2016 at 5:48 PM, Mateusz Korniak <
mateusz-lists at ant.gliwice.pl> wrote:

> On Tuesday 20 of December 2016 17:04:08 Fajar A. Nugraha wrote:
> > What I did in my host, is create a macvlan interface for the host, and
> move
> > host's eth0 IP address there.
> >
> > (...)
> > ### from "lxc config show container_name"
> > devices:
> >   eth0:
> >     name: eth0
> >     nictype: macvlan
> >     parent: eth0
> >     type: nic
> >
> >
> > So I use host eth0 (now without IP, as its ip is moved to v-0, which is a
> > macvlan interface) as "parent" in lxd (this should be "lxc.network.link"
> in
> > lxc). If you have problems with flockport's guide, try my setup.
>
> Are you able to set MAC address for lxc container?
>

Yes. It's whatever value on "volatile.eth0.hwaddr" on "lxc config show
container_name" (again, I'm using lxd)



> How do you setup IP# for container?
>
>

On the container's rootfs (e.g. /etc/network/interfaces inside the
container). Basically this is a bridged setup, by default there's no way to
set (and restrict) IP address from the host side.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161220/73242595/attachment-0001.html>


More information about the lxc-users mailing list