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