LACP user guide updated. 47/21647/7
authormahesh.manivasagam <mahesh_manivasagam@dell.com>
Tue, 2 Jun 2015 12:16:57 +0000 (17:46 +0530)
committerColin Dixon <colin@colindixon.com>
Tue, 9 Jun 2015 15:43:06 +0000 (15:43 +0000)
Changed openvswitch test to ovs-ofctl on line 52, Removed the quotes for
switch/host on Line 58, Changed the Non text to lower-case non on line
63.

Change-Id: I56596d5c1175b0d728882fd5f397965c422e3fe9
Signed-off-by: mahesh.manivasagam <mahesh_manivasagam@dell.com>
manuals/user-guide/src/main/asciidoc/lacp/lacp-user.adoc [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 132a48e..215d5a0
@@ -10,7 +10,7 @@ The LACP Project within OpenDaylight implements Link Aggregation Control Protoco
 
 This feature can be enabled in the Karaf console of the OpenDaylight Karaf distribution by issuing the following command:
 
- feature:install odl-lacp-plugin
+ feature:install odl-lacp-ui
 
 [NOTE]
 ====
@@ -42,19 +42,88 @@ The group table entry information for the +<lag-groupid>+ added for the aggregat
 Ports that are associated with an aggregator will have the tag +<lacp-agg-ref>+ updated with valid aggregator information.
 
 === Tutorials
-To be updated later
-
-==== <Tutorial Name>
-To be updated later
-
-===== Overview
-An overview of the use case.
-
-===== Prerequisites
-Legacy (non-openflow) switches should be enabled with LACP mode and configured with a long timeout.
-
-===== Target Environment
-To be updated later
-
-===== Instructions
-To be updated 
+The below tutorial demonstrates LACP LAG creation for a sample mininet topology.
+
+==== Sample LACP Topology creation on Mininet
+ sudo mn --controller=remote,ip=<Controller IP> --topo=linear,1 --switch ovsk,protocols=OpenFlow13
+
+The above command will create a virtual network consisting of a switch and a host. The switch will be connected to the controller.
+
+Once the topology is discovered, verify the presence of a flow entry with "dl_type" set to "0x8809" to handle LACP packets using the below ovs-ofctl command:
+
+ ovs-ofctl -O OpenFlow13 dump-flows s1
+  OFPST_FLOW reply (OF1.3) (xid=0x2):
+  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
+
+Configure an additional link between the switch (s1) and host (h1) using the below command on mininet shell to aggregate 2 links:
+
+ mininet> py net.addLink(s1, net.get('h1'))
+ mininet> py s1.attach('s1-eth2')
+
+The LACP module will listen for LACP control packets that are generated from legacy switch (non-OpenFlow enabled). In our example, host (h1) will act as a LACP packet generator.
+In order to generate the LACP control packets, a bond interface has to be created on the host (h1) with mode type set to LACP with long-timeout. To configure bond interface, create a new file bonding.conf under the /etc/modprobe.d/ directory and insert the below lines in this new file:
+
+        alias bond0 bonding
+        options bonding mode=4
+
+Here mode=4 is referred to LACP and the default timeout is set to long.
+
+Enable bond interface and associate both physical interface h1-eth0 & h1-eth1 as members of the bond interface on host (h1) using the below commands on the mininet shell:
+
+ mininet> py net.get('h1').cmd('modprobe bonding')
+ mininet> py net.get('h1').cmd('ip link add bond0 type bond')
+ mininet> py net.get('h1').cmd('ip link set bond0 address <bond-mac-address>')
+ mininet> py net.get('h1').cmd('ip link set h1-eth0 down')
+ mininet> py net.get('h1').cmd('ip link set h1-eth0 master bond0')
+ mininet> py net.get('h1').cmd('ip link set h1-eth1 down')
+ mininet> py net.get('h1').cmd('ip link set h1-eth1 master bond0')
+ mininet> py net.get('h1').cmd('ip link set bond0 up')
+
+Once the bond0 interface is up, the host (h1) will send LACP packets to the switch (s1). The LACP Module will then create a LAG through exchange of LACP packets between the host (h1) and switch (s1). To view the bond interface output on the host (h1) side:
+
+ mininet> py net.get('h1').cmd('cat /proc/net/bonding/bond0')
+ Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
+ Bonding Mode: IEEE 802.3ad Dynamic link aggregation
+ Transmit Hash Policy: layer2 (0)
+ MII Status: up
+ MII Polling Interval (ms): 100
+ Up Delay (ms): 0
+ Down Delay (ms): 0
+ 802.3ad info
+ LACP rate: slow
+ Min links: 0
+ Aggregator selection policy (ad_select): stable
+ Active Aggregator Info:
+         Aggregator ID: 1
+         Number of ports: 2
+         Actor Key: 33
+         Partner Key: 27
+         Partner Mac Address: 00:00:00:00:01:01
+ Slave Interface: h1-eth0
+ MII Status: up
+ Speed: 10000 Mbps
+ Duplex: full
+ Link Failure Count: 0
+ Permanent HW addr: 00:00:00:00:00:11
+ Aggregator ID: 1
+ Slave queue ID: 0
+ Slave Interface: h1-eth1
+ MII Status: up
+ Speed: 10000 Mbps
+ Duplex: full
+ Link Failure Count: 0
+ Permanent HW addr: 00:00:00:00:00:12
+ Aggregator ID: 1
+ Slave queue ID: 0
+
+A corresponding group table entry would be created on the OpenFlow switch (s1) with "type" set to "select" to perform the LAG functionality. To view the group entries:
+
+ mininet>ovs-ofctl -O Openflow13 dump-groups s1
+ OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
+  group_id=60169,type=select,bucket=weight:0,actions=output:1,output:2
+
+To apply the LAG functionality on the switches, the flows should be configured with action set to GroupId instead of output port. A sample add-flow configuration with output action set to GroupId:
+
+ sudo ovs-ofctl -O Openflow13 add-flow s1 dl_type=0x0806,dl_src=SRC_MAC,dl_dst=DST_MAC,actions=group:60169