1# VPP Link Aggregation Control Protocol (LACP) implementation    {#lacp_plugin_doc}
2
3This document is to describe the usage of VPP LACP implementation.
4
5## LACP
6
7The Link Aggregation Control Protocol (LACP) is an 802.3ad standard which
8provides a protocol for exchanging information between Partner Systems on a
9link to allow their protocol instances to reach agreement on the Link Aggregation
10Group to which the link belongs and enable transmission and reception for the
11higher layer. Multiple links may be bundled to the same Aggregation Group to form
12a high bandwidth transmission medium and create a fault-tolerant link.
13
14
15### Configuration
16
171. Create the bond interface
18create bond mode lacp [hw-addr <mac-address>] [load-balance { l2 | l23 | l34 } [numa-only]]
19
202. Enslave the physical interface to the bond
21bond add <bond-interface-name> <slave-interface> [passive] [long-timeout]"
22
233. Delete the bond interface
24delete bond {<interface> | sw_if_index <sw_idx>}
25
264. Detach the slave interface from the bond
27bond del <slave-interface>
28
29### Configuration example
30
31```
32create bond mode lacp
33set interface state BondEthernet0 up
34bond add BondEthernet0 TenGigabitEthernet7/0/0
35bond add BondEthernet0 TenGigabitEthernet7/0/1
36bond add BondEthernet0 TenGigabitEthernet5/0/0
37bond add BondEthernet0 TenGigabitEthernet5/0/1
38```
39
40```
41bond del TenGigabitEthernet5/0/1
42```
43
44```
45delete bond BondEthernet0
46```
47
48### Operational data
49
50```
51show lacp [<interface>] [details]
52```
53
54Example:
55
56```
57DBGvpp# show lacp
58                                                        actor state                      partner state
59interface name            sw_if_index  bond interface   exp/def/dis/col/syn/agg/tim/act  exp/def/dis/col/syn/agg/tim/act
60GigabitEthernet2/0/1      1            BondEthernet0      0   0   1   1   1   1   1   1    0   0   1   1   1   1   1   1
61  LAG ID: [(ffff,e4-c7-22-f3-26-71,0000,00ff,0001), (ffff,fc-99-47-4a-0c-8b,0009,00ff,0001)]
62  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
63TenGigabitEthernet4/0/0   2            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
64  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0001), (8000,00-2a-6a-e5-50-c1,0140,8000,011d)]
65  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
66TenGigabitEthernet4/0/1   3            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
67  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0002), (8000,00-2a-6a-e5-50-c1,0140,8000,011e)]
68  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
69TenGigabitEthernet8/0/1   7            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
70  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0003), (8000,00-2a-6a-e5-50-01,007a,8000,0114)]
71  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
72TenGigabitEthernet8/0/0   6            BondEthernet1      0   0   1   1   1   1   1   1    0   0   1   1   1   1   0   1
73  LAG ID: [(ffff,90-e2-ba-76-cf-2d,0001,00ff,0004), (8000,00-2a-6a-e5-50-01,007a,8000,0115)]
74  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
75TenGigabitEthernet6/0/1   5            BondEthernet2      0   0   1   1   1   1   1   1    0   0   1   1   1   1   1   1
76  LAG ID: [(ffff,90-e2-ba-36-31-21,0002,00ff,0001), (ffff,90-e2-ba-29-f5-31,000f,00ff,0002)]
77  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
78TenGigabitEthernet6/0/0   4            BondEthernet2      0   0   1   1   1   1   1   1    0   0   1   1   1   1   1   1
79  LAG ID: [(ffff,90-e2-ba-36-31-21,0002,00ff,0002), (ffff,90-e2-ba-29-f5-31,000f,00ff,0001)]
80  RX-state: CURRENT, TX-state: TRANSMIT, MUX-state: COLLECTING_DISTRIBUTING, PTX-state: PERIODIC_TX
81DBGvpp#
82```
83
84```
85show bond [details]
86````
87
88Example:
89
90```
91DBGvpp# show bond
92sh bond
93interface name   sw_if_index   mode         load balance  active slaves  slaves
94BondEthernet0    10            lacp         l2            1              1
95BondEthernet1    11            lacp         l34           4              4
96BondEthernet2    12            lacp         l23           2              2
97DBGvpp#
98```
99
100### Debugging
101
102```
103debug lacp [<interface>] <on | off>
104```
105