-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
- 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
- "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
- 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
- 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
- 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*
- 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
- 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
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
- 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
- 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
- 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*
- 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
- 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
- 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
- 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
- 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
- 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
- "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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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 Lithium OpenDaylight distribution simply
+To run the L2 Switch inside the OpenDaylight distribution simply
install the ``odl-l2switch-switch-ui`` feature;
::