many thanks,


I edit the container's /etc/rc.d/rc.sysinit and add :
     route add default gw 192.168.122.1 # address of virbr0
     echo >> /etc/resolv.conf nameserver 10.2.0.41 #name server the same as 
that in HOST's /etc/resolv.conf
then i can ping google successfully .



在 2012-09-21 21:15:07,"Huang Qiang" <allen303al...@gmail.com> 写道:
>On 2012/9/21 星期五 21:05, Binknight wrote:
>> 
>> hi Fajar,
>> 
>>     thank you for your advise and wiki, that provides a lot of useful 
>> informations.
>> 
>>     My test environment is FC16 and product environment is centos 6.3. So I 
>> have to set up lxc in FC or centos. I tested in centos and found that 
>> lxc-0.7.5 will work(I previously use the 0.8.0rc). Now I can ping the host 
>> from my container and vice versa, but I can not access to other networks(eg. 
>> ping www.google.com <http://www.google.com> will fail). My network configure 
>> is,
>> 
>> lxc.network.type = veth
>> lxc.network.flags = up 
>> lxc.network.link = virbr0 
>> lxc.network.name = eth0 
>> lxc.network.mtu = 1500 
>> lxc.network.ipv4 = 192.168.122.2/24
>> 
>> the bridge "virbr0" is create automatically by install libvirt.
>> 
>
>Did you set your ip route in the container?
>You need to set it the same as your host.
>
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to