[Lxc-users] lxc macvlan bridge problem

宣铭艺 xuanmingyi at gmail.com
Wed Sep 26 12:59:42 UTC 2012


yes I used static ip.
I seted the static ip 10.0.0.2 in the config file.
It can't ping www.google.com

Today
I don't set the static ip?Will that use dhcp?
Now It can ping each other and ping www.google.com

In containers:
Then I traceroute the packages
I find a gateway.I think it's a dhcp and router


2012/9/26 Fajar A. Nugraha <list at fajar.net>

> Please keep to/cc to the list
>
> On Tue, Sep 25, 2012 at 2:42 PM, 宣铭艺 <xuanmingyi at gmail.com> wrote:
> > hi guys
> >
> > I use veth mode now
> > container-left and container-right can ping each other
> >
> > left ip is 10.0.0.2
> > right ip is 10.0.0.3
> >
>
> did you use static IP
>
> > host:
> > br0 10.0.2.15
>
> Did you know that if you use netmask /24, 10.0.0.x and 10.0.2.x is on
> different network?
>
>
> > eth0 0.0.0.0
> >
> > and how to configure containers let container ping www.google.com?
>
> short version: if you don't know much about networking or bridge,
> better use the default lxcbr0 or virbr0 (whichever you have on your
> system) and use DHCP on the guest container.
>
> --
> Fajar
>
>
>
> >
> >
> > 2012/9/24 Fajar A. Nugraha <list at fajar.net>
> >
> >> Why not just use veth + bridge, which is the default (at least the
> >> default on Ubuntu)?
> >>
> >> --
> >> Fajar
> >>
> >> On Mon, Sep 24, 2012 at 1:48 PM, 宣铭艺 <xuanmingyi at gmail.com> wrote:
> >> > Hi guys
> >> > I have a host machine and want to create 3 containers on it.
> >> > Containers should can ping each other,but can't communicate with the
> >> > host.
> >> > All containers shoud surf the Internet.
> >> > Should I use macvlan bridge mode?And how to set the host's and
> >> > containers'
> >> > network environment
> >> >
> >> > the goal blow
> >> >
> >> >
> >> > My Host:
> >> > eth0 192.168.1.23 gateway 192.168.1.1  It connects to the Internet
> >> >
> >> > lxcbr0?? bridge? need it?
> >> >
> >> > Containers:
> >> > c1:  192.168.2.45 ? how to configure
> >> > c2:  192.168.2.46 ? how to configure
> >> > c3:  192.168.2.47 ? how to configure
> >> >
> >
> >
> >
> >
> > --
> > 樱宝宝: http://www.xuanmingyi.com
> >
>



-- 
樱宝宝: http://www.xuanmingyi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120926/f78a283e/attachment.html>


More information about the lxc-users mailing list