<div dir="ltr"><div>I am sorry to make a mistake in the last mail, and I am using this style actually :</div><div> </div><div>         eth0--[macvlan]--eth0--+--bound0<br>         eth1--[macvlan]--eth1--/<br></div><div>I have ever tried to use "phys" type to link host and the container, but there were some errors blocked me. When I resolved the errors, I had known that "phys" type need some terms, e.g. high version kernel support, but the version of kernel in my project is specified for some reason. </div>
<div> </div><div>I am going to use the following style in the future :</div><div><br>         eth0--+--bound0--[macvlan]--eth0<br>         eth1--/</div><div> </div><div>and I will patch the kernel to use bonding mode6(alb).</div>
<div> </div><div>Anyway, thank you very much for your reply and have a nice day!</div><div> </div><div>Regards,</div><div>Yao</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/18 Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Quoting wang yao (<a href="mailto:yaowang2014@gmail.com">yaowang2014@gmail.com</a>):<br>
> Hi Jake,<br>
><br>
> First of all, thank you for your reply and I am very sorry for such a late<br>
> response.<br>
><br>
> Just as you said, I had ever tried the bonding style like this:<br>
><br>
>         eth0--+--bound0--[veth]--eth0<br>
>         eth1--/<br>
><br>
> But when I used mode=6(alb) of bonding following this way, there is 80%<br>
> packet loss in the container, I must patch the kernel to the problem.<br>
><br>
> On the other hand, my current approach:<br>
><br>
>         eth0--[phys]--eth0--+--bound0<br>
>         eth1--[phys]--eth1--/<br>
<br>
</div>You say phys, but below you show macvlan.  Does it help if you<br>
actually use<br>
<br>
        lxc.network.type = phys<br>
<div class="im"><br>
?<br>
<br>
> My lxc configuration like this (Networking part) :<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div>> *# Networkinglxc.network.type = macvlanlxc.network.flags =<br>
> uplxc.network.link = <a href="http://eth0lxc.network.name" target="_blank">eth0lxc.network.name</a> <<a href="http://lxc.network.name" target="_blank">http://lxc.network.name</a>> =<br>
> eth0lxc.network.ipv4 = <a href="http://172.19.8.168/16" target="_blank">172.19.8.168/16</a><br>
> <<a href="http://172.19.8.168/16" target="_blank">http://172.19.8.168/16</a>>lxc.network.mtu = 1500lxc.network.hwaddr =<br>
> fe:67:f5:42:40:14*<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> *lxc.network.type = macvlanlxc.network.flags = uplxc.network.link =<br>
> <a href="http://eth1lxc.network.name" target="_blank">eth1lxc.network.name</a> <<a href="http://lxc.network.name" target="_blank">http://lxc.network.name</a>> = eth1lxc.network.ipv4 =<br>
> <a href="http://172.19.8.169/16" target="_blank">172.19.8.169/16</a> <<a href="http://172.19.8.169/16" target="_blank">http://172.19.8.169/16</a>>lxc.network.mtu =<br>
> 1500lxc.network.hwaddr = fe:67:f5:42:40:15*<br>
> *...*<br>
<div><div class="h5">><br>
> I did the bonding in the container, the bonding configuration is the same<br>
> as what I did before on the host.  When I started bonding device in the<br>
> container, this message came out:<br>
> "Bringing up interface bond0: bonding device bond0 does not seem to be<br>
> present, delaying initialization."<br>
><br>
> I'm not sure but I doubt it may be Network namespace or something similar<br>
> that brings about this problem.<br>
><br>
> What's your idea?<br>
><br>
> Regards,<br>
> Yao<br>
><br>
><br>
> 2013/11/15 Jäkel, Guido <<a href="mailto:G.Jaekel@dnb.de">G.Jaekel@dnb.de</a>><br>
><br>
> > Dear Yao,<br>
> ><br>
> > as I understand, you want to bound two physical interfaces of the host<br>
> > hardware to and use the bound inside a container.<br>
> ><br>
> >         eth0--[phys]--eth0--+--bound0<br>
> >         eth1--[phys]--eth1--/<br>
> ><br>
> > Because no other -- neither host nor another container -- may use one of<br>
> > NICs in addition, I would suggest to put the virtual bounding interface on<br>
> > the host and reach through the bound into the container via a veth. To me<br>
> > it's seems to be a better separation of concerns.<br>
> ><br>
> >         eth0--+--bound0--[veth]--eth0<br>
> >         eth1--/<br>
> ><br>
> > Following this way, you may also share the bound to more than one<br>
> > container by putting a virtual bridge between the virtual bounding<br>
> > interface and the virtual Ethernet adapters of the Containers.<br>
> ><br>
> ><br>
> > By the way, I don't see a clear reason why your current approach may fail.<br>
> > May you please present you configuration here?<br>
> ><br>
> ><br>
> > Greetings<br>
> ><br>
> > Guido<br>
> ><br>
> ><br>
> > >-----Original Message-----<br>
> > >From: wang yao [mailto:<a href="mailto:yaowang2014@gmail.com">yaowang2014@gmail.com</a>]<br>
> > >Sent: Friday, November 15, 2013 4:33 AM<br>
> > >To: <a href="mailto:lxc-users@lists.sourceforge.net">lxc-users@lists.sourceforge.net</a><br>
> > >Subject: [Lxc-users] Bonding inside LXC container<br>
> > ><br>
> > >Hi all,<br>
> > >I tried to bond two NICs (eth0 and eth1) in the container, but when I<br>
> > finished the bonding configuration (I think my configuraion is correct)<br>
> > >and started bonding device inside container, this message came out:<br>
> > >"Bringing up interface bond0:  bonding device bond0 does not seem to be<br>
> > present, delaying initialization."<br>
> > >So I want to know if LXC can't support the way of bonding configuration<br>
> > as I did, or I can do something to make this achieved.<br>
> > >I am glad to talk about "Bonding and LXC" with someone who has interest<br>
> > in it.<br>
> > >Regards,<br>
> > >Yao<br>
> ><br>
<br>
</div></div>> ------------------------------------------------------------------------------<br>
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps<br>
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access<br>
> Free app hosting. Or install the open source package on any LAMP server.<br>
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!<br>
> <a href="http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk</a><br>
<br>
> _______________________________________________<br>
> Lxc-users mailing list<br>
> <a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
<br>
</blockquote></div><br></div>