[ovs-discuss] Enable LACP on bonded port with config file

Pawel Szczepaniak pawel.szczepaniak at innogames.com
Thu Mar 6 12:14:55 UTC 2014

On 03/05/2014 04:34 PM, Gurucharan Shetty wrote:
> On Wed, Mar 5, 2014 at 5:49 AM, Pawel Szczepaniak
> <pawel.szczepaniak at innogames.com> wrote:
>> On 02/25/2014 11:59 PM, Gurucharan Shetty wrote:
>>> On Tue, Feb 25, 2014 at 2:34 AM, Pawel Szczepaniak
>>> <pawel.szczepaniak at innogames.com> wrote:
>>>> Hi,
>>>> I'm currently testing OVS to replace default Debian bridge approach, when
>>>> using Xen. Because of many physical machines, we use puppet to configure
>>>> them, with which OVS works well (only had to build own package basing on
>>>> 1.9.3, as official backports are using really old version).
>>>> Is there any way to enable LACP on server via config file, which will be
>>>> parsed on startup of OVS (what for us mean on boot of machine)?
>>> There is integration with 'interfaces' file. Have a look at
>>> debian/openvswitch-switch.README.Debian in the repo and test to see
>>> whether it fits into your requirements.
>>> I think 1.9.3 had support, but Open vSwitch startup script would not
>>> call the following command (I think that happened in 1.10)
>>> ifup --allow=ovs $list_of_bridges
>>> (So, you may want to add a patch to the OVS startup script to do that.
>>> Look at commit 1d63efc45b9ae5b723f9a8f0d81c7f002b48c39d for hints).
>> I updated OvS to 2.0.1 (self compiled on Debian Wheezy 7.4), as it's also
>> LTS and there startup fix calls ifup also. With documentation I tried to
>> configure ovs, to get same as I have now, only using interfaces file. My
>> current ovs-vsctl show output is:
>> ovs-machine:~# ovs-vsctl show
>> 0a427b10-9530-4649-91fc-59b55226ac7a
>>      Bridge "br0"
>>          Port "bond0"
>>              Interface "eth0"
>>              Interface "eth1"
>>          Port "br0"
>>              Interface "br0"
>>                  type: internal
>>      ovs_version: "2.0.1"
>> And /etc/network/interfaces file, which unfortuneatly doesn't work is:
>> #
>> # The loopback network interface
>> auto lo
>> iface lo inet loopback
>> # The primary network interface
>> allow-ovs br0
>> iface br0 inet static
>>      address
>>      netmask
>>      gateway
>>      dns-nameservers
>>      dns-search ig.local
>>      ovs_type OVSBridge
>>      ovs_ports bond0
>> allow-br0 bond0
>> iface bond0 inet manual
>>      ovs_bridge br0
>>      ovs_type OVSBond
>>      ovs_bonds eth0 eth1
>>      ovs_options lacp=active
>> allow-bond0 eth0
> I think the "allow-bond0" is wrong. Where did you get that keyword
> from? The README file does not mention it.
Yes, It doesn't exist, previously I was trying to use "allow-br0", but 
also failed. README was quite confusing when nothing worked, but now 
it's clear and obvious.
>> iface eth0 inet manual
>>      ovs_bridge bond0
>>      ovs_type OVSPort
>> allow-bond0 eth1
>> iface eth1 inet manual
>>      ovs_bridge bond0
>>      ovs_type OVSPort
>> After reboot with such config I get only lo0 up, eth0 and eth1 down. br0 is
>> even not configured. OvS returns empty config for ovs-vsctl show.
>> Do you have any idea, where and what is wrong in this configuration?
> Do something like this to make sure that you have installed the
> packages correctly:
> * Add the following in the interfaces file after the boot.
> allow-ovs br10
> iface br10 inet static
>      address
>      netmask
>      ovs_type OVSBridge
> Run:
> ifup --allow=ovs br10
> The above should create a "br10". If it does not, I would start
> looking at why not. You mentioned "self-compiled". So I am wondering
> whether you actually installed the "ifupdown.sh" script at the right
> place. I would create and install the debian package to get it right.
This first time didn't work, due to missing ifupdown.sh script. After 
placing, where it should be, worked fine. With this I was able to get 
everything working.
My package is build diffrent way than officialy suggested in readme, as 
wanted to make one, seperate package with everything what we need.

I'll also push really minor fix to 2.0.1 - in few places changing 
default paths is not affecting paths in scripts, but this can be easily 
fixed by hand.

Thanks a lot for help with my problem!

>>>> found only way to do it via ovs-vsctl, but putting this rule to puppet is
>>>> not acceptable, as it would change network config immediately and brake
>>>> up
>>>> rest of puppet run, before we change config on switch.
>>>> Currently I'm configuring bond over eth0 and eth1 by putting same db file
>>>> on
>>>> all servers, when installing ovs there.
>>>> --
>>>> Pawel Szczepaniak
>>>> System Administrator
>>>> InnoGames GmbH
>>>> _______________________________________________
>>>> discuss mailing list
>>>> discuss at openvswitch.org
>>>> http://openvswitch.org/mailman/listinfo/discuss
>>> _______________________________________________
>>> discuss mailing list
>>> discuss at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/discuss
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss

More information about the discuss mailing list