[Lxc-users] can I use lxc-execute to execute an application with network configured
Sam Wang
zhefwang at gmail.com
Mon Mar 19 10:25:26 UTC 2012
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
but ping 10.0.2.15,it works
在 2012年3月19日 下午5:59,陈竞 <cj.magina at gmail.com>写道:
> you need configure the network correctly, i think that you don't
> configure the gateway
>
> you should configure the gateway by "route add .." command
>
> 在 2012年3月19日 下午5:49,Sam Wang <zhefwang at gmail.com>写道:
>
>>
>> My need is that I want to use lxc-execute to start an application
>> container to execute an application which need a unique IP address.
>> I have tried using bridge but the application can only communicate to my
>> host ,but cann't ping to any other computer.
>> can someone help me ?
>> --
>>
>> Zhefeng Wang
>> University of Science and Technology of China
>> Email:zhefwang at gmail.com
>>
>> In God we trust, all others bring data
>>
>>
>> ------------------------------------------------------------------------------
>> This SF email is sponsosred by:
>> Try Windows Azure free for 90 days Click Here
>> http://p.sf.net/sfu/sfd2d-msazure
>> _______________________________________________
>> Lxc-users mailing list
>> Lxc-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lxc-users
>>
>>
>
>
> --
> 陈竞,中科院计算技术研究所,高性能计算机中心
> Jing Chen HPCC.ICT.AC China
>
--
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/81db8193/attachment.html>
More information about the lxc-users
mailing list