7 The L2Switch project provides Layer2 switch functionality.
14 - Decodes the packets coming to the controller and dispatches them
19 - Removes loops in the network
23 - Handles the decoded ARP packets
27 - Learns the Addresses (MAC and IP) of entities in the network
31 - Tracks the locations of hosts in the network
35 - Installs flows on each switch based on network traffic
40 This sections below give details about the configuration settings for
41 the components that can be configured.
43 Configuring Loop Remover
44 ------------------------
48 - is-install-lldp-flow
50 - "true" means a flow that sends all LLDP packets to the
51 controller will be installed on each switch
53 - "false" means this flow will not be installed
57 - The LLDP flow will be installed on the specified flow table of
60 - This field is only relevant when "is-install-lldp-flow" is set
65 - The LLDP flow will be installed with the specified priority
67 - This field is only relevant when "is-install-lldp-flow" is set
70 - lldp-flow-idle-timeout
72 - The LLDP flow will timeout (removed from the switch) if the
73 flow doesn’t forward a packet for *x* seconds
75 - This field is only relevant when "is-install-lldp-flow" is set
78 - lldp-flow-hard-timeout
80 - The LLDP flow will timeout (removed from the switch) after *x*
81 seconds, regardless of how many packets it is forwarding
83 - This field is only relevant when "is-install-lldp-flow" is set
88 - A graph of the network is maintained and gets updated as
89 network elements go up/down (i.e. links go up/down and switches
92 - After a network element going up/down, it waits
93 *graph-refresh-delay* seconds before recomputing the graph
95 - A higher value has the advantage of doing less graph updates,
96 at the potential cost of losing some packets because the graph
97 didn’t update immediately.
99 - A lower value has the advantage of handling network topology
100 changes quicker, at the cost of doing more computation.
102 Configuring Arp Handler
103 -----------------------
107 - is-proactive-flood-mode
109 - "true" means that flood flows will be installed on each switch.
110 With this flood flow, each switch will flood a packet that
111 doesn’t match any other flows.
113 - Advantage: Fewer packets are sent to the controller because
114 those packets are flooded to the network.
116 - Disadvantage: A lot of network traffic is generated.
118 - "false" means the previously mentioned flood flows will not be
119 installed. Instead an ARP flow will be installed on each switch
120 that sends all ARP packets to the controller.
122 - Advantage: Less network traffic is generated.
124 - Disadvantage: The controller handles more packets (ARP
125 requests & replies) and the ARP process takes longer than if
126 there were flood flows.
128 - flood-flow-table-id
130 - The flood flow will be installed on the specified flow table of
133 - This field is only relevant when "is-proactive-flood-mode" is
136 - flood-flow-priority
138 - The flood flow will be installed with the specified priority
140 - This field is only relevant when "is-proactive-flood-mode" is
143 - flood-flow-idle-timeout
145 - The flood flow will timeout (removed from the switch) if the
146 flow doesn’t forward a packet for *x* seconds
148 - This field is only relevant when "is-proactive-flood-mode" is
151 - flood-flow-hard-timeout
153 - The flood flow will timeout (removed from the switch) after *x*
154 seconds, regardless of how many packets it is forwarding
156 - This field is only relevant when "is-proactive-flood-mode" is
161 - The ARP flow will be installed on the specified flow table of
164 - This field is only relevant when "is-proactive-flood-mode" is
169 - The ARP flow will be installed with the specified priority
171 - This field is only relevant when "is-proactive-flood-mode" is
174 - arp-flow-idle-timeout
176 - The ARP flow will timeout (removed from the switch) if the flow
177 doesn’t forward a packet for *x* seconds
179 - This field is only relevant when "is-proactive-flood-mode" is
182 - arp-flow-hard-timeout
184 - The ARP flow will timeout (removed from the switch) after
185 *arp-flow-hard-timeout* seconds, regardless of how many packets
188 - This field is only relevant when "is-proactive-flood-mode" is
191 Configuring Address Tracker
192 ---------------------------
194 - 56-addresstracker.xml
196 - timestamp-update-interval
198 - A last-seen timestamp is associated with each address. This
199 last-seen timestamp will only be updated after
200 *timestamp-update-interval* milliseconds.
202 - A higher value has the advantage of performing less writes to
205 - A lower value has the advantage of knowing how fresh an address
208 - observe-addresses-from
210 - IP and MAC addresses can be observed/learned from ARP, IPv4,
211 and IPv6 packets. Set which packets to make these observations
214 Configuring L2Switch Main
215 -------------------------
217 - 58-l2switchmain.xml
219 - is-install-dropall-flow
221 - "true" means a drop-all flow will be installed on each switch,
222 so the default action will be to drop a packet instead of
223 sending it to the controller
225 - "false" means this flow will not be installed
227 - dropall-flow-table-id
229 - The dropall flow will be installed on the specified flow table
232 - This field is only relevant when "is-install-dropall-flow" is
235 - dropall-flow-priority
237 - The dropall flow will be installed with the specified priority
239 - This field is only relevant when "is-install-dropall-flow" is
242 - dropall-flow-idle-timeout
244 - The dropall flow will timeout (removed from the switch) if the
245 flow doesn’t forward a packet for *x* seconds
247 - This field is only relevant when "is-install-dropall-flow" is
250 - dropall-flow-hard-timeout
252 - The dropall flow will timeout (removed from the switch) after
253 *x* seconds, regardless of how many packets it is forwarding
255 - This field is only relevant when "is-install-dropall-flow" is
258 - is-learning-only-mode
260 - "true" means that the L2Switch will only be learning addresses.
261 No additional flows to optimize network traffic will be
264 - "false" means that the L2Switch will react to network traffic
265 and install flows on the switches to optimize traffic.
266 Currently, MAC-to-MAC flows are installed.
268 - reactive-flow-table-id
270 - The reactive flow will be installed on the specified flow table
273 - This field is only relevant when "is-learning-only-mode" is set
276 - reactive-flow-priority
278 - The reactive flow will be installed with the specified priority
280 - This field is only relevant when "is-learning-only-mode" is set
283 - reactive-flow-idle-timeout
285 - The reactive flow will timeout (removed from the switch) if the
286 flow doesn’t forward a packet for *x* seconds
288 - This field is only relevant when "is-learning-only-mode" is set
291 - reactive-flow-hard-timeout
293 - The reactive flow will timeout (removed from the switch) after
294 *x* seconds, regardless of how many packets it is forwarding
296 - This field is only relevant when "is-learning-only-mode" is set
299 Running the L2Switch project
300 ----------------------------
302 To run the L2 Switch inside the Lithium OpenDaylight distribution simply
303 install the ``odl-l2switch-switch-ui`` feature;
307 feature:install odl-l2switch-switch-ui
309 Create a network using mininet
310 ------------------------------
314 sudo mn --controller=remote,ip=<Controller IP> --topo=linear,3 --switch ovsk,protocols=OpenFlow13
315 sudo mn --controller=remote,ip=127.0.0.1 --topo=linear,3 --switch ovsk,protocols=OpenFlow13
317 The above command will create a virtual network consisting of 3
318 switches. Each switch will connect to the controller located at the
319 specified IP, i.e. 127.0.0.1
323 sudo mn --controller=remote,ip=127.0.0.1 --mac --topo=linear,3 --switch ovsk,protocols=OpenFlow13
325 The above command has the "mac" option, which makes it easier to
326 distinguish between Host MAC addresses and Switch MAC addresses.
328 Generating network traffic using mininet
329 ----------------------------------------
335 The above command will cause host1 (h1) to ping host2 (h2)
341 *pingall* will cause each host to ping every other host.
343 Checking Address Observations
344 -----------------------------
346 Address Observations are added to the Inventory data tree.
348 The Address Observations on a Node Connector can be checked through a
349 browser or a REST Client.
353 http://10.194.126.91:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/node-connector/openflow:1:1
355 .. figure:: ./images/l2switch-address-observations.png
356 :alt: Address Observations
363 Host information is added to the Topology data tree.
367 - Attachment point (link) to a node/switch
369 This host information and attachment point information can be checked
370 through a browser or a REST Client.
374 http://10.194.126.91:8080/restconf/operational/network-topology:network-topology/topology/flow:1/
376 .. figure:: ./images/l2switch-hosts.png
381 Checking STP status of each link
382 --------------------------------
384 STP Status information is added to the Inventory data tree.
386 - A status of "forwarding" means the link is active and packets are
389 - A status of "discarding" means the link is inactive and packets are
392 The STP status of a link can be checked through a browser or a REST
397 http://10.194.126.91:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/node-connector/openflow:1:2
399 .. figure:: ./images/l2switch-stp-status.png
404 Miscellaneous mininet commands
405 ------------------------------
411 This will bring the link between switch1 (s1) and switch2 (s2) down
417 This will bring the link between switch1 (s1) and switch2 (s2) up
423 This will bring the link between switch1 (s1) and host1 (h1) down