[Lxc-users] can I use lxc-execute to execute an application with network configured

Sam Wang zhefwang at gmail.com
Mon Mar 19 12:36:23 UTC 2012


in my computer,wetherip_forward equals 1,it doesn't work.And lxc-execute
ping 10.0.15 does work.the edition of lxc is 0.7.4.2 and the host OS is
centos 6.2 or fedora 16.what'more,I also have tried setting br0 and eth0 in
promisc mode,which is useless.

在 2012年3月19日 下午7:55,Fajar A. Nugraha <list at fajar.net>写道:

> 2012/3/19 Sam Wang <zhefwang at gmail.com>:
> > Here is my configuration:
> > Firstly,I configured the bridge:
> > brctl addbr br0
> > brctl setfd br0 0
> > ifconfig eth0 0.0.0.0 up
> > brctl addif br0 eth0
> > dhclient br0
> > and the IP address of br0 is 10.0.2.15
> > Then create a container using lxc-create -n nettest -f nettest.conf
> > the content of nettest.conf is
> > This is my configure file
> > lxc.utsname=netest
> > lxc.network.type=veth
> > lxc.network.flags=up
> > lxc.network.link=br0
> > lxc.network.hwaddr=4a:49:43:49:79:bd
> > lxc.network.ipv4=10.0.2.16/24
> >
> > finally,I use lxc-execute to ping 10.0.2.2 which is the gateway of my
> > computer,using lxc-execute -n nettest ping 10.0.2.2.but it does not wok
>
> What does /proc/sys/net/ipv4/ip_forward contain?
>
> Also, is iptables active?
>
> > but ping 10.0.2.15,it works
>
> I'm surprised it works. In my test with lxc-execute, I needed to add
> "lxc.rootfs= /". And even then the console is messed up, job control
> (i.e.ctrl-c) not working.
>
> --
> Fajar
>



-- 

Zhefeng Wang
University of Science and Technology of China
Email:zhefwang at gmail.com

In God we trust, all others bring data
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120319/a05af461/attachment.html>


More information about the lxc-users mailing list