BGPCEP: Match Neighbor Condition doc
[docs.git] / docs / user-guide / l2switch-user-guide.rst
index 9181413296311d3cdf55c74b0f4d4be7308b2a36..381e9f9b3b3e5e6a072af58d011f5f23411f6b95 100644 (file)
@@ -1,13 +1,15 @@
-L2Switch User Guide
-===================
+.. _l2switch-user-guide:
+
+L2 Switch User Guide
+====================
 
 Overview
 --------
 
-The L2Switch project provides Layer2 switch functionality.
+The L2 Switch project provides Layer2 switch functionality.
 
-L2Switch Architecture
----------------------
+L2 Switch Architecture
+----------------------
 
 -  Packet Handler
 
@@ -30,20 +32,25 @@ L2Switch Architecture
 
    -  Tracks the locations of hosts in the network
 
--  L2Switch Main
+-  L2 Switch Main
 
    -  Installs flows on each switch based on network traffic
 
-Configuring L2Switch
---------------------
+Configurable parameters in L2 Switch
+------------------------------------
 
-This sections below give details about the configuration settings for
+The sections below give details about the configuration settings for
 the components that can be configured.
 
-Configuring Loop Remover
-------------------------
+The process to change the configuration has been changed with
+the introduction of Blueprint in the Boron release. Please
+refer to :ref:`l2switch-change-config` for an
+example illustrating how to change the configurations.
 
--  52-loopremover.xml
+Configurable parameters in Loop Remover
+---------------------------------------
+
+-  l2switch/loopremover/implementation/src/main/yang/loop-remover-config.yang
 
    -  is-install-lldp-flow
 
@@ -52,6 +59,8 @@ Configuring Loop Remover
 
       -  "false" means this flow will not be installed
 
+      -  default value is true
+
    -  lldp-flow-table-id
 
       -  The LLDP flow will be installed on the specified flow table of
@@ -60,6 +69,8 @@ Configuring Loop Remover
       -  This field is only relevant when "is-install-lldp-flow" is set
          to "true"
 
+      -  default value is 0
+
    -  lldp-flow-priority
 
       -  The LLDP flow will be installed with the specified priority
@@ -67,6 +78,8 @@ Configuring Loop Remover
       -  This field is only relevant when "is-install-lldp-flow" is set
          to "true"
 
+      -  default value is 100
+
    -  lldp-flow-idle-timeout
 
       -  The LLDP flow will timeout (removed from the switch) if the
@@ -75,6 +88,8 @@ Configuring Loop Remover
       -  This field is only relevant when "is-install-lldp-flow" is set
          to "true"
 
+      -  default value is 0
+
    -  lldp-flow-hard-timeout
 
       -  The LLDP flow will timeout (removed from the switch) after *x*
@@ -83,6 +98,8 @@ Configuring Loop Remover
       -  This field is only relevant when "is-install-lldp-flow" is set
          to "true"
 
+      -  default value is 0
+
    -  graph-refresh-delay
 
       -  A graph of the network is maintained and gets updated as
@@ -99,10 +116,12 @@ Configuring Loop Remover
       -  A lower value has the advantage of handling network topology
          changes quicker, at the cost of doing more computation.
 
-Configuring Arp Handler
------------------------
+      -  default value is 1000
+
+Configurable parameters in Arp Handler
+--------------------------------------
 
--  54-arphandler.xml
+-  l2switch/arphandler/src/main/yang/arp-handler-config.yang
 
    -  is-proactive-flood-mode
 
@@ -125,6 +144,8 @@ Configuring Arp Handler
             requests & replies) and the ARP process takes longer than if
             there were flood flows.
 
+      -  default value is true
+
    -  flood-flow-table-id
 
       -  The flood flow will be installed on the specified flow table of
@@ -133,6 +154,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "true"
 
+      -  default value is 0
+
    -  flood-flow-priority
 
       -  The flood flow will be installed with the specified priority
@@ -140,6 +163,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "true"
 
+      -  default value is 2
+
    -  flood-flow-idle-timeout
 
       -  The flood flow will timeout (removed from the switch) if the
@@ -148,6 +173,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "true"
 
+      -  default value is 0
+
    -  flood-flow-hard-timeout
 
       -  The flood flow will timeout (removed from the switch) after *x*
@@ -156,6 +183,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "true"
 
+      -  default value is 0
+
    -  arp-flow-table-id
 
       -  The ARP flow will be installed on the specified flow table of
@@ -164,6 +193,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "false"
 
+      -  default value is 0
+
    -  arp-flow-priority
 
       -  The ARP flow will be installed with the specified priority
@@ -171,6 +202,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "false"
 
+      -  default value is 1
+
    -  arp-flow-idle-timeout
 
       -  The ARP flow will timeout (removed from the switch) if the flow
@@ -179,6 +212,8 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "false"
 
+      -  default value is 0
+
    -  arp-flow-hard-timeout
 
       -  The ARP flow will timeout (removed from the switch) after
@@ -188,10 +223,12 @@ Configuring Arp Handler
       -  This field is only relevant when "is-proactive-flood-mode" is
          set to "false"
 
-Configuring Address Tracker
----------------------------
+      -  default value is 0
+
+Configurable parameters in Address Tracker
+------------------------------------------
 
--  56-addresstracker.xml
+-  l2switch/addresstracker/implementation/src/main/yang/address-tracker-config.yang
 
    -  timestamp-update-interval
 
@@ -205,16 +242,20 @@ Configuring Address Tracker
       -  A lower value has the advantage of knowing how fresh an address
          is.
 
+      -  default value is 600000
+
    -  observe-addresses-from
 
       -  IP and MAC addresses can be observed/learned from ARP, IPv4,
          and IPv6 packets. Set which packets to make these observations
          from.
 
-Configuring L2Switch Main
--------------------------
+      -  default value is arp
 
--  58-l2switchmain.xml
+Configurable parameters in L2 Switch Main
+-----------------------------------------
+
+-  l2switch/l2switch-main/src/main/yang/l2switch-config.yang
 
    -  is-install-dropall-flow
 
@@ -224,6 +265,8 @@ Configuring L2Switch Main
 
       -  "false" means this flow will not be installed
 
+      -  default value is true
+
    -  dropall-flow-table-id
 
       -  The dropall flow will be installed on the specified flow table
@@ -232,6 +275,8 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-install-dropall-flow" is
          set to "true"
 
+      -  default value is 0
+
    -  dropall-flow-priority
 
       -  The dropall flow will be installed with the specified priority
@@ -239,6 +284,8 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-install-dropall-flow" is
          set to "true"
 
+      -  default value is 0
+
    -  dropall-flow-idle-timeout
 
       -  The dropall flow will timeout (removed from the switch) if the
@@ -247,6 +294,8 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-install-dropall-flow" is
          set to "true"
 
+      -  default value is 0
+
    -  dropall-flow-hard-timeout
 
       -  The dropall flow will timeout (removed from the switch) after
@@ -255,16 +304,20 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-install-dropall-flow" is
          set to "true"
 
+      -  default value is 0
+
    -  is-learning-only-mode
 
-      -  "true" means that the L2Switch will only be learning addresses.
+      -  "true" means that the L2 Switch will only be learning addresses.
          No additional flows to optimize network traffic will be
          installed.
 
-      -  "false" means that the L2Switch will react to network traffic
+      -  "false" means that the L2 Switch will react to network traffic
          and install flows on the switches to optimize traffic.
          Currently, MAC-to-MAC flows are installed.
 
+      -  default value is false
+
    -  reactive-flow-table-id
 
       -  The reactive flow will be installed on the specified flow table
@@ -273,6 +326,8 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-learning-only-mode" is set
          to "false"
 
+      -  default value is 0
+
    -  reactive-flow-priority
 
       -  The reactive flow will be installed with the specified priority
@@ -280,6 +335,8 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-learning-only-mode" is set
          to "false"
 
+      -  default value is 10
+
    -  reactive-flow-idle-timeout
 
       -  The reactive flow will timeout (removed from the switch) if the
@@ -288,6 +345,8 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-learning-only-mode" is set
          to "false"
 
+      -  default value is 600
+
    -  reactive-flow-hard-timeout
 
       -  The reactive flow will timeout (removed from the switch) after
@@ -296,8 +355,61 @@ Configuring L2Switch Main
       -  This field is only relevant when "is-learning-only-mode" is set
          to "false"
 
-Running the L2Switch project
-----------------------------
+      -  default value is 300
+
+.. _l2switch-change-config:
+
+Change configuration in L2 Switch
+---------------------------------
+
+.. note:: For more information on Blueprint in OpenDaylight, see `this wiki page <https://wiki.opendaylight.org/view/Using_Blueprint>`_.
+
+The following is an example on how to change the configurations of the L2 Switch components.
+
+**Use Case:** Change the L2 switch from proactive flood mode to reactive mode.
+
+**Option 1:** (external xml file)
+
+#. Navigate to etc folder under download distribution
+#. Create following directory structure::
+
+      mkdir - p opendaylight/datastore/initial/config
+
+#. Create a new xml file corresponding to ``<yang module name>_<container name>.xml``::
+
+      vi arp-handler-config_arp-handler-config.xml
+
+#. Add following contents to the created file::
+
+      <?xml version="1.0" encoding="UTF-8"?>
+        <arp-handler-config xmlns="urn:opendaylight:packet:arp-handler-config">
+        <is-proactive-flood-mode>false</is-proactive-flood-mode>
+      </arp-handler-config>
+
+#. Restart the controller which injects the configurations.
+
+**Option 2:** (REST URL)
+
+#. Make the following REST call
+
+   * *URL:* ``http://{{LOCALIP}}:8181/restconf/config/arp-handler-config:arp-handler-config/``
+   * *Content-Type:* application/json
+   * *Body*::
+
+         {
+           "arp-handler-config":
+           {
+             "is-proactive-flood-mode":false
+           }
+         }
+
+   * *Expected Result:* 201 Created
+
+#. Restart the controller to see updated configurations. With out a restart
+   new configurations will be merged with old configurations which is not desirable.
+
+Running the L2 Switch
+---------------------
 
 To run the L2 Switch inside the OpenDaylight distribution simply
 install the ``odl-l2switch-switch-ui`` feature;