1546ad855SChris Luke# VPP Link Aggregation Control Protocol (LACP) implementation    {#lacp_plugin_doc}
29cd2d7a5SSteven
39cd2d7a5SStevenThis document is to describe the usage of VPP LACP implementation.
49cd2d7a5SSteven
59cd2d7a5SSteven## LACP
69cd2d7a5SSteven
79cd2d7a5SStevenThe Link Aggregation Control Protocol (LACP) is an 802.3ad standard which
89cd2d7a5SStevenprovides a protocol for exchanging information between Partner Systems on a
99cd2d7a5SStevenlink to allow their protocol instances to reach agreement on the Link Aggregation
109cd2d7a5SStevenGroup to which the link belongs and enable transmission and reception for the
119cd2d7a5SStevenhigher layer. Multiple links may be bundled to the same Aggregation Group to form
129cd2d7a5SStevena high bandwidth transmission medium and create a fault-tolerant link.
139cd2d7a5SSteven
149cd2d7a5SSteven
159cd2d7a5SSteven### Configuration
169cd2d7a5SSteven
179cd2d7a5SSteven1. Create the bond interface
18a58fec16SZhiyong Yangcreate bond mode lacp [hw-addr <mac-address>] [load-balance { l2 | l23 | l34 } [numa-only]]
199cd2d7a5SSteven
209cd2d7a5SSteven2. Enslave the physical interface to the bond
210d88301aSStevenbond add <bond-interface-name> <slave-interface> [passive] [long-timeout]"
229cd2d7a5SSteven
239cd2d7a5SSteven3. Delete the bond interface
249cd2d7a5SStevendelete bond {<interface> | sw_if_index <sw_idx>}
259cd2d7a5SSteven
269cd2d7a5SSteven4. Detach the slave interface from the bond
270d88301aSStevenbond del <slave-interface>
289cd2d7a5SSteven
299cd2d7a5SSteven### Configuration example
309cd2d7a5SSteven
31546ad855SChris Luke```
329cd2d7a5SStevencreate bond mode lacp
339cd2d7a5SStevenset interface state BondEthernet0 up
340d88301aSStevenbond add BondEthernet0 TenGigabitEthernet7/0/0
350d88301aSStevenbond add BondEthernet0 TenGigabitEthernet7/0/1
360d88301aSStevenbond add BondEthernet0 TenGigabitEthernet5/0/0
370d88301aSStevenbond add BondEthernet0 TenGigabitEthernet5/0/1
38546ad855SChris Luke```
399cd2d7a5SSteven
40546ad855SChris Luke```
410d88301aSStevenbond del TenGigabitEthernet5/0/1
42546ad855SChris Luke```
439cd2d7a5SSteven
44546ad855SChris Luke```
459cd2d7a5SStevendelete bond BondEthernet0
46546ad855SChris Luke```
479cd2d7a5SSteven
489cd2d7a5SSteven### Operational data
499cd2d7a5SSteven
50546ad855SChris Luke```
519cd2d7a5SStevenshow lacp [<interface>] [details]
52546ad855SChris Luke```
539cd2d7a5SSteven
549cd2d7a5SStevenExample:
559cd2d7a5SSteven
56546ad855SChris Luke```
57546ad855SChris LukeDBGvpp# show lacp
589cd2d7a5SSteven                                                        actor state                      partner state
599cd2d7a5SSteveninterface name            sw_if_index  bond interface   exp/def/dis/col/syn/agg/tim/act  exp/def/dis/col/syn/agg/tim/act
609cd2d7a5SStevenGigabitEthernet2/0/1      1            BondEthernet0      0   0   1   1   1   1   1   1    0   0   1   1   1   1   1   1
619cd2d7a5SSteven  LAG ID: [(ffff,e4-c7-22-f3-26-71,0000,00ff,0001), (ffff,fc-99-47-4a-0c-8b,0009,00ff,0001)]
629cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
639cd2d7a5SStevenTenGigabitEthernet4/0/0   2            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
649cd2d7a5SSteven  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0001), (8000,00-2a-6a-e5-50-c1,0140,8000,011d)]
659cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
669cd2d7a5SStevenTenGigabitEthernet4/0/1   3            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
679cd2d7a5SSteven  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0002), (8000,00-2a-6a-e5-50-c1,0140,8000,011e)]
689cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
699cd2d7a5SStevenTenGigabitEthernet8/0/1   7            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
709cd2d7a5SSteven  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0003), (8000,00-2a-6a-e5-50-01,007a,8000,0114)]
719cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
729cd2d7a5SStevenTenGigabitEthernet8/0/0   6            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
739cd2d7a5SSteven  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0004), (8000,00-2a-6a-e5-50-01,007a,8000,0115)]
749cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
759cd2d7a5SStevenTenGigabitEthernet6/0/1   5            BondEthernet2      0   0   1   1   1   1   1   1    0   0   1   1   1   1   1   1
769cd2d7a5SSteven  LAG ID: [(ffff,90-e2-ba-36-31-21,0002,00ff,0001), (ffff,90-e2-ba-29-f5-31,000f,00ff,0002)]
779cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
789cd2d7a5SStevenTenGigabitEthernet6/0/0   4            BondEthernet2      0   0   1   1   1   1   1   1    0   0   1   1   1   1   1   1
799cd2d7a5SSteven  LAG ID: [(ffff,90-e2-ba-36-31-21,0002,00ff,0002), (ffff,90-e2-ba-29-f5-31,000f,00ff,0001)]
809cd2d7a5SSteven  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
819cd2d7a5SStevenDBGvpp#
82546ad855SChris Luke```
839cd2d7a5SSteven
84546ad855SChris Luke```
859cd2d7a5SStevenshow bond [details]
86546ad855SChris Luke````
879cd2d7a5SSteven
88546ad855SChris LukeExample:
899cd2d7a5SSteven
90546ad855SChris Luke```
91546ad855SChris LukeDBGvpp# show bond
929cd2d7a5SStevensh bond
939cd2d7a5SSteveninterface name   sw_if_index   mode         load balance  active slaves  slaves
949cd2d7a5SStevenBondEthernet0    10            lacp         l2            1              1
959cd2d7a5SStevenBondEthernet1    11            lacp         l34           4              4
969cd2d7a5SStevenBondEthernet2    12            lacp         l23           2              2
979cd2d7a5SStevenDBGvpp#
98546ad855SChris Luke```
999cd2d7a5SSteven
1009cd2d7a5SSteven### Debugging
1019cd2d7a5SSteven
102546ad855SChris Luke```
103546ad855SChris Lukedebug lacp [<interface>] <on | off>
104546ad855SChris Luke```
105