1 Link Aggregation Control Protocol User Guide
2 ============================================
7 This section contains information about how to use the LACP plugin
8 project with OpenDaylight, including configurations.
10 Link Aggregation Control Protocol Architecture
11 ----------------------------------------------
13 The LACP Project within OpenDaylight implements Link Aggregation Control
14 Protocol (LACP) as an MD-SAL service module and will be used to
15 auto-discover and aggregate multiple links between an OpenDaylight
16 controlled network and LACP-enabled endpoints or switches. The result is
17 the creation of a logical channel, which represents the aggregation of
18 the links. Link aggregation provides link resiliency and bandwidth
19 aggregation. This implementation adheres to IEEE Ethernet specification
20 `802.3ad <http://www.ieee802.org/3/hssg/public/apr07/frazier_01_0407.pdf>`__.
22 Configuring Link Aggregation Control Protocol
23 ---------------------------------------------
25 This feature can be enabled in the Karaf console of the OpenDaylight
26 Karaf distribution by issuing the following command:
30 feature:install odl-lacp-ui
34 1. Ensure that legacy (non-OpenFlow) switches are configured with
35 LACP mode active with a long timeout to allow for the LACP plugin
36 in OpenDaylight to respond to its messages.
38 2. Flows that want to take advantage of LACP-configured Link
39 Aggregation Groups (LAGs) must explicitly use a OpenFlow group
40 table entry created by the LACP plugin. The plugin only creates
41 group table entries, it does not program any flows on its own.
43 Administering or Managing Link Aggregation Control Protocol
44 -----------------------------------------------------------
46 LACP-discovered network inventory and network statistics can be viewed
47 using the following REST APIs.
49 1. List of aggregators available for a node:
53 http://<ControllerIP>:8181/restconf/operational/opendaylight-inventory:nodes/node/<node-id>
55 Aggregator information will appear within the ``<lacp-aggregators>``
58 2. To view only the information of an aggregator:
62 http://<ControllerIP>:8181/restconf/operational/opendaylight-inventory:nodes/node/<node-id>/lacp-aggregators/<agg-id>
64 The group ID associated with the aggregator can be found inside the
65 ``<lag-groupid>`` XML tag.
67 The group table entry information for the ``<lag-groupid>`` added for
68 the aggregator is also available in the ``opendaylight-inventory``
71 3. To view physical port information.
75 http://<ControllerIP>:8181/restconf/operational/opendaylight-inventory:nodes/node/<node-id>/node-connector/<node-connector-id>
77 Ports that are associated with an aggregator will have the tag
78 ``<lacp-agg-ref>`` updated with valid aggregator information.
83 The below tutorial demonstrates LACP LAG creation for a sample mininet
86 Sample LACP Topology creation on Mininet
87 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91 sudo mn --controller=remote,ip=<Controller IP> --topo=linear,1 --switch ovsk,protocols=OpenFlow13
93 The above command will create a virtual network consisting of a switch
94 and a host. The switch will be connected to the controller.
96 Once the topology is discovered, verify the presence of a flow entry
97 with "dl\_type" set to "0x8809" to handle LACP packets using the below
102 ovs-ofctl -O OpenFlow13 dump-flows s1
103 OFPST_FLOW reply (OF1.3) (xid=0x2):
104 cookie=0x300000000000001e, duration=60.067s, table=0, n_packets=0, n_bytes=0, priority=5,dl_dst=01:80:c2:00:00:02,dl_type=0x8809 actions=CONTROLLER:65535
106 Configure an additional link between the switch (s1) and host (h1) using
107 the below command on mininet shell to aggregate 2 links:
111 mininet> py net.addLink(s1, net.get('h1'))
112 mininet> py s1.attach('s1-eth2')
114 The LACP module will listen for LACP control packets that are generated
115 from legacy switch (non-OpenFlow enabled). In our example, host (h1)
116 will act as a LACP packet generator. In order to generate the LACP
117 control packets, a bond interface has to be created on the host (h1)
118 with mode type set to LACP with long-timeout. To configure bond
119 interface, create a new file bonding.conf under the /etc/modprobe.d/
120 directory and insert the below lines in this new file:
125 options bonding mode=4
127 Here mode=4 is referred to LACP and the default timeout is set to long.
129 Enable bond interface and associate both physical interface h1-eth0 &
130 h1-eth1 as members of the bond interface on host (h1) using the below
131 commands on the mininet shell:
135 mininet> py net.get('h1').cmd('modprobe bonding')
136 mininet> py net.get('h1').cmd('ip link add bond0 type bond')
137 mininet> py net.get('h1').cmd('ip link set bond0 address <bond-mac-address>')
138 mininet> py net.get('h1').cmd('ip link set h1-eth0 down')
139 mininet> py net.get('h1').cmd('ip link set h1-eth0 master bond0')
140 mininet> py net.get('h1').cmd('ip link set h1-eth1 down')
141 mininet> py net.get('h1').cmd('ip link set h1-eth1 master bond0')
142 mininet> py net.get('h1').cmd('ip link set bond0 up')
144 Once the bond0 interface is up, the host (h1) will send LACP packets to
145 the switch (s1). The LACP Module will then create a LAG through exchange
146 of LACP packets between the host (h1) and switch (s1). To view the bond
147 interface output on the host (h1) side:
151 mininet> py net.get('h1').cmd('cat /proc/net/bonding/bond0')
152 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
153 Bonding Mode: IEEE 802.3ad Dynamic link aggregation
154 Transmit Hash Policy: layer2 (0)
156 MII Polling Interval (ms): 100
162 Aggregator selection policy (ad_select): stable
163 Active Aggregator Info:
168 Partner Mac Address: 00:00:00:00:01:01
172 Slave Interface: h1-eth0
176 Link Failure Count: 0
177 Permanent HW addr: 00:00:00:00:00:11
183 Slave Interface: h1-eth1
187 Link Failure Count: 0
188 Permanent HW addr: 00:00:00:00:00:12
192 A corresponding group table entry would be created on the OpenFlow
193 switch (s1) with "type" set to "select" to perform the LAG
194 functionality. To view the group entries:
198 mininet>ovs-ofctl -O Openflow13 dump-groups s1
199 OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
200 group_id=60169,type=select,bucket=weight:0,actions=output:1,output:2
202 To apply the LAG functionality on the switches, the flows should be
203 configured with action set to GroupId instead of output port. A sample
204 add-flow configuration with output action set to GroupId:
208 sudo ovs-ofctl -O Openflow13 add-flow s1 dl_type=0x0806,dl_src=SRC_MAC,dl_dst=DST_MAC,actions=group:60169