Replace supported admonitions with rst directives
[docs.git] / docs / developer-guide / lacp-developer-guide.rst
1 LACP Developer Guide
2 ====================
3
4 LACP Overview
5 -------------
6
7 The OpenDaylight LACP (Link Aggregation Control Protocol) project can be
8 used to aggregate multiple links between OpenDaylight controlled network
9 switches and LACP enabled legacy switches or hosts operating in active
10 LACP mode.
11
12 OpenDaylight LACP passively negotiates automatic bundling of multiple
13 links to form a single LAG (Link Aggregation Group). LAGs are realised
14 in the OpenDaylight controlled switches using OpenFlow 1.3+ group table
15 functionality.
16
17 LACP Architecture
18 -----------------
19
20 -  **inventory**
21
22    -  Maintains list of OpenDaylight controlled switches and port
23       information
24
25    -  List of LAGs created and physical ports that are part of the LAG
26
27    -  Interacts with MD-SAL to update LACP related information
28
29 -  **inventorylistener**
30
31    -  This module interacts with MD-SAL for receiving
32       node/node-connector notifications
33
34 -  **flow**
35
36    -  Programs the switch to punt LACP PDU (Protocol Data Unit) to
37       controller
38
39 -  **packethandler**
40
41    -  Receives and transmits LACP PDUs to the LACP enabled endpoint
42
43    -  Provides infrastructure services for group table programming
44
45 -  **core**
46
47    -  Performs LACP state machine processing
48
49 How LAG programming is implemented
50 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51
52 The LAG representing the aggregated multiple physical ports are realized
53 in the OpenDaylight controlled switches by creating a group table entry
54 (Group table supported from OpenFlow 1.3 onwards). The group table entry
55 has a group type **Select** and action referring to the aggregated
56 physical ports. Any data traffic to be sent out through the LAG can be
57 sent through the **group entry** available for the LAG.
58
59 Suppose there are ports P1-P8 in a node. When LACP project is installed,
60 a group table entry for handling broadcast traffic is automatically
61 created on all the switches that have registered to the controller.
62
63 +--------------------------+--------------------------+--------------------------+
64 | GroupID                  | GroupType                | EgressPorts              |
65 +==========================+==========================+==========================+
66 | <B’castgID>              | ALL                      | P1,P2,…P8                |
67 +--------------------------+--------------------------+--------------------------+
68
69 Now, assume P1 & P2 are now part of LAG1. The group table would be
70 programmed as follows:
71
72 +--------------------------+--------------------------+--------------------------+
73 | GroupID                  | GroupType                | EgressPorts              |
74 +==========================+==========================+==========================+
75 | <B’castgID>              | ALL                      | P3,P4,…P8                |
76 +--------------------------+--------------------------+--------------------------+
77 | <LAG1>                   | SELECT                   | P1,P2                    |
78 +--------------------------+--------------------------+--------------------------+
79
80 When a second LAG, LAG2, is formed with ports P3 and P4,
81
82 +--------------------------+--------------------------+--------------------------+
83 | GroupID                  | GroupType                | EgressPorts              |
84 +==========================+==========================+==========================+
85 | <B’castgID>              | ALL                      | P5,P6,…P8                |
86 +--------------------------+--------------------------+--------------------------+
87 | <LAG1>                   | SELECT                   | P1,P2                    |
88 +--------------------------+--------------------------+--------------------------+
89 | <LAG2>                   | SELECT                   | P3,P4                    |
90 +--------------------------+--------------------------+--------------------------+
91
92 How applications can program OpenFlow flows using LACP-created LAG groups
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94
95 OpenDaylight controller modules can get the information of LAG by
96 listening/querying the LACP Aggregator datastore.
97
98 When any application receives packets, it can check, if the ingress port
99 is part of a LAG by verifying the LAG Aggregator reference
100 (lacp-agg-ref) for the source nodeConnector that OpenFlow plugin
101 provides.
102
103 When applications want to add flows to egress out of the LAG, they must
104 use the group entry corresponding to the LAG.
105
106 From the above example, for a flow to egress out of LAG1,
107
108 **add-flow eth\_type=<xxxx>,ip\_dst=<x.x.x.x>,actions=output:<LAG1>**
109
110 Similarly, when applications want traffic to be broadcasted, they should
111 use the group table entries **<B’castgID>,<LAG1>,<LAG2>** in output
112 action.
113
114 For all applications, the group table information is accessible from
115 LACP Aggregator datastore.
116