f72918d3ffe85bac0490060fbd2434829a30a36b
[docs.git] / docs / user-guide / openflow-plugin-project-user-guide.rst
1 .. _ofp-user-guide:
2
3 OpenFlow Plugin Project User Guide
4 ==================================
5
6 Overview and Architecture
7 -------------------------
8
9 Overview and Architecture
10 ~~~~~~~~~~~~~~~~~~~~~~~~~
11
12 Overview
13 ^^^^^^^^
14
15 OpenFlow is a vendor-neutral standard communications interface defined
16 to enable interaction between the control and forwarding layers of an
17 SDN architecture. The OpenFlow plugin project intends to develop a
18 plugin to support implementations of the OpenFlow specification as it
19 develops and evolves. Specifically the project has developed a plugin
20 aiming to support OpenFlow 1.0 and 1.3.x. It can be extended to add
21 support for subsequent OpenFlow specifications. The plugin is based on
22 the Model Driven Service Abstraction Layer (MD-SAL) architecture
23 (https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL).
24 This new OpenFlow 1.0/1.3 MD-SAL based plugin is distinct from the old
25 OpenFlow 1.0 plugin which was based on the API driven SAL (AD-SAL)
26 architecture.
27
28 Scope
29 ^^^^^
30
31 -  Southbound plugin and integration of OpenFlow 1.0/1.3.x library
32    project
33
34 -  Ongoing support and integration of the OpenFlow specification
35
36 -  The plugin should be implemented in an easily extensible manner
37
38 -  Protocol verification activities will be performed on supported
39    OpenFlow specifications
40
41 Architecture and Design
42 ^^^^^^^^^^^^^^^^^^^^^^^
43
44 Functionality
45 '''''''''''''
46
47 OpenFlow 1.3 Plugin will support the following functionality
48
49 -  Connection Handling
50
51 -  Session Management
52
53 -  State Management.
54
55 -  Error Handling.
56
57 -  Mapping function(Infrastructure to OF structures).
58
59 -  Connection establishment will be handled by OpenFlow library using
60    opensource netty.io library.
61
62 -  Message handling(Ex: Packet in).
63
64 -  Event handling and propagation to upper layers.
65
66 -  Plugin will support both MD-SAL and Hard SAL.
67
68 -  Will be backward compatible with OF 1.0.
69
70 **Activities in OF plugin module**
71
72 -  New OF plugin bundle will support both OF 1.0 and OF 1.3.
73
74 -  Integration with OpenFlow library.
75
76 -  Integration with corresponding MD-SAL infrastructure.
77
78 -  Hard SAL will be supported as adapter on top of MD-SAL plugin.
79
80 -  OF 1.3 and OF 1.0 plugin will be integrated as single bundle.
81
82 Design
83 ''''''
84
85 **Overall Architecture**
86
87 .. figure:: ./images/openflowplugin/plugin_design.jpg
88    :alt: overal architecture
89
90    overal architecture
91
92 Security
93 ''''''''
94
95 **TLS**
96
97 It is strongly recommended that any production deployments utilising
98 the OpenFlow Plugin do so with TLS encryption to protect against
99 various man-in-the-middle attacks. Please refer to the `Certificate
100 Management section of the user guide <https://docs.opendaylight.org/en/latest/user-guide/authentication-and-authorization-services.html#id4>`_
101 for more details. TLS Support in the OpenFlow Plugin is outlined on `this
102 wiki page <https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:_TLS_Support>`_.
103
104 Coverage
105 ~~~~~~~~
106
107 Intro
108 ^^^^^
109
110 This page is to catalog the things that have been tested and confirmed
111 to work:
112
113 Coverage
114 ^^^^^^^^
115
116 Coverage has been moved to a `GoogleDoc
117 Spreadsheet <https://docs.google.com/spreadsheet/ccc?key=0AtpUuSEP8OyMdHNTZjBoM0VjOE9BcGhHMzk3N19uamc&usp=sharing%23gid=2#gid=0>`_
118
119 OF 1.3 Considerations
120 ^^^^^^^^^^^^^^^^^^^^^
121
122 The baseline model is a OF 1.3 model, and the coverage tables primarily
123 deal with OF 1.3. However for OF 1.0, we have a column to indicate
124 either N/A if it doesn’t apply, or whether its been confirmed working.
125
126 OF 1.0 Considerations
127 ^^^^^^^^^^^^^^^^^^^^^
128
129 OF 1.0 is being considered as a switch with: \* 1 Table \* 0 Groups \* 0
130 Meters \* 1 Instruction (Apply Actions) \* and a limited vocabulary of
131 matches and actions.
132
133 Tutorial / How-To
134 -----------------
135
136 .. _ofp-running-new-plugin:
137
138 Running the controller with the new OpenFlow Plugin
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140
141 **How to start**
142
143 There are all helium features (from features-openflowplugin) duplicated
144 into features-openflowplugin-li. The duplicates got suffix *-li* and
145 provide Lithium codebase functionality.
146
147 These are most used:
148
149 -  odl-openflowplugin-app-lldp-speaker-li
150
151 -  odl-openflowplugin-flow-services-rest-li
152
153 -  odl-openflowplugin-drop-test-li
154
155 In case topology is required then the first one should be installed.
156
157 ::
158
159     feature:install odl-openflowplugin-app-lldp-speaker-li
160
161 The Li-southbound currently provides:
162
163 -  flow management
164
165 -  group management
166
167 -  meter management
168
169 -  statistics polling
170
171 **What to log**
172
173 In order to see really low level messages enter these in karaf console:
174
175 ::
176
177     log:set TRACE org.opendaylight.openflowplugin.openflow.md.core
178     log:set TRACE org.opendaylight.openflowplugin.impl
179
180 **How enable topology**
181
182 In order for topology to work (fill dataStore/operational with links)
183 there must be LLDP responses delivered back to controller. This requires
184 table-miss-entries. Table-miss-entry is a flow in table.id=0 with low
185 priority, empty match and one output action = send to controller. Having
186 this flow installed on every node will enable for gathering and
187 exporting links between nodes into dataStore/operational. This is done
188 if you use for example l2 switch application.
189
190 .. code:: xml
191
192     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
193     <flow xmlns="urn:opendaylight:flow:inventory">
194        <barrier>false</barrier>
195        <cookie>54</cookie>
196        <flags>SEND_FLOW_REM</flags>
197        <flow-name>FooXf54</flow-name>
198        <hard-timeout>0</hard-timeout>
199        <id>4242</id>
200        <idle-timeout>0</idle-timeout>
201        <installHw>false</installHw>
202        <instructions>
203            <instruction>
204                <apply-actions>
205                    <action>
206                        <output-action>
207                            <max-length>65535</max-length>
208                            <output-node-connector>CONTROLLER</output-node-connector>
209                        </output-action>
210                        <order>0</order>
211                    </action>
212                </apply-actions>
213                <order>0</order>
214            </instruction>
215        </instructions>
216        <match/>
217        <priority>0</priority>
218        <strict>false</strict>
219        <table_id>0</table_id>
220     </flow>
221
222 **Enable RESTCONF and Controller GUI**
223
224 If you want to use RESTCONF with openflowplugin project, you have to
225 install *odl-restconf* feature to enable that. To install *odl-restconf*
226 feature run the following command
227
228 ::
229
230     karaf#>feature:install odl-restconf
231
232 OpenFlow 1.3 Enabled Software Switches / Environment
233 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
234
235 Getting Mininet with OF 1.3
236 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
237
238 `Download Mininet VM Upgraded to OF
239 1.3 <https://www.dropbox.com/s/dbf9a372elqs1s1/mininet-of-1.3.zip>`_
240 (or the `newer mininet-2.1.0 with
241 OVS-2.0 <https://www.dropbox.com/s/t66vqfqx57a7nhk/mininet-2.1.0-of1.3.zip>`_
242 that works with VMware Player. For using this on VirtualBox, import this
243 to VMware Player and then export the .vmdk ) or you could build one
244 yourself Openflow Protocol Library:OpenVirtualSwitch[Instructions for
245 setting up Mininet with OF 1.3].
246
247 Installing under VirtualBox
248 '''''''''''''''''''''''''''
249
250 .. figure:: ./images/openflowplugin/host-only-vbox.png
251    :alt: configuring a host-only adapter
252
253    configuring a host-only adapter
254
255 For whatever reason, at least on the Mac, NATed interfaces in VirtualBox
256 don’t actually seem to allow for connections from the host to the VM.
257 Instead, you need to configure a host-only network and set it up. Do
258 this by:
259
260 -  Go to the VM’s settings in VirtualBox then to network and add a
261    second adapter attached to "Host-only Adapter" (see the screenshot to
262    the right)
263
264 -  Edit the /etc/network/interfaces file to configure the adapter
265    properly by adding these two lines
266
267 ::
268
269     auto eth1
270     iface eth1 inet dhcp
271
272 -  Reboot the VM
273
274 At this point you should have two interfaces one which gives you NATed
275 access to the internet and another that gives you access between your
276 mac and the VMs. At least for me, the NATed interface gets a 10.0.2.x
277 address and the the host-only interface gets a 192.168.56.x address.
278
279 Your simplest choice: Use Vagrant
280 '''''''''''''''''''''''''''''''''
281
282 `Download Virtual Box <https://www.virtualbox.org/>`_ and install it
283 `Download Vagrant <http://www.vagrantup.com/>`_ and install it
284
285 ::
286
287     cd openflowplugin/vagrant/mininet-2.1.0-of-1.3/
288     vagrant up
289     vagrant ssh
290
291 This will leave you sshed into a fully provisioned Ubuntu Trusty box
292 with mininet-2.1.0 and OVS 2.0 patches to work with OF 1.3.
293
294 Setup CPqD Openflow 1.3 Soft Switch
295 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
296
297 Latest version of Openvswitch (v2.0.0) doesn’t support all the openflow
298 1.3 features, e.g group multipart statistics request. Alternate options
299 is CPqD Openflow 1.3 soft switch, It supports most of the openflow 1.3
300 features.
301
302 -  You can setup the switch as per the instructions given on the
303    following URL
304
305 `https://github.com/CPqD/ofsoftswitch13 <https://github.com/CPqD/ofsoftswitch13>`_
306
307 -  Fire following command to start the switch
308
309 Start the datapath :
310
311 ::
312
313     $ sudo udatapath/ofdatapath --datapath-id=<dpid> --interfaces=<if-list> ptcp:<port>
314      e.g $ sudo udatapath/ofdatapath --datapath-id=000000000001 --interfaces=ethX ptcp:6680
315
316 ethX should not be associated with ip address and ipv6 should be
317 disabled on it. If you are installing the switch on your local machine,
318 you can use following command (for Ubuntu) to create virtual interface.
319
320 ::
321
322     ip link add link ethX address 00:19:d1:29:d2:58 macvlan0 type macvlan
323
324 ethX - Any existing interface.
325
326 Or if you are using mininet VM for installing this switch, you can
327 simply add one more adaptor to your VM.
328
329 Start Openflow protocol agent:
330
331 ::
332
333     $secchan/ofprotocol tcp:<switch-host>:<switch-port> tcp:<ctrl-host>:<ctrl-port>
334      e.g $secchan/ofprotocol tcp:127.0.0.1:6680 tcp:127.0.0.1:6653
335
336 Commands to add entries to various tables of the switch
337 '''''''''''''''''''''''''''''''''''''''''''''''''''''''
338
339 -  Add meter
340
341 ::
342
343     $utilities/dpctl tcp:<switch-host>:<switch-port> meter-mod cmd=add,meter=1 drop:rate=50
344
345 -  Add Groups
346
347 ::
348
349     $utilities/dpctl tcp:127.0.0.1:6680 group-mod cmd=add,type=all,group=1
350
351 ::
352
353     $utilities/dpctl tcp:127.0.0.1:6680 group-mod cmd=add,type=sel,group=2 weight=10 output:1
354
355 -  Create queue
356
357 ::
358
359     $utilities/dpctl tcp:<ip>:<switch port> queue-mod <port-number> <queue-number> <minimum-bandwidth>
360       e.g - $utilities/dpctl tcp:127.0.0.1:6680 queue-mod 1 1 23
361
362 "dpctl" --help is not very intuitive, so please keep adding any new
363 command you figured out while your experiment with the switch.
364
365 Using the built-in Wireshark
366 ''''''''''''''''''''''''''''
367
368 Mininet comes with pre-installed Wireshark, but for some reason it does
369 not include the Openflow protocol dissector. You may want to get and
370 install it in the */.wireshark/plugins/* directory.
371
372 First login to your mininet VM
373
374 ::
375
376      ssh mininet@<your mininet vm ip> -X
377
378 The -X option in ssh will enable x-session over ssh so that the
379 wireshark window can be shown on your host machine’s display. when
380 prompted, enter the password (mininet).
381
382 From the mininet vm shell, set the wireshark capture privileges
383 (http://wiki.wireshark.org/CaptureSetup/CapturePrivileges):
384
385 ::
386
387     sudo chgrp mininet /usr/bin/dumpcap
388     sudo chmod 754 /usr/bin/dumpcap
389     sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
390
391 Finally, start wireshark:
392
393 ::
394
395      wireshark
396
397 The wireshark window should show up.
398
399 To see only Openflow packets, you may want to apply the following filter
400 in the Filter window:
401
402 ::
403
404      tcp.port == 6633 and tcp.flags.push == 1
405
406 Start the capture on *any* port.
407
408 Running Mininet with OF 1.3
409 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
410
411 From within the Mininet VM, run:
412
413 ::
414
415      sudo mn --topo single,3  --controller 'remote,ip=<your controller ip>,port=6653' --switch ovsk,protocols=OpenFlow13
416
417 .. _ofp-e2e-inv:
418
419 End to End Inventory
420 ~~~~~~~~~~~~~~~~~~~~
421
422 Introduction
423 ^^^^^^^^^^^^
424
425 The purpose of this page is to walk you through how to see the Inventory
426 Manager working end to end with the openflowplugin using OpenFlow 1.3.
427
428 Basically, you will learn how to:
429
430 1. Run the Base/Virtualization/Service provider Edition with the new
431    openflowplugin:
432    OpenDaylight\_OpenFlow\_Plugin::Running\_controller\_with\_the\_new\_OF\_plugin[Running
433    the controller with the new OpenFlow Plugin]
434
435 2. Start mininet to use OF 1.3:
436    OpenDaylight\_OpenFlow\_Plugin::Test\_Environment[OpenFlow 1.3
437    Enabled Software Switches / Environment]
438
439 3. Use RESTCONF to see the nodes appear in inventory.
440
441 Restconf for Inventory
442 ^^^^^^^^^^^^^^^^^^^^^^
443
444 The REST url for listing all the nodes is:
445
446 ::
447
448     http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/
449
450 You will need to set the Accept header:
451
452 ::
453
454     Accept: application/xml
455
456 You will also need to use HTTP Basic Auth with username: admin password:
457 admin.
458
459 Alternately, if you have a node’s id you can address it as
460
461 ::
462
463     http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/<id>
464
465 for example
466
467 ::
468
469     http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1
470
471 How to hit RestConf with Postman
472 ''''''''''''''''''''''''''''''''
473
474 `Install Postman for
475 Chrome <https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en>`_
476
477 In the chrome browser bar enter
478
479 ::
480
481     chrome://apps/
482
483 And click on Postman.
484
485 Enter the URL. Click on the Headers button on the far right. Enter the
486 Accept: header. Click on the Basic Auth Tab at the top and setup the
487 username and password. Send.
488
489 Known Bug
490 ^^^^^^^^^
491
492 If you have not had any switches come up, and though no children for
493 http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/
494 and exception will be thrown. I’m pretty sure I know how to fix this
495 bug, just need to get to it :)
496
497 End to End Flows
498 ~~~~~~~~~~~~~~~~
499
500 Instructions
501 ^^^^^^^^^^^^
502
503 Learn End to End for Inventory
504 ''''''''''''''''''''''''''''''
505
506 See :ref:`ofp-e2e-inv`
507
508 Check inventory
509 '''''''''''''''
510
511 -  Run mininet with support for OF 1.3 as described in :ref:`ofp-e2e-inv`
512
513 -  Make sure you see the openflow:1 node come up as described in :ref:`ofp-e2e-inv`
514
515 Flow Strategy
516 '''''''''''''
517
518 Current way to flush a flow to switch looks like this:
519
520 1. Create MD-SAL modeled flow and commit it into dataStore using two
521    phase commit `MD-SAL
522    FAQ <https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:FAQ>`_
523
524 2. FRM gets notified and invokes corresponding rpc (addFlow) on
525    particular service provider (if suitable provider for given node
526    registered)
527
528 3. The provider (plugin in this case) transforms MD-SAL modeled flow
529    into OF-API modeled flow
530
531 4. OF-API modeled flow is then flushed into OFLibrary
532
533 5. OFLibrary encodes flow into particular version of wire protocol and
534    sends it to particular switch
535
536 6. Check on mininet side if flow is set
537
538 Push your flow
539 ''''''''''''''
540
541 -  With PostMan:
542
543    -  Set headers:
544
545       -  Content-Type: application/xml
546
547       -  Accept: application/xml
548
549       -  Authentication
550
551    -  Use URL: "http://<controller
552       IP>:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/1"
553
554    -  PUT
555
556    -  Use Body:
557
558 .. code:: xml
559
560     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
561     <flow xmlns="urn:opendaylight:flow:inventory">
562         <priority>2</priority>
563         <flow-name>Foo</flow-name>
564         <match>
565             <ethernet-match>
566                 <ethernet-type>
567                     <type>2048</type>
568                 </ethernet-type>
569             </ethernet-match>
570             <ipv4-destination>10.0.10.2/24</ipv4-destination>
571         </match>
572         <id>1</id>
573         <table_id>0</table_id>
574         <instructions>
575             <instruction>
576                 <order>0</order>
577                 <apply-actions>
578                     <action>
579                        <order>0</order>
580                        <dec-nw-ttl/>
581                     </action>
582                 </apply-actions>
583             </instruction>
584         </instructions>
585     </flow>
586
587 **\*Note**: If you want to try a different flow id or a different table,
588 make sure the URL and the body stay in sync. For example, if you wanted
589 to try: table 2 flow 20 you’d change the URL to:
590
591 "http://<controller
592 IP>:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/20"
593
594 but you would also need to update the 20 and 2 in the body of the XML.
595
596 Other caveat, we have a known bug with updates, so please only write to
597 a given flow id and table id on a given node once at this time until we
598 resolve it. Or you can use the DELETE method with the same URL in
599 PostMan to delete the flow information on switch and controller cache.
600
601 Check for your flow on the switch
602 '''''''''''''''''''''''''''''''''
603
604 -  See your flow on your mininet:
605
606 ::
607
608     mininet@mininet-vm:~$ sudo ovs-ofctl -O OpenFlow13 dump-flows s1
609     OFPST_FLOW reply (OF1.3) (xid=0x2):
610     cookie=0x0, duration=7.325s, table=0, n_packets=0, n_bytes=0, idle_timeout=300, hard_timeout=600, send_flow_rem priority=2,ip,nw_dst=10.0.10.0/24 actions=dec_ttl
611
612 If you want to see the above information from the mininet prompt - use
613 "sh" instead of "sudo" i.e. use "sh ovs-ofctl -O OpenFlow13 dump-flows
614 s1".
615
616 Check for your flow in the controller config via RESTCONF
617 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
618
619 -  See your configured flow in POSTMAN with
620
621    -  URL http://<controller IP>:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/
622
623    -  GET
624
625    -  You no longer need to set Accept header
626
627 Return Response:
628
629 .. code:: json
630
631     {
632       "flow-node-inventory:table": [
633         {
634           "flow-node-inventory:id": 0,
635           "flow-node-inventory:flow": [
636             {
637               "flow-node-inventory:priority": 1,
638               "flow-node-inventory:id": "10b1a23c-5299-4f7b-83d6-563bab472754",
639               "flow-node-inventory:table_id": 0,
640               "flow-node-inventory:hard-timeout": 0,
641               "flow-node-inventory:idle-timeout": 0,
642               "flow-node-inventory:instructions": {
643                 "flow-node-inventory:instruction": [
644                   {
645                     "flow-node-inventory:apply-actions": {
646                       "flow-node-inventory:action": [
647                         {
648                           "flow-node-inventory:output-action": {
649                             "flow-node-inventory:output-node-connector": "openflow:1:1"
650                           },
651                           "flow-node-inventory:order": 0
652                         }
653                       ]
654                     },
655                     "flow-node-inventory:order": 0
656                   }
657                 ]
658               },
659               "flow-node-inventory:match": {
660                 "flow-node-inventory:ethernet-match": {
661                   "flow-node-inventory:ethernet-type": {
662                     "flow-node-inventory:type": 2048
663                   }
664                 },
665                 "flow-node-inventory:ipv4-destination": "10.0.0.2"
666               },
667               "flow-node-inventory:cookie": 0
668             },
669             {
670               "flow-node-inventory:priority": 1,
671               "flow-node-inventory:id": "020bf359-1299-4da6-b4f7-368bd83b5841",
672               "flow-node-inventory:table_id": 0,
673               "flow-node-inventory:hard-timeout": 0,
674               "flow-node-inventory:idle-timeout": 0,
675               "flow-node-inventory:instructions": {
676                 "flow-node-inventory:instruction": [
677                   {
678                     "flow-node-inventory:apply-actions": {
679                       "flow-node-inventory:action": [
680                         {
681                           "flow-node-inventory:output-action": {
682                             "flow-node-inventory:output-node-connector": "openflow:1:1"
683                           },
684                           "flow-node-inventory:order": 0
685                         }
686                       ]
687                     },
688                     "flow-node-inventory:order": 0
689                   }
690                 ]
691               },
692               "flow-node-inventory:match": {
693                 "flow-node-inventory:ethernet-match": {
694                   "flow-node-inventory:ethernet-type": {
695                     "flow-node-inventory:type": 2048
696                   }
697                 },
698                 "flow-node-inventory:ipv4-destination": "10.0.0.1"
699               },
700               "flow-node-inventory:cookie": 0
701             },
702             {
703               "flow-node-inventory:priority": 1,
704               "flow-node-inventory:id": "42172bfc-9142-4a92-9e90-ee62529b1e85",
705               "flow-node-inventory:table_id": 0,
706               "flow-node-inventory:hard-timeout": 0,
707               "flow-node-inventory:idle-timeout": 0,
708               "flow-node-inventory:instructions": {
709                 "flow-node-inventory:instruction": [
710                   {
711                     "flow-node-inventory:apply-actions": {
712                       "flow-node-inventory:action": [
713                         {
714                           "flow-node-inventory:output-action": {
715                             "flow-node-inventory:output-node-connector": "openflow:1:1"
716                           },
717                           "flow-node-inventory:order": 0
718                         }
719                       ]
720                     },
721                     "flow-node-inventory:order": 0
722                   }
723                 ]
724               },
725               "flow-node-inventory:match": {
726                 "flow-node-inventory:ethernet-match": {
727                   "flow-node-inventory:ethernet-type": {
728                     "flow-node-inventory:type": 2048
729                   }
730                 },
731                 "flow-node-inventory:ipv4-destination": "10.0.0.3"
732               },
733               "flow-node-inventory:cookie": 0
734             },
735             {
736               "flow-node-inventory:priority": 1,
737               "flow-node-inventory:id": "99bf566e-89f3-4c6f-ae9e-e26012ceb1e4",
738               "flow-node-inventory:table_id": 0,
739               "flow-node-inventory:hard-timeout": 0,
740               "flow-node-inventory:idle-timeout": 0,
741               "flow-node-inventory:instructions": {
742                 "flow-node-inventory:instruction": [
743                   {
744                     "flow-node-inventory:apply-actions": {
745                       "flow-node-inventory:action": [
746                         {
747                           "flow-node-inventory:output-action": {
748                             "flow-node-inventory:output-node-connector": "openflow:1:1"
749                           },
750                           "flow-node-inventory:order": 0
751                         }
752                       ]
753                     },
754                     "flow-node-inventory:order": 0
755                   }
756                 ]
757               },
758               "flow-node-inventory:match": {
759                 "flow-node-inventory:ethernet-match": {
760                   "flow-node-inventory:ethernet-type": {
761                     "flow-node-inventory:type": 2048
762                   }
763                 },
764                 "flow-node-inventory:ipv4-destination": "10.0.0.4"
765               },
766               "flow-node-inventory:cookie": 0
767             },
768             {
769               "flow-node-inventory:priority": 1,
770               "flow-node-inventory:id": "019dcc2e-5b4f-44f0-90cc-de490294b862",
771               "flow-node-inventory:table_id": 0,
772               "flow-node-inventory:hard-timeout": 0,
773               "flow-node-inventory:idle-timeout": 0,
774               "flow-node-inventory:instructions": {
775                 "flow-node-inventory:instruction": [
776                   {
777                     "flow-node-inventory:apply-actions": {
778                       "flow-node-inventory:action": [
779                         {
780                           "flow-node-inventory:output-action": {
781                             "flow-node-inventory:output-node-connector": "openflow:1:2"
782                           },
783                           "flow-node-inventory:order": 0
784                         }
785                       ]
786                     },
787                     "flow-node-inventory:order": 0
788                   }
789                 ]
790               },
791               "flow-node-inventory:match": {
792                 "flow-node-inventory:ethernet-match": {
793                   "flow-node-inventory:ethernet-type": {
794                     "flow-node-inventory:type": 2048
795                   }
796                 },
797                 "flow-node-inventory:ipv4-destination": "10.0.0.5"
798               },
799               "flow-node-inventory:cookie": 0
800             },
801             {
802               "flow-node-inventory:priority": 1,
803               "flow-node-inventory:id": "968cf81e-3f16-42f1-8b16-d01ff719c63c",
804               "flow-node-inventory:table_id": 0,
805               "flow-node-inventory:hard-timeout": 0,
806               "flow-node-inventory:idle-timeout": 0,
807               "flow-node-inventory:instructions": {
808                 "flow-node-inventory:instruction": [
809                   {
810                     "flow-node-inventory:apply-actions": {
811                       "flow-node-inventory:action": [
812                         {
813                           "flow-node-inventory:output-action": {
814                             "flow-node-inventory:output-node-connector": "openflow:1:2"
815                           },
816                           "flow-node-inventory:order": 0
817                         }
818                       ]
819                     },
820                     "flow-node-inventory:order": 0
821                   }
822                 ]
823               },
824               "flow-node-inventory:match": {
825                 "flow-node-inventory:ethernet-match": {
826                   "flow-node-inventory:ethernet-type": {
827                     "flow-node-inventory:type": 2048
828                   }
829                 },
830                 "flow-node-inventory:ipv4-destination": "10.0.0.8"
831               },
832               "flow-node-inventory:cookie": 0
833             },
834             {
835               "flow-node-inventory:priority": 1,
836               "flow-node-inventory:id": "1c14ea3c-9dcc-4434-b566-7e99033ea252",
837               "flow-node-inventory:table_id": 0,
838               "flow-node-inventory:hard-timeout": 0,
839               "flow-node-inventory:idle-timeout": 0,
840               "flow-node-inventory:instructions": {
841                 "flow-node-inventory:instruction": [
842                   {
843                     "flow-node-inventory:apply-actions": {
844                       "flow-node-inventory:action": [
845                         {
846                           "flow-node-inventory:output-action": {
847                             "flow-node-inventory:output-node-connector": "openflow:1:2"
848                           },
849                           "flow-node-inventory:order": 0
850                         }
851                       ]
852                     },
853                     "flow-node-inventory:order": 0
854                   }
855                 ]
856               },
857               "flow-node-inventory:match": {
858                 "flow-node-inventory:ethernet-match": {
859                   "flow-node-inventory:ethernet-type": {
860                     "flow-node-inventory:type": 2048
861                   }
862                 },
863                 "flow-node-inventory:ipv4-destination": "10.0.0.6"
864               },
865               "flow-node-inventory:cookie": 0
866             },
867             {
868               "flow-node-inventory:priority": 1,
869               "flow-node-inventory:id": "ed9deeb2-be8f-4b84-bcd8-9d12049383d6",
870               "flow-node-inventory:table_id": 0,
871               "flow-node-inventory:hard-timeout": 0,
872               "flow-node-inventory:idle-timeout": 0,
873               "flow-node-inventory:instructions": {
874                 "flow-node-inventory:instruction": [
875                   {
876                     "flow-node-inventory:apply-actions": {
877                       "flow-node-inventory:action": [
878                         {
879                           "flow-node-inventory:output-action": {
880                             "flow-node-inventory:output-node-connector": "openflow:1:2"
881                           },
882                           "flow-node-inventory:order": 0
883                         }
884                       ]
885                     },
886                     "flow-node-inventory:order": 0
887                   }
888                 ]
889               },
890               "flow-node-inventory:match": {
891                 "flow-node-inventory:ethernet-match": {
892                   "flow-node-inventory:ethernet-type": {
893                     "flow-node-inventory:type": 2048
894                   }
895                 },
896                 "flow-node-inventory:ipv4-destination": "10.0.0.7"
897               },
898               "flow-node-inventory:cookie": 0
899             }
900           ]
901         }
902       ]
903     }
904
905 Look for your flow stats in the controller operational data via
906 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
907
908 RESTCONF
909
910 -  See your operational flow stats in POSTMAN with
911
912    -  URL "http://<controller
913       IP>:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0/"
914
915    -  GET
916
917 Return Response:
918
919 .. code:: json
920
921     {
922       "flow-node-inventory:table": [
923         {
924           "flow-node-inventory:id": 0,
925           "flow-node-inventory:flow": [
926             {
927               "flow-node-inventory:id": "10b1a23c-5299-4f7b-83d6-563bab472754",
928               "opendaylight-flow-statistics:flow-statistics": {
929                 "opendaylight-flow-statistics:cookie": 0,
930                 "opendaylight-flow-statistics:duration": {
931                   "opendaylight-flow-statistics:nanosecond": 886000000,
932                   "opendaylight-flow-statistics:second": 2707
933                 },
934                 "opendaylight-flow-statistics:hard-timeout": 0,
935                 "opendaylight-flow-statistics:byte-count": 784,
936                 "opendaylight-flow-statistics:match": {
937                   "opendaylight-flow-statistics:ethernet-match": {
938                     "opendaylight-flow-statistics:ethernet-type": {
939                       "opendaylight-flow-statistics:type": 2048
940                     }
941                   },
942                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.2/32"
943                 },
944                 "opendaylight-flow-statistics:priority": 1,
945                 "opendaylight-flow-statistics:packet-count": 8,
946                 "opendaylight-flow-statistics:table_id": 0,
947                 "opendaylight-flow-statistics:idle-timeout": 0,
948                 "opendaylight-flow-statistics:instructions": {
949                   "opendaylight-flow-statistics:instruction": [
950                     {
951                       "opendaylight-flow-statistics:order": 0,
952                       "opendaylight-flow-statistics:apply-actions": {
953                         "opendaylight-flow-statistics:action": [
954                           {
955                             "opendaylight-flow-statistics:order": 0,
956                             "opendaylight-flow-statistics:output-action": {
957                               "opendaylight-flow-statistics:output-node-connector": "1",
958                               "opendaylight-flow-statistics:max-length": 0
959                             }
960                           }
961                         ]
962                       }
963                     }
964                   ]
965                 }
966               }
967             },
968             {
969               "flow-node-inventory:id": "020bf359-1299-4da6-b4f7-368bd83b5841",
970               "opendaylight-flow-statistics:flow-statistics": {
971                 "opendaylight-flow-statistics:cookie": 0,
972                 "opendaylight-flow-statistics:duration": {
973                   "opendaylight-flow-statistics:nanosecond": 826000000,
974                   "opendaylight-flow-statistics:second": 2711
975                 },
976                 "opendaylight-flow-statistics:hard-timeout": 0,
977                 "opendaylight-flow-statistics:byte-count": 1568,
978                 "opendaylight-flow-statistics:match": {
979                   "opendaylight-flow-statistics:ethernet-match": {
980                     "opendaylight-flow-statistics:ethernet-type": {
981                       "opendaylight-flow-statistics:type": 2048
982                     }
983                   },
984                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.1/32"
985                 },
986                 "opendaylight-flow-statistics:priority": 1,
987                 "opendaylight-flow-statistics:packet-count": 16,
988                 "opendaylight-flow-statistics:table_id": 0,
989                 "opendaylight-flow-statistics:idle-timeout": 0,
990                 "opendaylight-flow-statistics:instructions": {
991                   "opendaylight-flow-statistics:instruction": [
992                     {
993                       "opendaylight-flow-statistics:order": 0,
994                       "opendaylight-flow-statistics:apply-actions": {
995                         "opendaylight-flow-statistics:action": [
996                           {
997                             "opendaylight-flow-statistics:order": 0,
998                             "opendaylight-flow-statistics:output-action": {
999                               "opendaylight-flow-statistics:output-node-connector": "1",
1000                               "opendaylight-flow-statistics:max-length": 0
1001                             }
1002                           }
1003                         ]
1004                       }
1005                     }
1006                   ]
1007                 }
1008               }
1009             },
1010             {
1011               "flow-node-inventory:id": "42172bfc-9142-4a92-9e90-ee62529b1e85",
1012               "opendaylight-flow-statistics:flow-statistics": {
1013                 "opendaylight-flow-statistics:cookie": 0,
1014                 "opendaylight-flow-statistics:duration": {
1015                   "opendaylight-flow-statistics:nanosecond": 548000000,
1016                   "opendaylight-flow-statistics:second": 2708
1017                 },
1018                 "opendaylight-flow-statistics:hard-timeout": 0,
1019                 "opendaylight-flow-statistics:byte-count": 784,
1020                 "opendaylight-flow-statistics:match": {
1021                   "opendaylight-flow-statistics:ethernet-match": {
1022                     "opendaylight-flow-statistics:ethernet-type": {
1023                       "opendaylight-flow-statistics:type": 2048
1024                     }
1025                   },
1026                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.3/32"
1027                 },
1028                 "opendaylight-flow-statistics:priority": 1,
1029                 "opendaylight-flow-statistics:packet-count": 8,
1030                 "opendaylight-flow-statistics:table_id": 0,
1031                 "opendaylight-flow-statistics:idle-timeout": 0,
1032                 "opendaylight-flow-statistics:instructions": {
1033                   "opendaylight-flow-statistics:instruction": [
1034                     {
1035                       "opendaylight-flow-statistics:order": 0,
1036                       "opendaylight-flow-statistics:apply-actions": {
1037                         "opendaylight-flow-statistics:action": [
1038                           {
1039                             "opendaylight-flow-statistics:order": 0,
1040                             "opendaylight-flow-statistics:output-action": {
1041                               "opendaylight-flow-statistics:output-node-connector": "1",
1042                               "opendaylight-flow-statistics:max-length": 0
1043                             }
1044                           }
1045                         ]
1046                       }
1047                     }
1048                   ]
1049                 }
1050               }
1051             },
1052             {
1053               "flow-node-inventory:id": "99bf566e-89f3-4c6f-ae9e-e26012ceb1e4",
1054               "opendaylight-flow-statistics:flow-statistics": {
1055                 "opendaylight-flow-statistics:cookie": 0,
1056                 "opendaylight-flow-statistics:duration": {
1057                   "opendaylight-flow-statistics:nanosecond": 296000000,
1058                   "opendaylight-flow-statistics:second": 2710
1059                 },
1060                 "opendaylight-flow-statistics:hard-timeout": 0,
1061                 "opendaylight-flow-statistics:byte-count": 1274,
1062                 "opendaylight-flow-statistics:match": {
1063                   "opendaylight-flow-statistics:ethernet-match": {
1064                     "opendaylight-flow-statistics:ethernet-type": {
1065                       "opendaylight-flow-statistics:type": 2048
1066                     }
1067                   },
1068                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.4/32"
1069                 },
1070                 "opendaylight-flow-statistics:priority": 1,
1071                 "opendaylight-flow-statistics:packet-count": 13,
1072                 "opendaylight-flow-statistics:table_id": 0,
1073                 "opendaylight-flow-statistics:idle-timeout": 0,
1074                 "opendaylight-flow-statistics:instructions": {
1075                   "opendaylight-flow-statistics:instruction": [
1076                     {
1077                       "opendaylight-flow-statistics:order": 0,
1078                       "opendaylight-flow-statistics:apply-actions": {
1079                         "opendaylight-flow-statistics:action": [
1080                           {
1081                             "opendaylight-flow-statistics:order": 0,
1082                             "opendaylight-flow-statistics:output-action": {
1083                               "opendaylight-flow-statistics:output-node-connector": "1",
1084                               "opendaylight-flow-statistics:max-length": 0
1085                             }
1086                           }
1087                         ]
1088                       }
1089                     }
1090                   ]
1091                 }
1092               }
1093             },
1094             {
1095               "flow-node-inventory:id": "019dcc2e-5b4f-44f0-90cc-de490294b862",
1096               "opendaylight-flow-statistics:flow-statistics": {
1097                 "opendaylight-flow-statistics:cookie": 0,
1098                 "opendaylight-flow-statistics:duration": {
1099                   "opendaylight-flow-statistics:nanosecond": 392000000,
1100                   "opendaylight-flow-statistics:second": 2711
1101                 },
1102                 "opendaylight-flow-statistics:hard-timeout": 0,
1103                 "opendaylight-flow-statistics:byte-count": 1470,
1104                 "opendaylight-flow-statistics:match": {
1105                   "opendaylight-flow-statistics:ethernet-match": {
1106                     "opendaylight-flow-statistics:ethernet-type": {
1107                       "opendaylight-flow-statistics:type": 2048
1108                     }
1109                   },
1110                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.5/32"
1111                 },
1112                 "opendaylight-flow-statistics:priority": 1,
1113                 "opendaylight-flow-statistics:packet-count": 15,
1114                 "opendaylight-flow-statistics:table_id": 0,
1115                 "opendaylight-flow-statistics:idle-timeout": 0,
1116                 "opendaylight-flow-statistics:instructions": {
1117                   "opendaylight-flow-statistics:instruction": [
1118                     {
1119                       "opendaylight-flow-statistics:order": 0,
1120                       "opendaylight-flow-statistics:apply-actions": {
1121                         "opendaylight-flow-statistics:action": [
1122                           {
1123                             "opendaylight-flow-statistics:order": 0,
1124                             "opendaylight-flow-statistics:output-action": {
1125                               "opendaylight-flow-statistics:output-node-connector": "2",
1126                               "opendaylight-flow-statistics:max-length": 0
1127                             }
1128                           }
1129                         ]
1130                       }
1131                     }
1132                   ]
1133                 }
1134               }
1135             },
1136             {
1137               "flow-node-inventory:id": "968cf81e-3f16-42f1-8b16-d01ff719c63c",
1138               "opendaylight-flow-statistics:flow-statistics": {
1139                 "opendaylight-flow-statistics:cookie": 0,
1140                 "opendaylight-flow-statistics:duration": {
1141                   "opendaylight-flow-statistics:nanosecond": 344000000,
1142                   "opendaylight-flow-statistics:second": 2707
1143                 },
1144                 "opendaylight-flow-statistics:hard-timeout": 0,
1145                 "opendaylight-flow-statistics:byte-count": 784,
1146                 "opendaylight-flow-statistics:match": {
1147                   "opendaylight-flow-statistics:ethernet-match": {
1148                     "opendaylight-flow-statistics:ethernet-type": {
1149                       "opendaylight-flow-statistics:type": 2048
1150                     }
1151                   },
1152                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.8/32"
1153                 },
1154                 "opendaylight-flow-statistics:priority": 1,
1155                 "opendaylight-flow-statistics:packet-count": 8,
1156                 "opendaylight-flow-statistics:table_id": 0,
1157                 "opendaylight-flow-statistics:idle-timeout": 0,
1158                 "opendaylight-flow-statistics:instructions": {
1159                   "opendaylight-flow-statistics:instruction": [
1160                     {
1161                       "opendaylight-flow-statistics:order": 0,
1162                       "opendaylight-flow-statistics:apply-actions": {
1163                         "opendaylight-flow-statistics:action": [
1164                           {
1165                             "opendaylight-flow-statistics:order": 0,
1166                             "opendaylight-flow-statistics:output-action": {
1167                               "opendaylight-flow-statistics:output-node-connector": "2",
1168                               "opendaylight-flow-statistics:max-length": 0
1169                             }
1170                           }
1171                         ]
1172                       }
1173                     }
1174                   ]
1175                 }
1176               }
1177             },
1178             {
1179               "flow-node-inventory:id": "ed9deeb2-be8f-4b84-bcd8-9d12049383d6",
1180               "opendaylight-flow-statistics:flow-statistics": {
1181                 "opendaylight-flow-statistics:cookie": 0,
1182                 "opendaylight-flow-statistics:duration": {
1183                   "opendaylight-flow-statistics:nanosecond": 577000000,
1184                   "opendaylight-flow-statistics:second": 2706
1185                 },
1186                 "opendaylight-flow-statistics:hard-timeout": 0,
1187                 "opendaylight-flow-statistics:byte-count": 784,
1188                 "opendaylight-flow-statistics:match": {
1189                   "opendaylight-flow-statistics:ethernet-match": {
1190                     "opendaylight-flow-statistics:ethernet-type": {
1191                       "opendaylight-flow-statistics:type": 2048
1192                     }
1193                   },
1194                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.7/32"
1195                 },
1196                 "opendaylight-flow-statistics:priority": 1,
1197                 "opendaylight-flow-statistics:packet-count": 8,
1198                 "opendaylight-flow-statistics:table_id": 0,
1199                 "opendaylight-flow-statistics:idle-timeout": 0,
1200                 "opendaylight-flow-statistics:instructions": {
1201                   "opendaylight-flow-statistics:instruction": [
1202                     {
1203                       "opendaylight-flow-statistics:order": 0,
1204                       "opendaylight-flow-statistics:apply-actions": {
1205                         "opendaylight-flow-statistics:action": [
1206                           {
1207                             "opendaylight-flow-statistics:order": 0,
1208                             "opendaylight-flow-statistics:output-action": {
1209                               "opendaylight-flow-statistics:output-node-connector": "2",
1210                               "opendaylight-flow-statistics:max-length": 0
1211                             }
1212                           }
1213                         ]
1214                       }
1215                     }
1216                   ]
1217                 }
1218               }
1219             },
1220             {
1221               "flow-node-inventory:id": "1c14ea3c-9dcc-4434-b566-7e99033ea252",
1222               "opendaylight-flow-statistics:flow-statistics": {
1223                 "opendaylight-flow-statistics:cookie": 0,
1224                 "opendaylight-flow-statistics:duration": {
1225                   "opendaylight-flow-statistics:nanosecond": 659000000,
1226                   "opendaylight-flow-statistics:second": 2705
1227                 },
1228                 "opendaylight-flow-statistics:hard-timeout": 0,
1229                 "opendaylight-flow-statistics:byte-count": 784,
1230                 "opendaylight-flow-statistics:match": {
1231                   "opendaylight-flow-statistics:ethernet-match": {
1232                     "opendaylight-flow-statistics:ethernet-type": {
1233                       "opendaylight-flow-statistics:type": 2048
1234                     }
1235                   },
1236                   "opendaylight-flow-statistics:ipv4-destination": "10.0.0.6/32"
1237                 },
1238                 "opendaylight-flow-statistics:priority": 1,
1239                 "opendaylight-flow-statistics:packet-count": 8,
1240                 "opendaylight-flow-statistics:table_id": 0,
1241                 "opendaylight-flow-statistics:idle-timeout": 0,
1242                 "opendaylight-flow-statistics:instructions": {
1243                   "opendaylight-flow-statistics:instruction": [
1244                     {
1245                       "opendaylight-flow-statistics:order": 0,
1246                       "opendaylight-flow-statistics:apply-actions": {
1247                         "opendaylight-flow-statistics:action": [
1248                           {
1249                             "opendaylight-flow-statistics:order": 0,
1250                             "opendaylight-flow-statistics:output-action": {
1251                               "opendaylight-flow-statistics:output-node-connector": "2",
1252                               "opendaylight-flow-statistics:max-length": 0
1253                             }
1254                           }
1255                         ]
1256                       }
1257                     }
1258                   ]
1259                 }
1260               }
1261             }
1262           ],
1263           "opendaylight-flow-table-statistics:flow-table-statistics": {
1264             "opendaylight-flow-table-statistics:active-flows": 8,
1265             "opendaylight-flow-table-statistics:packets-matched": 97683,
1266             "opendaylight-flow-table-statistics:packets-looked-up": 101772
1267           }
1268         }
1269       ]
1270     }
1271
1272 Discovering and testing new Flow Types
1273 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1274
1275 Currently, the openflowplugin has a test-provider that allows you to
1276 push various flows through the system from the OSGI command line. Once
1277 those flows have been pushed through, you can see them as examples and
1278 then use them to see in the config what a particular flow example looks
1279 like.
1280
1281 Using addMDFlow
1282 '''''''''''''''
1283
1284 From the
1285
1286 ::
1287
1288     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
1289     ./run.sh
1290
1291 Point your mininet at the controller as described above.
1292
1293 once you can see your node (probably openflow:1 if you’ve been following
1294 along) in the inventory, at the OSGI command line try running:
1295
1296 ::
1297
1298     addMDFlow openflow:1 f#
1299
1300 Where # is a number between 1 and 80. This will create one of 80
1301 possible flows. You can go confirm they were created on the switch.
1302
1303 Once you’ve done that, use
1304
1305 -  GET
1306
1307 -  Accept: application/xml
1308
1309 -  URL:
1310    "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/"
1311
1312 To see a full listing of the flows in table 2 (where they will be put).
1313 If you want to see a particular flow, look at
1314
1315 -  URL:
1316    "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/#"
1317
1318 Where # is 123 + the f# you used. So for example, for f22, your url
1319 would be
1320
1321 -  URL:
1322    "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/145"
1323
1324 Note: You may have to trim out some of the sections like that contain
1325 bitfields and binary types that are not correctly modeled.
1326
1327 Note: Before attempting to PUT a flow you have created via addMDFlow,
1328 please change its URL and body to, for example, use table 1 instead of
1329 table 2 or another Flow Id, so you don’t collide.
1330
1331 Note: There are several test command providers and the one handling
1332 flows is **OpenflowpluginTestCommandProvider**. Methods, which can be
1333 use as **commands in OSGI-console** have prefix *\_*.
1334
1335 Example Flows
1336 ^^^^^^^^^^^^^
1337
1338 Examples for XML for various flow matches, instructions & actions can be
1339 found in following section :ref:`here <ofp-example-flows>`.
1340
1341 End to End Topology
1342 ~~~~~~~~~~~~~~~~~~~
1343
1344 Introduction
1345 ^^^^^^^^^^^^
1346
1347 The purpose of this page is to walk you through how to see the Topology
1348 Manager working end to end with the openflowplugin using OpenFlow 1.3.
1349
1350 Basically, you will learn how to:
1351
1352 1. Run the Base/Virtualization/Service provider Edition with the new
1353    openflowplugin: :ref:`Running the controller with the new OpenFlow
1354    Plugin <ofp-running-new-plugin>`
1355
1356 2. Start mininet to use OF 1.3: OpenFlow 1.3 Enabled Software Switches
1357    / Environment
1358
1359 3. Use RESTCONF to see the topology information.
1360
1361 Restconf for Topology
1362 ^^^^^^^^^^^^^^^^^^^^^
1363
1364 The REST url for listing all the nodes is:
1365
1366 ::
1367
1368     http://localhost:8080/restconf/operational/network-topology:network-topology/
1369
1370 You will need to set the Accept header:
1371
1372 ::
1373
1374     Accept: application/xml
1375
1376 You will also need to use HTTP Basic Auth with username: admin password:
1377 admin.
1378
1379 Alternately, if you have a node’s id you can address it as
1380
1381 ::
1382
1383     http://localhost:8080/restconf/operational/network-topology:network-topology/topology/<id>
1384
1385 for example
1386
1387 ::
1388
1389     http://localhost:8080/restconf/operational/network-topology:network-topology/topology/flow:1/
1390
1391 How to hit RestConf with Postman
1392 ''''''''''''''''''''''''''''''''
1393
1394 Install
1395 `postman <https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en>`_
1396 for Chrome
1397
1398 In the chrome browser bar enter
1399
1400 ::
1401
1402     chrome://apps/
1403
1404 And click on Postman.
1405
1406 Enter the URL. Click on the Headers button on the far right. Enter the
1407 Accept: header. Click on the Basic Auth Tab at the top and setup the
1408 username and password. Send.
1409
1410 End to End Groups
1411 ~~~~~~~~~~~~~~~~~
1412
1413 NOTE
1414 ^^^^
1415
1416 Groups are NOT SUPPORTED in current (2.0.0) version of
1417 `openvswitch <http://www.openvswitch.org/download>`_. See
1418
1419 -  http://openvswitch.org/releases/NEWS-2.0.0
1420
1421 -  http://comments.gmane.org/gmane.linux.network.openvswitch.general/3251
1422
1423 For testing group feature please use for example
1424 CPQD virtual switch in the :ref:`ofp-e2e-inv` section.
1425
1426 Instructions
1427 ^^^^^^^^^^^^
1428
1429 Learn End to End for Inventory
1430 ''''''''''''''''''''''''''''''
1431
1432 :ref:`ofp-e2e-inv`
1433
1434 Check inventory
1435 '''''''''''''''
1436
1437 Run CPqD with support for OF 1.3 as described in :ref:`ofp-e2e-inv`
1438
1439 Make sure you see the openflow:1 node come up as described in :ref:`ofp-e2e-inv`
1440
1441 Group Strategy
1442 ''''''''''''''
1443
1444 Current way to flush a group to switch looks like this:
1445
1446 1. create MD-SAL modeled group and commit it into dataStore using two
1447    phase commit
1448
1449 2. FRM gets notified and invokes corresponding rpc (addGroup) on
1450    particular service provider (if suitable provider for given node
1451    registered)
1452
1453 3. the provider (plugin in this case) transforms MD-SAL modeled group
1454    into OF-API modeled group
1455
1456 4. OF-API modeled group is then flushed into OFLibrary
1457
1458 5. OFLibrary encodes group into particular version of wire protocol and
1459    sends it to particular switch
1460
1461 6. check on CPqD if group is installed
1462
1463 Push your Group
1464 '''''''''''''''
1465
1466 -  With PostMan:
1467
1468    -  Set
1469
1470       -  Content-Type: application/xml
1471
1472       -  Accept: application/xml
1473
1474    -  Use URL:
1475       "http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/group/1"
1476
1477    -  PUT
1478
1479
1480    -  Use Body:
1481
1482 .. code:: xml
1483
1484     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1485     <group xmlns="urn:opendaylight:flow:inventory">
1486         <group-type>group-all</group-type>
1487         <buckets>
1488             <bucket>
1489                 <action>
1490                     <pop-vlan-action/>
1491                     <order>0</order>
1492                 </action>
1493                 <bucket-id>12</bucket-id>
1494                 <watch_group>14</watch_group>
1495                 <watch_port>1234</watch_port>
1496             </bucket>
1497             <bucket>
1498                 <action>
1499                     <set-field>
1500                         <ipv4-source>100.1.1.1</ipv4-source>
1501                     </set-field>
1502                     <order>0</order>
1503                 </action>
1504                 <action>
1505                     <set-field>
1506                         <ipv4-destination>200.71.9.5210</ipv4-destination>
1507                     </set-field>
1508                     <order>1</order>
1509                 </action>
1510                 <bucket-id>13</bucket-id>
1511                 <watch_group>14</watch_group>
1512                 <watch_port>1234</watch_port>
1513             </bucket>
1514         </buckets>
1515         <barrier>false</barrier>
1516         <group-name>Foo</group-name>
1517         <group-id>1</group-id>
1518     </group>
1519
1520 .. note::
1521
1522     If you want to try a different group id, make sure the URL and the
1523     body stay in sync. For example, if you wanted to try: group-id 20
1524     you’d change the URL to
1525     "http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/group/20"
1526     but you would also need to update the <group-id>20</group-id> in the
1527     body to match.
1528
1529 .. note::
1530
1531     <ip-address> :Provide the IP Address of the machine on which the
1532     controller is running.
1533
1534 Check for your group on the switch
1535 ''''''''''''''''''''''''''''''''''
1536
1537 -  See your group on your cpqd switch:
1538
1539 ::
1540
1541     COMMAND: sudo dpctl tcp:127.0.0.1:6000 stats-group
1542
1543     SENDING:
1544     stat_req{type="grp", flags="0x0", group="all"}
1545
1546
1547     RECEIVED:
1548     stat_repl{type="grp", flags="0x0", stats=[
1549     {group="1", ref_cnt="0", pkt_cnt="0", byte_cnt="0", cntrs=[{pkt_cnt="0", byte_cnt="0"}, {pkt_cnt="0", byte_cnt="0"}]}]}
1550
1551 Check for your group in the controller config via RESTCONF
1552 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1553
1554 -  See your configured group in POSTMAN with
1555
1556    -  URL
1557       http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/group/1
1558
1559    -  GET
1560
1561    -  You should no longer need to set Accept
1562
1563    -  Note: <ip-address> :Provide the IP Address of the machine on which
1564       the controller is running.
1565
1566 Look for your group stats in the controller operational data via RESTCONF
1567 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1568
1569 -  See your operational group stats in POSTMAN with
1570
1571    -  URL
1572       http://<ip-address>:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/group/1
1573
1574    -  GET
1575
1576    -  Note: <ip-address> :Provide the IP Address of the machine on which
1577       the controller is running.
1578
1579 Discovering and testing Group Types
1580 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1581
1582 Currently, the openflowplugin has a test-provider that allows you to
1583 push various groups through the system from the OSGI command line. Once
1584 those groups have been pushed through, you can see them as examples and
1585 then use them to see in the config what a particular group example looks
1586 like.
1587
1588 Using addGroup
1589 ^^^^^^^^^^^^^^
1590
1591 From the
1592
1593 ::
1594
1595     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
1596     ./run.sh
1597
1598 Point your CPqD at the controller as described above.
1599
1600 once you can see your node (probably openflow:1 if you’ve been following
1601 along) in the inventory, at the OSGI command line try running:
1602
1603 ::
1604
1605     addGroup openflow:1
1606
1607 This will install a group in the switch. You can check whether the group
1608 is installed or not.
1609
1610 Once you’ve done that, use
1611
1612 -  GET
1613
1614 -  Accept: application/xml
1615
1616 -  URL:
1617    "http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/group/1"
1618
1619    -  Note: <ip-address> :Provide the IP Address of the machine on which
1620       the controller is running.
1621
1622 .. note::
1623
1624     Before attempting to PUT a group you have created via addGroup,
1625     please change its URL and body to, for example, use group 1 instead
1626     of group 2 or another Group Id, so that they don’t collide.
1627
1628 .. note::
1629
1630     There are several test command providers and the one handling groups
1631     is OpenflowpluginGroupTestCommandProvider. Methods, which can be use
1632     as commands in OSGI-console have prefix *\_*.
1633
1634 Example Group
1635 ^^^^^^^^^^^^^
1636
1637 Examples for XML for various Group Types can be found in the
1638 test-scripts bundle of the plugin code with names g1.xml, g2.xml and
1639 g3.xml.
1640
1641 End to End Meters
1642 ~~~~~~~~~~~~~~~~~
1643
1644 Instructions
1645 ^^^^^^^^^^^^
1646
1647 Learn End to End for Inventory
1648 ''''''''''''''''''''''''''''''
1649
1650 -  :ref:`ofp-e2e-inv`
1651
1652 Check inventory
1653 '''''''''''''''
1654
1655 -  Run mininet with support for OF 1.3 as described in :ref:`ofp-e2e-inv`
1656
1657 -  Make sure you see the openflow:1 node come up as described in :ref:`ofp-e2e-inv`
1658
1659 Meter Strategy
1660 ''''''''''''''
1661
1662 Current way to flush a meter to switch looks like this:
1663
1664 1. create MD-SAL modeled flow and commit it into dataStore using two
1665    phase commit
1666
1667 2. FRM gets notified and invokes corresponding rpc (addMeter) on
1668    particular service provider (if suitable provider for given node
1669    registered)
1670
1671 3. the provider (plugin in this case) transforms MD-SAL modeled meter
1672    into OF-API modeled meter
1673
1674 4. OF-API modeled meter is then flushed into OFLibrary
1675
1676 5. OFLibrary encodes meter into particular version of wire protocol and
1677    sends it to particular switch
1678
1679 6. check on mininet side if meter is installed
1680
1681 Push your Meter
1682 '''''''''''''''
1683
1684 -  Using PostMan:
1685
1686    -  Set Request Headers
1687
1688       -  Content-Type: application/xml
1689
1690       -  Accept: application/xml
1691
1692    -  Use URL:
1693       "http://:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/1"
1694
1695    -  Method:PUT
1696
1697    -  Request Body:
1698
1699 .. code:: xml
1700
1701     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1702     <meter xmlns="urn:opendaylight:flow:inventory">
1703         <container-name>abcd</container-name>
1704         <flags>meter-burst</flags>
1705         <meter-band-headers>
1706             <meter-band-header>
1707                 <band-burst-size>444</band-burst-size>
1708                 <band-id>0</band-id>
1709                 <band-rate>234</band-rate>
1710                 <dscp-remark-burst-size>5</dscp-remark-burst-size>
1711                 <dscp-remark-rate>12</dscp-remark-rate>
1712                 <prec_level>1</prec_level>
1713                 <meter-band-types>
1714                     <flags>ofpmbt-dscp-remark</flags>
1715                 </meter-band-types>
1716             </meter-band-header>
1717         </meter-band-headers>
1718         <meter-id>1</meter-id>
1719         <meter-name>Foo</meter-name>
1720     </meter>
1721
1722 .. note::
1723
1724     If you want to try a different meter id, make sure the URL and the
1725     body stay in sync. For example, if you wanted to try: meter-id 20
1726     you’d change the URL to
1727     "http://:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/20"
1728     but you would also need to update the 20 in the body to match.
1729
1730 .. note::
1731
1732     :Provide the IP Address of the machine on which the controller is
1733     running.
1734
1735 Check for your meter on the switch
1736 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1737
1738 -  See your meter on your CPqD switch:
1739
1740 ::
1741
1742     COMMAND: $ sudo dpctl tcp:127.0.0.1:6000 meter-config
1743
1744     SENDING:
1745     stat_req{type="mconf", flags="0x0"{meter_id= ffffffff"}
1746
1747
1748     RECEIVED:
1749     stat_repl{type="mconf", flags="0x0", stats=[{meter= c"", flags="4", bands=[{type = dscp_remark, rate="12", burst_size="5", prec_level="1"}]}]}
1750
1751 Check for your meter in the controller config via RESTCONF
1752 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1753
1754 -  See your configured flow in POSTMAN with
1755
1756    -  URL
1757       "http://:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/1"
1758
1759    -  Method: GET
1760
1761    -  You should no longer need to set Request Headers for Accept
1762
1763    -  Note: :Provide the IP Address of the machine on which the
1764       controller is running.
1765
1766 Look for your meter stats in the controller operational data via RESTCONF
1767 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1768
1769 -  See your operational meter stats in POSTMAN with
1770
1771    -  URL
1772       "http://:8080/restconfig/operational/opendaylight-inventory:nodes/node/openflow:1/meter/1"
1773
1774    -  Method: GET
1775
1776    -  Note: :Provide the IP Address of the machine on which the
1777       controller is running.
1778
1779 Discovering and testing Meter Types
1780 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1781
1782 Currently, the openflowplugin has a test-provider that allows you to
1783 push various meters through the system from the OSGI command line. Once
1784 those meters have been pushed through, you can see them as examples and
1785 then use them to see in the config what a particular meter example looks
1786 like.
1787
1788 Using addMeter
1789 ''''''''''''''
1790
1791 From the
1792
1793 ::
1794
1795     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
1796     ./run.sh
1797
1798 Point your CPqD at the controller as described above.
1799
1800 Once you can see your CPqD connected to the controller, at the OSGI
1801 command line try running:
1802
1803 ::
1804
1805     addMeter openflow:1
1806
1807 Once you’ve done that, use
1808
1809 -  GET
1810
1811 -  Accept: application/xml
1812
1813 -  URL:
1814    "http://:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/meter/12"
1815
1816    -  Note: :Provide the IP Address of the machine on which the
1817       controller is running.
1818
1819 .. note::
1820
1821     Before attempting to PUT a meter you have created via addMeter,
1822     please change its URL and body to, for example, use meter 1 instead
1823     of meter 2 or another Meter Id, so you don’t collide.
1824
1825 .. note::
1826
1827     There are several test command providers and the one handling Meter
1828     is **OpenflowpluginMeterTestCommandProvider**. Methods, which can be
1829     used as **commands in OSGI-console** have prefix *\_*. Examples:
1830     addMeter, modifyMeter and removeMeter.
1831
1832 Example Meter
1833 ^^^^^^^^^^^^^
1834
1835 Examples for XML for various Meter Types can be found in the
1836 test-scripts bundle of the plugin code with names m1.xml, m2.xml and
1837 m3.xml.
1838
1839 Statistics
1840 ~~~~~~~~~~
1841
1842 Overview
1843 ^^^^^^^^
1844
1845 This page contains high level detail about the statistics collection
1846 mechanism in new OpenFlow plugin.
1847
1848 Statistics collection in new OpenFlow plugin
1849 ''''''''''''''''''''''''''''''''''''''''''''
1850
1851 New OpenFlow plugin collects following statistics from OpenFlow enabled
1852 node(switch):
1853
1854 1.  Individual Flow Statistics
1855
1856 2.  Aggregate Flow Statistics
1857
1858 3.  Flow Table Statistics
1859
1860 4.  Port Statistics
1861
1862 5.  Group Description
1863
1864 6.  Group Statistics
1865
1866 7.  Meter Configuration
1867
1868 8.  Meter Statistics
1869
1870 9.  Queue Statistics
1871
1872 10. Node Description
1873
1874 11. Flow Table Features
1875
1876 12. Port Description
1877
1878 13. Group Features
1879
1880 14. Meter Features
1881
1882 At a high level statistics collection mechanism is divided into
1883 following three parts
1884
1885 1. Statistics related `YANG models, service APIs and notification
1886    interfaces <https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=tree;f=opendaylight/md-sal/model/model-flow-statistics;h=3488133625ccf18d023bc59aa35c38e922b17d8d;hb=HEAD>`_
1887    are defined in the MD-SAL.
1888
1889 2. Service APIs (RPCs) defined in yang models are implemented by
1890    OpenFlow plugin. Notification interfaces are wired up by OpenFlow
1891    plugin to MD-SAL.
1892
1893 3. Statistics Manager Module: This module use service APIs implemented
1894    by OpenFlow plugin to send statistics requests to all the connected
1895    OpenFlow enabled nodes. Module also implements notification
1896    interfaces to receive statistics response from nodes. Once it
1897    receives statistics response, it augment all the statistics data to
1898    the relevant element of the node (like node-connector, flow,
1899    table,group, meter) and store it in MD-SAL operational data store.
1900
1901 Details of statistics collection
1902 ''''''''''''''''''''''''''''''''
1903
1904 -  Current implementation collects above mentioned statistics (except
1905    10-14) at a periodic interval of 15 seconds.
1906
1907 -  Statistics mentioned in 10 to 14 are only fetched when any node
1908    connects to the controller because these statistics are just static
1909    details about the respective elements.
1910
1911 -  Whenever any new element is added to node (like flow, group, meter,
1912    queue) it sends statistics request immediately to fetch the latest
1913    statistics and store it in the operational data store.
1914
1915 -  Whenever any element is deleted from the node, it immediately remove
1916    the relevant statistics from operational data store.
1917
1918 -  Statistics data are augmented to their respective element stored in
1919    the configuration data store. E.g Controller installed flows are
1920    stored in configuration data store. Whenever Statistics Manager
1921    receive statistics data related to these flow, it search the
1922    corresponding flow in the configuration data store and augment
1923    statistics in the corresponding location in operational data store.
1924    Similar approach is used for other elements of the node.
1925
1926 -  Statistics Manager stores flow statistics as an unaccounted flow
1927    statistics in operational data store if there is no corresponding
1928    flow exist in configuration data store. ID format of unaccounted flow
1929    statistics is as follows - [#UF$TABLE\*\*Unaccounted-flow-count - e.g
1930    #UF$TABLE\*2\*1].
1931
1932 -  All the unaccounted flows will be cleaned up periodically after every
1933    two cycle of flow statistics collection, given that there is no
1934    update for these flows in the last two cycles.
1935
1936 -  Statistics Manager only entertains statistics response for the
1937    request sent by itself. User can write its own statistics collector
1938    using the statistics service APIs and notification defined in yang
1939    models, it won’t effect the functioning of Statistics Manager.
1940
1941 -  OpenFlow 1.0 don’t have concept of Meter and Group, so Statistics
1942    Manager don’t send any group & meter related statistics request to
1943    OpenFlow 1.0 enabled switch.
1944
1945 RESTCONF Uris to access statistics of various node elements
1946 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1947
1948 -  Aggregate Flow Statistics & Flow Table Statistics
1949
1950 ::
1951
1952     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/table/{table-id}
1953
1954 -  Individual Flow Statistics from specific table
1955
1956 ::
1957
1958     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/table/{table-id}/flow/{flow-id}
1959
1960 -  Group Features & Meter Features Statistics
1961
1962 ::
1963
1964     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}
1965
1966 -  Group Description & Group Statistics
1967
1968 ::
1969
1970     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/group/{group-id}
1971
1972 -  Meter Configuration & Meter Statistics
1973
1974 ::
1975
1976     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/meter/{meter-id}
1977
1978 -  Node Connector Statistics
1979
1980 ::
1981
1982     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/node-connector/{node-connector-id}
1983
1984 -  Queue Statistics
1985
1986 ::
1987
1988     GET  http://<controller-ip>:8080/restconf/operational/opendaylight-inventory:nodes/node/{node-id}/node-connector/{node-connector-id}/queue/{queue-id}
1989
1990 Bugs
1991 ''''
1992
1993 For more details and queuries, please send mail to
1994 openflowplugin-dev@lists.opendaylight.org or avishnoi@in.ibm.com If you
1995 want to report any bug in statistics collection, please use
1996 `bugzilla <https://bugs.opendaylight.org>`_.
1997
1998 Web / Graphical Interface
1999 -------------------------
2000
2001 In the Hydrogen & Helium release, the current Web UI does not support
2002 the new OpenFlow 1.3 constructs such as groups, meters, new fields in
2003 the flows, multiple flow tables, etc.
2004
2005 Command Line Interface
2006 ----------------------
2007
2008 The following is not exactly CLI - just a set of test commands which can
2009 be executed on the OSGI console testing various features in OpenFlow 1.3
2010 spec.
2011
2012 -  :ref:`OSGI Console Test Provider Commands:
2013    Flows <ofp-test-provider-flows>`
2014
2015 -  :ref:`OSGI Console Test Provider Commands:
2016    Groups <ofp-test-provider-groups>`
2017
2018 -  :ref:`OSGI Console Test Provider Commands:
2019    Meters <ofp-test-provider-meters>`
2020
2021 -  :ref:`OSGI Console Test Provider Commands: Topology
2022    Events <ofp-test-provider-topology>`
2023
2024 .. _ofp-test-provider-flows:
2025
2026 Flows : Test Provider
2027 ~~~~~~~~~~~~~~~~~~~~~
2028
2029 Currently, the openflowplugin has a test-provider that allows you to
2030 push various flows through the system from the OSGI command line. Once
2031 those flows have been pushed through, you can see them as examples and
2032 then use them to see in the config what a particular flow example looks
2033 like.
2034
2035 AddFlow : addMDFlow
2036 ^^^^^^^^^^^^^^^^^^^
2037
2038 Run the controller by executing:
2039
2040 ::
2041
2042     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2043     ./run.sh
2044
2045 Point your mininet to the controller by giving the parameters
2046 --controller=remote,ip=.
2047
2048 Once you see your node (probably openflow:1 if you’ve been following
2049 along) in the inventory, at the OSGI command line try running:
2050
2051 ::
2052
2053     addMDFlow openflow:1 f#
2054
2055 Where # is a number between 1 and 80 and openflow:1 is the of the
2056 switch. This will create one of 80 possible flows. You can confirm that
2057 they were created on the switch.
2058
2059 RemoveFlow : removeMDFlow
2060 ^^^^^^^^^^^^^^^^^^^^^^^^^
2061
2062 Similar to addMDFlow, from the controller OSGi prompt, while your switch
2063 is connected to the controller, try running:
2064
2065 ::
2066
2067     removeMDFlow openflow:1 f#
2068
2069 where # is a number between 1 and 80 and openflow:1 is the of the
2070 switch. The flow to be deleted should have same flowid and Nodeid as
2071 used for flow add.
2072
2073 ModifyFlow : modifyMDFlow
2074 ^^^^^^^^^^^^^^^^^^^^^^^^^
2075
2076 Similar to addMDFlow, from the controller OSGi prompt, while your switch
2077 is connected to the controller, try running:
2078
2079 ::
2080
2081     modifyMDFlow openflow:1 f#
2082
2083 where # is a number between 1 and 80 and openflow:1 is the of the
2084 switch. The flow to be deleted should have same flowid and Nodeid as
2085 used for flow add.
2086
2087 .. _ofp-test-provider-groups:
2088
2089 Group : Test Provider
2090 ~~~~~~~~~~~~~~~~~~~~~
2091
2092 Currently, the openflowplugin has a test-provider that allows you to
2093 push various flows through the system from the OSGI command line. Once
2094 those flows have been pushed through, you can see them as examples and
2095 then use them to see in the config what a particular flow example looks
2096 like.
2097
2098 AddGroup : addGroup
2099 ^^^^^^^^^^^^^^^^^^^
2100
2101 Run the controller by executing:
2102
2103 ::
2104
2105     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2106     ./run.sh
2107
2108 Point your mininet to the controller by giving the parameters
2109 --controller=remote,ip=.
2110
2111 Once you see your node (probably openflow:1 if you’ve been following
2112 along) in the inventory, at the OSGI command line try running:
2113
2114 ::
2115
2116     addGroup openflow:1 a# g#
2117
2118 Where # is a number between 1 and 4 for grouptype(g#) and 1 and 28 for
2119 actiontype(a#). You can confirm that they were created on the switch.
2120
2121 RemoveGroup : removeGroup
2122 ^^^^^^^^^^^^^^^^^^^^^^^^^
2123
2124 Run the controller by executing:
2125
2126 ::
2127
2128     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2129     ./run.sh
2130
2131 Point your mininet at the controller as described above.
2132
2133 Once you see your node (probably openflow:1 if you’ve been following
2134 along) in the inventory, at the OSGI command line try running:
2135
2136 ::
2137
2138     removeGroup openflow:1 a# g#
2139
2140 Where # is a number between 1 and 4 for grouptype(g#) and 1 and 28 for
2141 actiontype(a#). GroupId should be same as that used for adding the flow.
2142 You can confirm that it was removed from the switch.
2143
2144 ModifyGroup : modifyGroup
2145 ^^^^^^^^^^^^^^^^^^^^^^^^^
2146
2147 Run the controller by executing:
2148
2149 ::
2150
2151     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2152     ./run.sh
2153
2154 Point your mininet at the controller as described above.
2155
2156 Once you see your node (probably openflow:1 if you’ve been following
2157 along) in the inventory, at the OSGI command line try running:
2158
2159 ::
2160
2161     modifyGroup openflow:1 a# g#
2162
2163 Where # is a number between 1 and 4 for grouptype(g#) and 1 and 28 for
2164 actiontype(a#). GroupId should be same as that used for adding the flow.
2165 You can confirm that it was modified on the switch.
2166
2167 .. _ofp-test-provider-meters:
2168
2169 Meters : Test Provider
2170 ~~~~~~~~~~~~~~~~~~~~~~
2171
2172 Currently, the openflowplugin has a test-provider that allows you to
2173 push various flows through the system from the OSGI command line. Once
2174 those flows have been pushed through, you can see them as examples and
2175 then use them to see in the config what a particular flow example looks
2176 like.
2177
2178 AddMeter : addMeter
2179 ^^^^^^^^^^^^^^^^^^^
2180
2181 Run the controller by executing:
2182
2183 ::
2184
2185     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2186     ./run.sh
2187
2188 Point your mininet to the controller by giving the parameters
2189 --controller=remote,ip=.
2190
2191 Once you see your node (probably openflow:1 if you’ve been following
2192 along) in the inventory, at the OSGI command line try running:
2193
2194 ::
2195
2196     addMeter openflow:1
2197
2198 You can now confirm that meter has been created on the switch.
2199
2200 RemoveMeter : removeMeter
2201 ^^^^^^^^^^^^^^^^^^^^^^^^^
2202
2203 Run the controller by executing:
2204
2205 ::
2206
2207     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2208     ./run.sh
2209
2210 Point your mininet to the controller by giving the parameters
2211 --controller=remote,ip=.
2212
2213 Once you see your node (probably openflow:1 if you’ve been following
2214 along) in the inventory, at the OSGI command line try running:
2215
2216 ::
2217
2218     removeMeter openflow:1
2219
2220 The CLI takes care of using the same meterId and nodeId as used for
2221 meter add. You can confirm that it was removed from the switch.
2222
2223 ModifyMeter : modifyMeter
2224 ^^^^^^^^^^^^^^^^^^^^^^^^^
2225
2226 Run the controller by executing:
2227
2228 ::
2229
2230     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2231     ./run.sh
2232
2233 Point your mininet to the controller by giving the parameters
2234 --controller=remote,ip=.
2235
2236 Once you see your node (probably openflow:1 if you’ve been following
2237 along) in the inventory, at the OSGI command line try running:
2238
2239 ::
2240
2241     modifyMeter openflow:1
2242
2243 The CLI takes care of using the same meterId and nodeId as used for
2244 meter add. You can confirm that it was modified on the switch.
2245
2246 .. _ofp-test-provider-topology:
2247
2248 Topology : Notification
2249 ~~~~~~~~~~~~~~~~~~~~~~~
2250
2251 Currently, the openflowplugin has a test-provider that allows you to get
2252 notifications for the topology related events like Link-Discovered ,
2253 Link-Removed events.
2254
2255 Link Discovered Event : Testing
2256 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2257
2258 Run the controller by executing:
2259
2260 ::
2261
2262     cd openflowplugin/distribution/base/target/distributions-openflowplugin-base-0.0.1-SNAPSHOT-osgipackage/opendaylight
2263     ./run.sh
2264
2265 Point your mininet to the controller by giving the parameters
2266 --controller=remote,ip=. Once the controller is connected to the switch,
2267 Link-Discovered event can be tested by initially configuring the
2268 specific flows on the switch. For Link Discovered event either
2269 table-miss flow or LLDP ether-type flow can be configured.
2270
2271 Configuring Table-Miss flow using OpenflowpluginTestCommandProvider
2272
2273 ::
2274
2275     addMDFlow Openflow:1 fTM
2276
2277 as per this
2278 OpenDaylight\_OpenFlow\_Plugin:Test\_Provider#Flows\_:\_Test\_Provider[link].
2279 *fTM* is the table-miss scenario here.
2280
2281 Once the table-miss flow is configured through above command, we can see
2282 the Link-Discovered event in the debug logs on the controller console.
2283
2284 Configuring LLDP ether-type flow using OpenflowpluginTestCommandProvider
2285
2286 ::
2287
2288     addMDFlow Openflow:1 0(table-id) f81
2289
2290 You can confirm that they were created on the switch.
2291
2292 Once the LLDP ether-type flow is configured through above command, we
2293 can see the Link-Discovered event in the debug logs on the controller
2294 console.
2295
2296 Link Removed Event : Testing
2297 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2298
2299 Having configured either table-miss or lldp ether-type flow on switch,
2300 once the switch is disconnected we see the Link-Removed event
2301
2302 Programmatic Interface
2303 ----------------------
2304
2305 The API is documented in the model documentation under the section
2306 OpenFlow Services at:
2307
2308 -  `Models Documentation (OpenFlow Services
2309    Section) <https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Model_Reference>`_
2310
2311 .. _ofp-example-flows:
2312
2313 Example flows
2314 -------------
2315
2316 Overview
2317 ~~~~~~~~
2318
2319 The flow examples on this page are tested to work with OVS.
2320
2321 Use, for example, POSTMAN with the following parameters:
2322
2323 ::
2324
2325     PUT http://<ctrl-addr>:8080/restconf/config/opendaylight-inventory:nodes/node/<Node-id>/table/<Table-#>/flow/<Flow-#>
2326
2327     - Accept: application/xml
2328     - Content-Type: application/xml
2329
2330 For example:
2331
2332 ::
2333
2334     PUT http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/127
2335
2336 Make sure that the Table-# and Flow-# in the URL and in the XML match.
2337
2338 The format of the flow-programming XML is determined by by the grouping
2339 *flow* in the opendaylight-flow-types yang model: MISSING LINK.
2340
2341 Match Examples
2342 ~~~~~~~~~~~~~~
2343
2344 The format of the XML that describes OpenFlow matches is determined by
2345 the opendaylight-match-types yang model: .
2346
2347 IPv4 Dest Address
2348 ^^^^^^^^^^^^^^^^^
2349
2350 -  Flow=124, Table=2, Priority=2,
2351    Instructions=\\{Apply\_Actions={dec\_nw\_ttl}},
2352    match=\\{ipv4\_destination\_address=10.0.1.1/24}
2353
2354 -  Note that ethernet-type MUST be 2048 (0x800)
2355
2356 .. code:: xml
2357
2358     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2359     <flow xmlns="urn:opendaylight:flow:inventory">
2360         <strict>false</strict>
2361         <instructions>
2362             <instruction>
2363                 <order>0</order>
2364                 <apply-actions>
2365                     <action>
2366                         <order>0</order>
2367                         <dec-nw-ttl/>
2368                     </action>
2369                 </apply-actions>
2370             </instruction>
2371         </instructions>
2372         <table_id>2</table_id>
2373         <id>124</id>
2374         <cookie_mask>255</cookie_mask>
2375         <installHw>false</installHw>
2376         <match>
2377             <ethernet-match>
2378                 <ethernet-type>
2379                     <type>2048</type>
2380                 </ethernet-type>
2381             </ethernet-match>
2382             <ipv4-destination>10.0.1.1/24</ipv4-destination>
2383         </match>
2384         <hard-timeout>12</hard-timeout>
2385         <cookie>1</cookie>
2386         <idle-timeout>34</idle-timeout>
2387         <flow-name>FooXf1</flow-name>
2388         <priority>2</priority>
2389         <barrier>false</barrier>
2390     </flow>
2391
2392 Ethernet Src Address
2393 ^^^^^^^^^^^^^^^^^^^^
2394
2395 -  Flow=126, Table=2, Priority=2,
2396    Instructions=\\{Apply\_Actions={drop}},
2397    match=\\{ethernet-source=00:00:00:00:00:01}
2398
2399 .. code:: xml
2400
2401     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2402     <flow xmlns="urn:opendaylight:flow:inventory">
2403         <strict>false</strict>
2404         <instructions>
2405             <instruction>
2406                 <order>0</order>
2407                 <apply-actions>
2408                     <action>
2409                         <order>0</order>
2410                         <drop-action/>
2411                     </action>
2412                 </apply-actions>
2413             </instruction>
2414         </instructions>
2415         <table_id>2</table_id>
2416         <id>126</id>
2417         <cookie_mask>255</cookie_mask>
2418         <installHw>false</installHw>
2419         <match>
2420             <ethernet-match>
2421                 <ethernet-source>
2422                     <address>00:00:00:00:00:01</address>
2423                 </ethernet-source>
2424             </ethernet-match>
2425         </match>
2426         <hard-timeout>12</hard-timeout>
2427         <cookie>3</cookie>
2428         <idle-timeout>34</idle-timeout>
2429         <flow-name>FooXf3</flow-name>
2430         <priority>2</priority>
2431         <barrier>false</barrier>
2432     </flow>
2433
2434 Ethernet Src & Dest Addresses, Ethernet Type
2435 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2436
2437 -  Flow=127, Table=2, Priority=2,
2438    Instructions=\\{Apply\_Actions={drop}},
2439    match=\\{ethernet-source=00:00:00:00:23:ae,
2440    ethernet-destination=ff:ff:ff:ff:ff:ff, ethernet-type=45}
2441
2442 .. code:: xml
2443
2444     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2445     <flow xmlns="urn:opendaylight:flow:inventory">
2446         <strict>false</strict>
2447         <instructions>
2448             <instruction>
2449                 <order>0</order>
2450                 <apply-actions>
2451                     <action>
2452                         <order>0</order>
2453                         <dec-mpls-ttl/>
2454                     </action>
2455                 </apply-actions>
2456             </instruction>
2457         </instructions>
2458         <table_id>2</table_id>
2459         <id>127</id>
2460         <cookie_mask>255</cookie_mask>
2461         <installHw>false</installHw>
2462         <match>
2463             <ethernet-match>
2464                 <ethernet-type>
2465                     <type>45</type>
2466                 </ethernet-type>
2467                 <ethernet-destination>
2468                     <address>ff:ff:ff:ff:ff:ff</address>
2469                 </ethernet-destination>
2470                 <ethernet-source>
2471                     <address>00:00:00:00:23:ae</address>
2472                 </ethernet-source>
2473             </ethernet-match>
2474         </match>
2475         <hard-timeout>12</hard-timeout>
2476         <cookie>4</cookie>
2477         <idle-timeout>34</idle-timeout>
2478         <flow-name>FooXf4</flow-name>
2479         <priority>2</priority>
2480         <barrier>false</barrier>
2481     </flow>
2482
2483 Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, Input Port
2484 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2485
2486 -  Note that ethernet-type MUST be 34887 (0x8847)
2487
2488 .. code:: xml
2489
2490     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2491     <flow xmlns="urn:opendaylight:flow:inventory">
2492         <strict>false</strict>
2493         <instructions>
2494             <instruction>
2495                 <order>0</order>
2496                 <apply-actions>
2497                     <action>
2498                         <order>0</order>
2499                         <dec-mpls-ttl/>
2500                     </action>
2501                 </apply-actions>
2502             </instruction>
2503         </instructions>
2504         <table_id>2</table_id>
2505         <id>128</id>
2506         <cookie_mask>255</cookie_mask>
2507         <match>
2508             <ethernet-match>
2509                 <ethernet-type>
2510                     <type>34887</type>
2511                 </ethernet-type>
2512                 <ethernet-destination>
2513                     <address>ff:ff:ff:ff:ff:ff</address>
2514                 </ethernet-destination>
2515                 <ethernet-source>
2516                     <address>00:00:00:00:23:ae</address>
2517                 </ethernet-source>
2518             </ethernet-match>
2519             <ipv4-source>10.1.2.3/24</ipv4-source>
2520             <ipv4-destination>20.4.5.6/16</ipv4-destination>
2521             <in-port>0</in-port>
2522         </match>
2523         <hard-timeout>12</hard-timeout>
2524         <cookie>5</cookie>
2525         <idle-timeout>34</idle-timeout>
2526         <flow-name>FooXf5</flow-name>
2527         <priority>2</priority>
2528         <barrier>false</barrier>
2529     </flow>
2530
2531 Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, IP
2532 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2533
2534 Protocol #, IP DSCP, IP ECN, Input Port
2535
2536 -  Note that ethernet-type MUST be 2048 (0x800)
2537
2538 .. code:: xml
2539
2540     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2541     <flow xmlns="urn:opendaylight:flow:inventory">
2542         <strict>false</strict>
2543         <instructions>
2544             <instruction>
2545                 <order>0</order>
2546                 <apply-actions>
2547                     <action>
2548                         <order>0</order>
2549                         <dec-nw-ttl/>
2550                     </action>
2551                 </apply-actions>
2552             </instruction>
2553         </instructions>
2554         <table_id>2</table_id>
2555         <id>130</id>
2556         <cookie_mask>255</cookie_mask>
2557         <match>
2558             <ethernet-match>
2559                 <ethernet-type>
2560                     <type>2048</type>
2561                 </ethernet-type>
2562                 <ethernet-destination>
2563                     <address>ff:ff:ff:ff:ff:aa</address>
2564                 </ethernet-destination>
2565                 <ethernet-source>
2566                     <address>00:00:00:11:23:ae</address>
2567                 </ethernet-source>
2568             </ethernet-match>
2569             <ipv4-source>10.1.2.3/24</ipv4-source>
2570             <ipv4-destination>20.4.5.6/16</ipv4-destination>
2571             <ip-match>
2572                 <ip-protocol>56</ip-protocol>
2573                 <ip-dscp>15</ip-dscp>
2574                 <ip-ecn>1</ip-ecn>
2575             </ip-match>
2576             <in-port>0</in-port>
2577         </match>
2578         <hard-timeout>12000</hard-timeout>
2579         <cookie>7</cookie>
2580         <idle-timeout>12000</idle-timeout>
2581         <flow-name>FooXf7</flow-name>
2582         <priority>2</priority>
2583         <barrier>false</barrier>
2584     </flow>
2585
2586 Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, TCP Src &
2587 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2588
2589 Dest Ports, IP DSCP, IP ECN, Input Port
2590
2591 -  Note that ethernet-type MUST be 2048 (0x800)
2592
2593 -  Note that IP Protocol Type MUST be 6
2594
2595 .. code:: xml
2596
2597     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2598     <flow xmlns="urn:opendaylight:flow:inventory">
2599         <strict>false</strict>
2600         <instructions>
2601             <instruction>
2602                 <order>0</order>
2603                 <apply-actions>
2604                     <action>
2605                         <order>0</order>
2606                         <dec-nw-ttl/>
2607                     </action>
2608                 </apply-actions>
2609             </instruction>
2610         </instructions>
2611         <table_id>2</table_id>
2612         <id>131</id>
2613         <cookie_mask>255</cookie_mask>
2614         <match>
2615             <ethernet-match>
2616                 <ethernet-type>
2617                     <type>2048</type>
2618                 </ethernet-type>
2619                 <ethernet-destination>
2620                     <address>ff:ff:29:01:19:61</address>
2621                 </ethernet-destination>
2622                 <ethernet-source>
2623                     <address>00:00:00:11:23:ae</address>
2624                 </ethernet-source>
2625             </ethernet-match>
2626             <ipv4-source>17.1.2.3/8</ipv4-source>
2627             <ipv4-destination>172.168.5.6/16</ipv4-destination>
2628             <ip-match>
2629                 <ip-protocol>6</ip-protocol>
2630                 <ip-dscp>2</ip-dscp>
2631                 <ip-ecn>2</ip-ecn>
2632             </ip-match>
2633             <tcp-source-port>25364</tcp-source-port>
2634             <tcp-destination-port>8080</tcp-destination-port>
2635             <in-port>0</in-port>
2636         </match>
2637         <hard-timeout>1200</hard-timeout>
2638         <cookie>8</cookie>
2639         <idle-timeout>3400</idle-timeout>
2640         <flow-name>FooXf8</flow-name>
2641         <priority>2</priority>
2642         <barrier>false</barrier>
2643     </flow>
2644
2645 Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, UDP Src &
2646 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2647
2648 Dest Ports, IP DSCP, IP ECN, Input Port
2649
2650 -  Note that ethernet-type MUST be 2048 (0x800)
2651
2652 -  Note that IP Protocol Type MUST be 17
2653
2654 .. code:: xml
2655
2656     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2657     <flow xmlns="urn:opendaylight:flow:inventory">
2658         <strict>false</strict>
2659         <instructions>
2660             <instruction>
2661                 <order>0</order>
2662                 <apply-actions>
2663                     <action>
2664                         <order>0</order>
2665                         <dec-nw-ttl/>
2666                     </action>
2667                 </apply-actions>
2668             </instruction>
2669         </instructions>
2670         <table_id>2</table_id>
2671         <id>132</id>
2672         <cookie_mask>255</cookie_mask>
2673         <match>
2674             <ethernet-match>
2675                 <ethernet-type>
2676                     <type>2048</type>
2677                 </ethernet-type>
2678                 <ethernet-destination>
2679                     <address>20:14:29:01:19:61</address>
2680                 </ethernet-destination>
2681                 <ethernet-source>
2682                     <address>00:00:00:11:23:ae</address>
2683                 </ethernet-source>
2684             </ethernet-match>
2685             <ipv4-source>19.1.2.3/10</ipv4-source>
2686             <ipv4-destination>172.168.5.6/18</ipv4-destination>
2687             <ip-match>
2688                 <ip-protocol>17</ip-protocol>
2689                 <ip-dscp>8</ip-dscp>
2690                 <ip-ecn>3</ip-ecn>
2691             </ip-match>
2692             <udp-source-port>25364</udp-source-port>
2693             <udp-destination-port>8080</udp-destination-port>
2694             <in-port>0</in-port>
2695         </match>
2696         <hard-timeout>1200</hard-timeout>
2697         <cookie>9</cookie>
2698         <idle-timeout>3400</idle-timeout>
2699         <flow-name>FooXf9</flow-name>
2700         <priority>2</priority>
2701         <barrier>false</barrier>
2702
2703 Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, ICMPv4
2704 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2705
2706 Type & Code, IP DSCP, IP ECN, Input Port
2707
2708 -  Note that ethernet-type MUST be 2048 (0x800)
2709
2710 -  Note that IP Protocol Type MUST be 1
2711
2712 .. code:: xml
2713
2714     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2715     <flow xmlns="urn:opendaylight:flow:inventory">
2716         <strict>false</strict>
2717         <instructions>
2718             <instruction>
2719                 <order>0</order>
2720                 <apply-actions>
2721                     <action>
2722                         <order>0</order>
2723                         <dec-nw-ttl/>
2724                     </action>
2725                 </apply-actions>
2726             </instruction>
2727         </instructions>
2728         <table_id>2</table_id>
2729         <id>134</id>
2730         <cookie_mask>255</cookie_mask>
2731         <match>
2732             <ethernet-match>
2733                 <ethernet-type>
2734                     <type>2048</type>
2735                 </ethernet-type>
2736                 <ethernet-destination>
2737                     <address>ff:ff:29:01:19:61</address>
2738                 </ethernet-destination>
2739                 <ethernet-source>
2740                     <address>00:00:00:11:23:ae</address>
2741                 </ethernet-source>
2742             </ethernet-match>
2743             <ipv4-source>17.1.2.3/8</ipv4-source>
2744             <ipv4-destination>172.168.5.6/16</ipv4-destination>
2745             <ip-match>
2746                 <ip-protocol>1</ip-protocol>
2747                 <ip-dscp>27</ip-dscp>
2748                 <ip-ecn>3</ip-ecn>
2749             </ip-match>
2750             <icmpv4-match>
2751                 <icmpv4-type>6</icmpv4-type>
2752                 <icmpv4-code>3</icmpv4-code>
2753             </icmpv4-match>
2754             <in-port>0</in-port>
2755         </match>
2756         <hard-timeout>1200</hard-timeout>
2757         <cookie>11</cookie>
2758         <idle-timeout>3400</idle-timeout>
2759         <flow-name>FooXf11</flow-name>
2760         <priority>2</priority>
2761     </flow>
2762
2763 Ethernet Src & Dest Addresses, ARP Operation, ARP Src & Target
2764 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2765
2766 Transport Addresses, ARP Src & Target Hw Addresses
2767
2768 -  Note that ethernet-type MUST be 2054 (0x806)
2769
2770 .. code:: xml
2771
2772     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2773     <flow xmlns="urn:opendaylight:flow:inventory">
2774         <strict>false</strict>
2775         <instructions>
2776             <instruction>
2777                 <order>0</order>
2778                 <apply-actions>
2779                     <action>
2780                         <order>0</order>
2781                         <dec-nw-ttl/>
2782                     </action>
2783                     <action>
2784                         <order>1</order>
2785                         <dec-mpls-ttl/>
2786                     </action>
2787                 </apply-actions>
2788             </instruction>
2789         </instructions>
2790         <table_id>2</table_id>
2791         <id>137</id>
2792         <cookie_mask>255</cookie_mask>
2793         <match>
2794             <ethernet-match>
2795                 <ethernet-type>
2796                     <type>2054</type>
2797                 </ethernet-type>
2798                 <ethernet-destination>
2799                     <address>ff:ff:ff:ff:FF:ff</address>
2800                 </ethernet-destination>
2801                 <ethernet-source>
2802                     <address>00:00:FC:01:23:ae</address>
2803                 </ethernet-source>
2804             </ethernet-match>
2805             <arp-op>1</arp-op>
2806             <arp-source-transport-address>192.168.4.1</arp-source-transport-address>
2807             <arp-target-transport-address>10.21.22.23</arp-target-transport-address>
2808             <arp-source-hardware-address>
2809                 <address>12:34:56:78:98:AB</address>
2810             </arp-source-hardware-address>
2811             <arp-target-hardware-address>
2812                 <address>FE:DC:BA:98:76:54</address>
2813             </arp-target-hardware-address>
2814         </match>
2815         <hard-timeout>12</hard-timeout>
2816         <cookie>14</cookie>
2817         <idle-timeout>34</idle-timeout>
2818         <flow-name>FooXf14</flow-name>
2819         <priority>2</priority>
2820         <barrier>false</barrier>
2821
2822 Ethernet Src & Dest Addresses, Ethernet Type, VLAN ID, VLAN PCP
2823 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2824
2825 .. code:: xml
2826
2827     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2828     <flow xmlns="urn:opendaylight:flow:inventory">
2829         <strict>false</strict>
2830         <instructions>
2831             <instruction>
2832                 <order>0</order>
2833                 <apply-actions>
2834                     <action>
2835                         <order>0</order>
2836                         <dec-nw-ttl/>
2837                     </action>
2838                 </apply-actions>
2839             </instruction>
2840         </instructions>
2841         <table_id>2</table_id>
2842         <id>138</id>
2843         <cookie_mask>255</cookie_mask>
2844         <match>
2845             <ethernet-match>
2846                 <ethernet-type>
2847                     <type>2048</type>
2848                 </ethernet-type>
2849                 <ethernet-destination>
2850                     <address>ff:ff:29:01:19:61</address>
2851                 </ethernet-destination>
2852                 <ethernet-source>
2853                     <address>00:00:00:11:23:ae</address>
2854                 </ethernet-source>
2855             </ethernet-match>
2856             <vlan-match>
2857                 <vlan-id>
2858                     <vlan-id>78</vlan-id>
2859                     <vlan-id-present>true</vlan-id-present>
2860                 </vlan-id>
2861                 <vlan-pcp>3</vlan-pcp>
2862           </vlan-match>
2863         </match>
2864         <hard-timeout>1200</hard-timeout>
2865         <cookie>15</cookie>
2866         <idle-timeout>3400</idle-timeout>
2867         <flow-name>FooXf15</flow-name>
2868         <priority>2</priority>
2869         <barrier>false</barrier>
2870     </flow>
2871
2872 Ethernet Src & Dest Addresses, MPLS Label, MPLS TC, MPLS BoS
2873 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2874
2875 .. code:: xml
2876
2877     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2878     <flow xmlns="urn:opendaylight:flow:inventory">
2879         <flow-name>FooXf17</flow-name>
2880         <id>140</id>
2881         <cookie_mask>255</cookie_mask>
2882         <cookie>17</cookie>
2883         <hard-timeout>1200</hard-timeout>
2884         <idle-timeout>3400</idle-timeout>
2885         <priority>2</priority>
2886         <table_id>2</table_id>
2887         <strict>false</strict>
2888         <instructions>
2889             <instruction>
2890                 <order>0</order>
2891                 <apply-actions>
2892                     <action>
2893                         <order>0</order>
2894                         <dec-nw-ttl/>
2895                     </action>
2896                 </apply-actions>
2897             </instruction>
2898         </instructions>
2899         <match>
2900             <ethernet-match>
2901                 <ethernet-type>
2902                     <type>34887</type>
2903                 </ethernet-type>
2904                 <ethernet-destination>
2905                     <address>ff:ff:29:01:19:61</address>
2906                 </ethernet-destination>
2907                 <ethernet-source>
2908                     <address>00:00:00:11:23:ae</address>
2909                 </ethernet-source>
2910             </ethernet-match>
2911             <protocol-match-fields>
2912                 <mpls-label>567</mpls-label>
2913                 <mpls-tc>3</mpls-tc>
2914                 <mpls-bos>1</mpls-bos>
2915             </protocol-match-fields>
2916         </match>
2917     </flow>
2918
2919 IPv6 Src & Dest Addresses
2920 ^^^^^^^^^^^^^^^^^^^^^^^^^
2921
2922 -  Note that ethernet-type MUST be 34525
2923
2924 .. code:: xml
2925
2926     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2927     <flow xmlns="urn:opendaylight:flow:inventory">
2928         <strict>false</strict>
2929         <flow-name>FooXf18</flow-name>
2930         <id>141</id>
2931         <cookie_mask>255</cookie_mask>
2932         <cookie>18</cookie>
2933         <table_id>2</table_id>
2934         <priority>2</priority>
2935         <hard-timeout>1200</hard-timeout>
2936         <idle-timeout>3400</idle-timeout>
2937         <installHw>false</installHw>
2938         <instructions>
2939             <instruction>
2940                 <order>0</order>
2941                 <apply-actions>
2942                     <action>
2943                         <order>0</order>
2944                         <dec-nw-ttl/>
2945                     </action>
2946                 </apply-actions>
2947             </instruction>
2948         </instructions>
2949         <match>
2950             <ethernet-match>
2951                 <ethernet-type>
2952                     <type>34525</type>
2953                 </ethernet-type>
2954             </ethernet-match>
2955             <ipv6-source>fe80::2acf:e9ff:fe21:6431/128</ipv6-source>
2956             <ipv6-destination>aabb:1234:2acf:e9ff::fe21:6431/64</ipv6-destination>
2957         </match>
2958     </flow>
2959
2960 Metadata
2961 ^^^^^^^^
2962
2963 .. code:: xml
2964
2965     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2966     <flow xmlns="urn:opendaylight:flow:inventory">
2967         <strict>false</strict>
2968         <flow-name>FooXf19</flow-name>
2969         <id>142</id>
2970         <cookie_mask>255</cookie_mask>
2971         <cookie>19</cookie>
2972         <table_id>2</table_id>
2973         <priority>1</priority>
2974         <hard-timeout>1200</hard-timeout>
2975         <idle-timeout>3400</idle-timeout>
2976         <installHw>false</installHw>
2977         <instructions>
2978             <instruction>
2979                 <order>0</order>
2980                 <apply-actions>
2981                     <action>
2982                         <order>0</order>
2983                         <dec-nw-ttl/>
2984                     </action>
2985                 </apply-actions>
2986             </instruction>
2987         </instructions>
2988         <match>
2989             <metadata>
2990                 <metadata>12345</metadata>
2991             </metadata>
2992         </match>
2993     </flow>
2994
2995 Metadata, Metadata Mask
2996 ^^^^^^^^^^^^^^^^^^^^^^^
2997
2998 .. code:: xml
2999
3000     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3001     <flow xmlns="urn:opendaylight:flow:inventory">
3002         <strict>false</strict>
3003         <flow-name>FooXf20</flow-name>
3004         <id>143</id>
3005         <cookie_mask>255</cookie_mask>
3006         <cookie>20</cookie>
3007         <table_id>2</table_id>
3008         <priority>2</priority>
3009         <hard-timeout>1200</hard-timeout>
3010         <idle-timeout>3400</idle-timeout>
3011         <installHw>false</installHw>
3012         <instructions>
3013             <instruction>
3014                 <order>0</order>
3015                 <apply-actions>
3016                     <action>
3017                         <order>0</order>
3018                         <dec-nw-ttl/>
3019                     </action>
3020                 </apply-actions>
3021             </instruction>
3022         </instructions>
3023         <match>
3024             <metadata>
3025                 <metadata>12345</metadata>
3026                 <metadata-mask>//FF</metadata-mask>
3027             </metadata>
3028         </match>
3029     </flow>
3030
3031 IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, UDP Src & Dest Ports
3032 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3033
3034 -  Note that ethernet-type MUST be 34525
3035
3036 .. code:: xml
3037
3038     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3039     <flow xmlns="urn:opendaylight:flow:inventory">
3040         <strict>false</strict>
3041         <flow-name>FooXf21</flow-name>
3042         <id>144</id>
3043         <cookie_mask>255</cookie_mask>
3044         <cookie>21</cookie>
3045         <table_id>2</table_id>
3046         <priority>2</priority>
3047         <hard-timeout>1200</hard-timeout>
3048         <idle-timeout>3400</idle-timeout>
3049         <installHw>false</installHw>
3050         <instructions>
3051             <instruction>
3052                 <order>0</order>
3053                 <apply-actions>
3054                     <action>
3055                         <order>0</order>
3056                         <dec-nw-ttl/>
3057                     </action>
3058                 </apply-actions>
3059             </instruction>
3060         </instructions>
3061         <match>
3062             <ethernet-match>
3063                 <ethernet-type>
3064                     <type>34525</type>
3065                 </ethernet-type>
3066             </ethernet-match>
3067             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3068             <ipv6-destination>fe80::2acf:e9ff:fe21:6431/128</ipv6-destination>
3069             <metadata>
3070                 <metadata>12345</metadata>
3071             </metadata>
3072             <ip-match>
3073                 <ip-protocol>17</ip-protocol>
3074                 <ip-dscp>8</ip-dscp>
3075                 <ip-ecn>3</ip-ecn>
3076             </ip-match>
3077             <udp-source-port>25364</udp-source-port>
3078             <udp-destination-port>8080</udp-destination-port>
3079         </match>
3080     </flow>
3081
3082 IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, TCP Src & Dest Ports
3083 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3084
3085 -  Note that ethernet-type MUST be 34525
3086
3087 -  Note that IP Protocol MUST be 6
3088
3089 .. code:: xml
3090
3091     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3092     <flow xmlns="urn:opendaylight:flow:inventory">
3093         <strict>false</strict>
3094         <flow-name>FooXf22</flow-name>
3095         <id>145</id>
3096         <cookie_mask>255</cookie_mask>
3097         <cookie>22</cookie>
3098         <table_id>2</table_id>
3099         <priority>2</priority>
3100         <hard-timeout>1200</hard-timeout>
3101         <idle-timeout>3400</idle-timeout>
3102         <installHw>false</installHw>
3103         <instructions>
3104             <instruction>
3105                 <order>0</order>
3106                 <apply-actions>
3107                     <action>
3108                         <order>0</order>
3109                         <dec-nw-ttl/>
3110                     </action>
3111                 </apply-actions>
3112             </instruction>
3113         </instructions>
3114         <match>
3115             <ethernet-match>
3116                 <ethernet-type>
3117                     <type>34525</type>
3118                 </ethernet-type>
3119             </ethernet-match>
3120             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3121             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
3122             <metadata>
3123                 <metadata>12345</metadata>
3124             </metadata>
3125             <ip-match>
3126                 <ip-protocol>6</ip-protocol>
3127                 <ip-dscp>60</ip-dscp>
3128                 <ip-ecn>3</ip-ecn>
3129             </ip-match>
3130             <tcp-source-port>183</tcp-source-port>
3131             <tcp-destination-port>8080</tcp-destination-port>
3132         </match>
3133     </flow>
3134
3135 IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, TCP Src & Dest Ports, IPv6 Label
3136 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3137
3138 -  Note that ethernet-type MUST be 34525
3139
3140 -  Note that IP Protocol MUST be 6
3141
3142 .. code:: xml
3143
3144     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3145     <flow xmlns="urn:opendaylight:flow:inventory">
3146         <strict>false</strict>
3147         <flow-name>FooXf23</flow-name>
3148         <id>146</id>
3149         <cookie_mask>255</cookie_mask>
3150         <cookie>23</cookie>
3151         <table_id>2</table_id>
3152         <priority>2</priority>
3153         <hard-timeout>1200</hard-timeout>
3154         <idle-timeout>3400</idle-timeout>
3155         <installHw>false</installHw>
3156         <instructions>
3157             <instruction>
3158                 <order>0</order>
3159                 <apply-actions>
3160                     <action>
3161                         <order>0</order>
3162                         <dec-nw-ttl/>
3163                     </action>
3164                 </apply-actions>
3165             </instruction>
3166         </instructions>
3167         <match>
3168             <ethernet-match>
3169                 <ethernet-type>
3170                     <type>34525</type>
3171                 </ethernet-type>
3172             </ethernet-match>
3173             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3174             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
3175             <metadata>
3176                 <metadata>12345</metadata>
3177             </metadata>
3178             <ipv6-label>
3179                 <ipv6-flabel>33</ipv6-flabel>
3180             </ipv6-label>
3181             <ip-match>
3182                 <ip-protocol>6</ip-protocol>
3183                 <ip-dscp>60</ip-dscp>
3184                 <ip-ecn>3</ip-ecn>
3185             </ip-match>
3186             <tcp-source-port>183</tcp-source-port>
3187             <tcp-destination-port>8080</tcp-destination-port>
3188         </match>
3189     </flow>
3190
3191 Tunnel ID
3192 ^^^^^^^^^
3193
3194 .. code:: xml
3195
3196     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3197     <flow xmlns="urn:opendaylight:flow:inventory">
3198         <strict>false</strict>
3199         <flow-name>FooXf24</flow-name>
3200         <id>147</id>
3201         <cookie_mask>255</cookie_mask>
3202         <cookie>24</cookie>
3203         <table_id>2</table_id>
3204         <priority>2</priority>
3205         <hard-timeout>1200</hard-timeout>
3206         <idle-timeout>3400</idle-timeout>
3207         <installHw>false</installHw>
3208         <instructions>
3209             <instruction>
3210                 <order>0</order>
3211                 <apply-actions>
3212                     <action>
3213                         <order>0</order>
3214                         <dec-nw-ttl/>
3215                     </action>
3216                 </apply-actions>
3217             </instruction>
3218         </instructions>
3219         <match>
3220             <tunnel>
3221                 <tunnel-id>2591</tunnel-id>
3222             </tunnel>
3223         </match>
3224     </flow>
3225
3226 IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, ICMPv6 Type & Code, IPv6 Label
3227 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3228
3229 -  Note that ethernet-type MUST be 34525
3230
3231 -  Note that IP Protocol MUST be 58
3232
3233 .. code:: xml
3234
3235     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3236     <flow xmlns="urn:opendaylight:flow:inventory">
3237         <strict>false</strict>
3238         <flow-name>FooXf25</flow-name>
3239         <id>148</id>
3240         <cookie_mask>255</cookie_mask>
3241         <cookie>25</cookie>
3242         <table_id>2</table_id>
3243         <priority>2</priority>
3244         <hard-timeout>1200</hard-timeout>
3245         <idle-timeout>3400</idle-timeout>
3246         <installHw>false</installHw>
3247         <instructions>
3248             <instruction>
3249                 <order>0</order>
3250                 <apply-actions>
3251                     <action>
3252                         <order>0</order>
3253                         <dec-nw-ttl/>
3254                     </action>
3255                 </apply-actions>
3256             </instruction>
3257         </instructions>
3258         <match>
3259             <ethernet-match>
3260                 <ethernet-type>
3261                     <type>34525</type>
3262                 </ethernet-type>
3263             </ethernet-match>
3264             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3265             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
3266             <metadata>
3267                 <metadata>12345</metadata>
3268             </metadata>
3269             <ipv6-label>
3270                 <ipv6-flabel>33</ipv6-flabel>
3271             </ipv6-label>
3272             <ip-match>
3273                 <ip-protocol>58</ip-protocol>
3274                 <ip-dscp>60</ip-dscp>
3275                 <ip-ecn>3</ip-ecn>
3276             </ip-match>
3277             <icmpv6-match>
3278                 <icmpv6-type>6</icmpv6-type>
3279                 <icmpv6-code>3</icmpv6-code>
3280             </icmpv6-match>
3281         </match>
3282     </flow>
3283
3284 IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, TCP Src & Dst Ports, IPv6 Label, IPv6 Ext Header
3285 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3286
3287 -  Note that ethernet-type MUST be 34525
3288
3289 -  Note that IP Protocol MUST be 58
3290
3291 .. code:: xml
3292
3293     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3294     <flow xmlns="urn:opendaylight:flow:inventory">
3295         <strict>false</strict>
3296         <flow-name>FooXf27</flow-name>
3297         <id>150</id>
3298         <cookie_mask>255</cookie_mask>
3299         <cookie>27</cookie>
3300         <table_id>2</table_id>
3301         <priority>2</priority>
3302         <hard-timeout>1200</hard-timeout>
3303         <idle-timeout>3400</idle-timeout>
3304         <installHw>false</installHw>
3305         <instructions>
3306             <instruction>
3307                 <order>0</order>
3308                 <apply-actions>
3309                     <action>
3310                         <order>0</order>
3311                         <dec-nw-ttl/>
3312                     </action>
3313                 </apply-actions>
3314             </instruction>
3315         </instructions>
3316         <match>
3317             <ethernet-match>
3318                 <ethernet-type>
3319                     <type>34525</type>
3320                 </ethernet-type>
3321             </ethernet-match>
3322             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3323             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
3324             <metadata>
3325                 <metadata>12345</metadata>
3326             </metadata>
3327             <ipv6-label>
3328                 <ipv6-flabel>33</ipv6-flabel>
3329             </ipv6-label>
3330             <ipv6-ext-header>
3331                 <ipv6-exthdr>0</ipv6-exthdr>
3332             </ipv6-ext-header>
3333             <ip-match>
3334                 <ip-protocol>6</ip-protocol>
3335                 <ip-dscp>60</ip-dscp>
3336                 <ip-ecn>3</ip-ecn>
3337             </ip-match>
3338             <tcp-source-port>183</tcp-source-port>
3339             <tcp-destination-port>8080</tcp-destination-port>
3340         </match>
3341     </flow>
3342
3343 Actions
3344 ~~~~~~~
3345
3346 The format of the XML that describes OpenFlow actions is determined by
3347 the opendaylight-action-types yang model: .
3348
3349 Apply Actions
3350 ^^^^^^^^^^^^^
3351
3352 Output to TABLE
3353 '''''''''''''''
3354
3355 .. code:: xml
3356
3357     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3358     <flow xmlns="urn:opendaylight:flow:inventory">
3359         <strict>false</strict>
3360         <flow-name>FooXf101</flow-name>
3361         <id>256</id>
3362         <cookie_mask>255</cookie_mask>
3363         <cookie>101</cookie>
3364         <table_id>2</table_id>
3365         <priority>2</priority>
3366         <hard-timeout>1200</hard-timeout>
3367         <idle-timeout>3400</idle-timeout>
3368         <installHw>false</installHw>
3369         <instructions>
3370             <instruction>
3371                 <order>0</order>
3372                 <apply-actions>
3373                     <action>
3374                         <order>0</order>
3375                         <output-action>
3376                             <output-node-connector>TABLE</output-node-connector>
3377                             <max-length>60</max-length>
3378                         </output-action>
3379                     </action>
3380                 </apply-actions>
3381             </instruction>
3382         </instructions>
3383         <match>
3384             <ethernet-match>
3385                 <ethernet-type>
3386                     <type>34525</type>
3387                 </ethernet-type>
3388             </ethernet-match>
3389             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3390             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
3391             <metadata>
3392                 <metadata>12345</metadata>
3393             </metadata>
3394             <ip-match>
3395                 <ip-protocol>6</ip-protocol>
3396                 <ip-dscp>60</ip-dscp>
3397                 <ip-ecn>3</ip-ecn>
3398             </ip-match>
3399             <tcp-source-port>183</tcp-source-port>
3400             <tcp-destination-port>8080</tcp-destination-port>
3401         </match>
3402     </flow>
3403
3404 Output to INPORT
3405 ''''''''''''''''
3406
3407 .. code:: xml
3408
3409     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3410     <flow xmlns="urn:opendaylight:flow:inventory">
3411         <strict>false</strict>
3412         <flow-name>FooXf102</flow-name>
3413         <id>257</id>
3414         <cookie_mask>255</cookie_mask>
3415         <cookie>102</cookie>
3416         <table_id>2</table_id>
3417         <priority>2</priority>
3418         <hard-timeout>1200</hard-timeout>
3419         <idle-timeout>3400</idle-timeout>
3420         <installHw>false</installHw>
3421         <instructions>
3422             <instruction>
3423                 <order>0</order>
3424                 <apply-actions>
3425                     <action>
3426                         <order>0</order>
3427                         <output-action>
3428                             <output-node-connector>INPORT</output-node-connector>
3429                             <max-length>60</max-length>
3430                         </output-action>
3431                     </action>
3432     7            </apply-actions>
3433             </instruction>
3434         </instructions>
3435         <match>
3436             <ethernet-match>
3437                 <ethernet-type>
3438                     <type>2048</type>
3439                 </ethernet-type>
3440                 <ethernet-destination>
3441                     <address>ff:ff:29:01:19:61</address>
3442                 </ethernet-destination>
3443                 <ethernet-source>
3444                     <address>00:00:00:11:23:ae</address>
3445                 </ethernet-source>
3446             </ethernet-match>
3447             <ipv4-source>17.1.2.3/8</ipv4-source>
3448             <ipv4-destination>172.168.5.6/16</ipv4-destination>
3449             <ip-match>
3450                 <ip-protocol>6</ip-protocol>
3451                 <ip-dscp>2</ip-dscp>
3452                 <ip-ecn>2</ip-ecn>
3453             </ip-match>
3454             <tcp-source-port>25364</tcp-source-port>
3455             <tcp-destination-port>8080</tcp-destination-port>
3456         </match>
3457     </flow>
3458
3459 Output to Physical Port
3460 '''''''''''''''''''''''
3461
3462 .. code:: xml
3463
3464     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3465     <flow xmlns="urn:opendaylight:flow:inventory">
3466         <strict>false</strict>
3467         <flow-name>FooXf103</flow-name>
3468         <id>258</id>
3469         <cookie_mask>255</cookie_mask>
3470         <cookie>103</cookie>
3471         <table_id>2</table_id>
3472         <priority>2</priority>
3473         <hard-timeout>1200</hard-timeout>
3474         <idle-timeout>3400</idle-timeout>
3475         <installHw>false</installHw>
3476         <instructions>
3477             <instruction>
3478                 <order>0</order>
3479                 <apply-actions>
3480                     <action>
3481                         <order>0</order>
3482                         <output-action>
3483                             <output-node-connector>1</output-node-connector>
3484                             <max-length>60</max-length>
3485                         </output-action>
3486                     </action>
3487                 </apply-actions>
3488             </instruction>
3489         </instructions>
3490         <match>
3491             <ethernet-match>
3492                 <ethernet-type>
3493                     <type>2048</type>
3494                 </ethernet-type>
3495                 <ethernet-destination>
3496                     <address>ff:ff:29:01:19:61</address>
3497                 </ethernet-destination>
3498                 <ethernet-source>
3499                     <address>00:00:00:11:23:ae</address>
3500                 </ethernet-source>
3501             </ethernet-match>
3502             <ipv4-source>17.1.2.3/8</ipv4-source>
3503             <ipv4-destination>172.168.5.6/16</ipv4-destination>
3504             <ip-match>
3505                 <ip-protocol>6</ip-protocol>
3506                 <ip-dscp>2</ip-dscp>
3507                 <ip-ecn>2</ip-ecn>
3508             </ip-match>
3509             <tcp-source-port>25364</tcp-source-port>
3510             <tcp-destination-port>8080</tcp-destination-port>
3511         </match>
3512     </flow>
3513
3514 Output to LOCAL
3515 '''''''''''''''
3516
3517 .. code:: xml
3518
3519     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3520     <flow xmlns="urn:opendaylight:flow:inventory">
3521         <strict>false</strict>
3522         <flow-name>FooXf104</flow-name>
3523         <id>259</id>
3524         <cookie_mask>255</cookie_mask>
3525         <cookie>104</cookie>
3526         <table_id>2</table_id>
3527         <priority>2</priority>
3528         <hard-timeout>1200</hard-timeout>
3529         <idle-timeout>3400</idle-timeout>
3530         <installHw>false</installHw>
3531         <instructions>
3532             <instruction>
3533                 <order>0</order>
3534                 <apply-actions>
3535                     <action>
3536                         <order>0</order>
3537                         <output-action>
3538                             <output-node-connector>LOCAL</output-node-connector>
3539                             <max-length>60</max-length>
3540                         </output-action>
3541                     </action>
3542                 </apply-actions>
3543             </instruction>
3544         </instructions>
3545         <match>
3546             <ethernet-match>
3547                 <ethernet-type>
3548                     <type>34525</type>
3549                 </ethernet-type>
3550             </ethernet-match>
3551             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
3552             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
3553             <metadata>
3554                 <metadata>12345</metadata>
3555             </metadata>
3556             <ip-match>
3557                 <ip-protocol>6</ip-protocol>
3558                 <ip-dscp>60</ip-dscp>
3559                 <ip-ecn>3</ip-ecn>
3560             </ip-match>
3561             <tcp-source-port>183</tcp-source-port>
3562             <tcp-destination-port>8080</tcp-destination-port>
3563         </match>
3564     </flow>
3565
3566 Output to NORMAL
3567 ''''''''''''''''
3568
3569 .. code:: xml
3570
3571     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3572     <flow xmlns="urn:opendaylight:flow:inventory">
3573         <strict>false</strict>
3574         <flow-name>FooXf105</flow-name>
3575         <id>260</id>
3576         <cookie_mask>255</cookie_mask>
3577         <cookie>105</cookie>
3578         <table_id>2</table_id>
3579         <priority>2</priority>
3580         <hard-timeout>1200</hard-timeout>
3581         <idle-timeout>3400</idle-timeout>
3582         <installHw>false</installHw>
3583         <instructions>
3584             <instruction>
3585                 <order>0</order>
3586                 <apply-actions>
3587                     <action>
3588                         <order>0</order>
3589                         <output-action>
3590                             <output-node-connector>NORMAL</output-node-connector>
3591                             <max-length>60</max-length>
3592                         </output-action>
3593                     </action>
3594                 </apply-actions>
3595             </instruction>
3596         </instructions>
3597         <match>
3598             <ethernet-match>
3599                 <ethernet-type>
3600                     <type>34525</type>
3601                 </ethernet-type>
3602             </ethernet-match>
3603             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/84</ipv6-source>
3604             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/90</ipv6-destination>
3605             <metadata>
3606                 <metadata>12345</metadata>
3607             </metadata>
3608             <ip-match>
3609                 <ip-protocol>6</ip-protocol>
3610                 <ip-dscp>45</ip-dscp>
3611                 <ip-ecn>2</ip-ecn>
3612             </ip-match>
3613             <tcp-source-port>20345</tcp-source-port>
3614             <tcp-destination-port>80</tcp-destination-port>
3615         </match>
3616     </flow>
3617
3618 Output to FLOOD
3619 '''''''''''''''
3620
3621 .. code:: xml
3622
3623     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3624     <flow xmlns="urn:opendaylight:flow:inventory">
3625         <strict>false</strict>
3626         <flow-name>FooXf106</flow-name>
3627         <id>261</id>
3628         <cookie_mask>255</cookie_mask>
3629         <cookie>106</cookie>
3630         <table_id>2</table_id>
3631         <priority>2</priority>
3632         <hard-timeout>1200</hard-timeout>
3633         <idle-timeout>3400</idle-timeout>
3634         <installHw>false</installHw>
3635         <instructions>
3636             <instruction>
3637                 <order>0</order>
3638                 <apply-actions>
3639                     <action>
3640                         <order>0</order>
3641                         <output-action>
3642                             <output-node-connector>FLOOD</output-node-connector>
3643                             <max-length>60</max-length>
3644                         </output-action>
3645                     </action>
3646                 </apply-actions>
3647             </instruction>
3648         </instructions>
3649         <match>
3650             <ethernet-match>
3651                 <ethernet-type>
3652                     <type>34525</type>
3653                 </ethernet-type>
3654             </ethernet-match>
3655             <ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/100</ipv6-source>
3656             <ipv6-destination>fe80:2acf:e9ff:fe21::6431/67</ipv6-destination>
3657             <metadata>
3658                 <metadata>12345</metadata>
3659             </metadata>
3660             <ip-match>
3661                 <ip-protocol>6</ip-protocol>
3662                 <ip-dscp>45</ip-dscp>
3663                 <ip-ecn>2</ip-ecn>
3664             </ip-match>
3665             <tcp-source-port>20345</tcp-source-port>
3666             <tcp-destination-port>80</tcp-destination-port>
3667         </match>
3668     </flow>
3669
3670 Output to ALL
3671 '''''''''''''
3672
3673 .. code:: xml
3674
3675     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3676     <flow xmlns="urn:opendaylight:flow:inventory">
3677         <strict>false</strict>
3678         <flow-name>FooXf107</flow-name>
3679         <id>262</id>
3680         <cookie_mask>255</cookie_mask>
3681         <cookie>107</cookie>
3682         <table_id>2</table_id>
3683         <priority>2</priority>
3684         <hard-timeout>1200</hard-timeout>
3685         <idle-timeout>3400</idle-timeout>
3686         <installHw>false</installHw>
3687         <instructions>
3688             <instruction>
3689                 <order>0</order>
3690                 <apply-actions>
3691                     <action>
3692                         <order>0</order>
3693                         <output-action>
3694                             <output-node-connector>ALL</output-node-connector>
3695                             <max-length>60</max-length>
3696                         </output-action>
3697                     </action>
3698                 </apply-actions>
3699             </instruction>
3700         </instructions>
3701         <match>
3702             <ethernet-match>
3703                 <ethernet-type>
3704                     <type>2048</type>
3705                 </ethernet-type>
3706                 <ethernet-destination>
3707                     <address>20:14:29:01:19:61</address>
3708                 </ethernet-destination>
3709                 <ethernet-source>
3710                     <address>00:00:00:11:23:ae</address>
3711                 </ethernet-source>
3712             </ethernet-match>
3713             <ipv4-source>19.1.2.3/10</ipv4-source>
3714             <ipv4-destination>172.168.5.6/18</ipv4-destination>
3715             <ip-match>
3716                 <ip-protocol>17</ip-protocol>
3717                 <ip-dscp>8</ip-dscp>
3718                 <ip-ecn>3</ip-ecn>
3719             </ip-match>
3720             <udp-source-port>25364</udp-source-port>
3721             <udp-destination-port>8080</udp-destination-port>
3722             <in-port>0</in-port>
3723         </match>
3724     </flow>
3725
3726 Output to CONTROLLER
3727 ''''''''''''''''''''
3728
3729 .. code:: xml
3730
3731     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3732     <flow xmlns="urn:opendaylight:flow:inventory">
3733         <strict>false</strict>
3734         <flow-name>FooXf108</flow-name>
3735         <id>263</id>
3736         <cookie_mask>255</cookie_mask>
3737         <cookie>108</cookie>
3738         <table_id>2</table_id>
3739         <priority>2</priority>
3740         <hard-timeout>1200</hard-timeout>
3741         <idle-timeout>3400</idle-timeout>
3742         <installHw>false</installHw>
3743         <instructions>
3744             <instruction>
3745                 <order>0</order>
3746                 <apply-actions>
3747                     <action>
3748                         <order>0</order>
3749                         <output-action>
3750                             <output-node-connector>CONTROLLER</output-node-connector>
3751                             <max-length>60</max-length>
3752                         </output-action>
3753                     </action>
3754                 </apply-actions>
3755             </instruction>
3756         </instructions>
3757         <match>
3758             <ethernet-match>
3759                 <ethernet-type>
3760                     <type>2048</type>
3761                 </ethernet-type>
3762                 <ethernet-destination>
3763                     <address>20:14:29:01:19:61</address>
3764                 </ethernet-destination>
3765                 <ethernet-source>
3766                     <address>00:00:00:11:23:ae</address>
3767                 </ethernet-source>
3768             </ethernet-match>
3769             <ipv4-source>19.1.2.3/10</ipv4-source>
3770             <ipv4-destination>172.168.5.6/18</ipv4-destination>
3771             <ip-match>
3772                 <ip-protocol>17</ip-protocol>
3773                 <ip-dscp>8</ip-dscp>
3774                 <ip-ecn>3</ip-ecn>
3775             </ip-match>
3776             <udp-source-port>25364</udp-source-port>
3777             <udp-destination-port>8080</udp-destination-port>
3778             <in-port>0</in-port>
3779         </match>
3780     </flow>
3781
3782 Output to ANY
3783 '''''''''''''
3784
3785 .. code:: xml
3786
3787     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3788     <flow xmlns="urn:opendaylight:flow:inventory">
3789         <strict>false</strict>
3790         <flow-name>FooXf109</flow-name>
3791         <id>264</id>
3792         <cookie_mask>255</cookie_mask>
3793         <cookie>109</cookie>
3794         <table_id>2</table_id>
3795         <priority>2</priority>
3796         <hard-timeout>1200</hard-timeout>
3797         <idle-timeout>3400</idle-timeout>
3798         <installHw>false</installHw>
3799         <instructions>
3800             <instruction>
3801                 <order>0</order>
3802                 <apply-actions>
3803                     <action>
3804                         <order>0</order>
3805                         <output-action>
3806                             <output-node-connector>ANY</output-node-connector>
3807                             <max-length>60</max-length>
3808                         </output-action>
3809                     </action>
3810                 </apply-actions>
3811             </instruction>
3812         </instructions>
3813         <match>
3814             <ethernet-match>
3815                 <ethernet-type>
3816                     <type>2048</type>
3817                 </ethernet-type>
3818                 <ethernet-destination>
3819                     <address>20:14:29:01:19:61</address>
3820                 </ethernet-destination>
3821                 <ethernet-source>
3822                     <address>00:00:00:11:23:ae</address>
3823                 </ethernet-source>
3824             </ethernet-match>
3825             <ipv4-source>19.1.2.3/10</ipv4-source>
3826             <ipv4-destination>172.168.5.6/18</ipv4-destination>
3827             <ip-match>
3828                 <ip-protocol>17</ip-protocol>
3829                 <ip-dscp>8</ip-dscp>
3830                 <ip-ecn>3</ip-ecn>
3831             </ip-match>
3832             <udp-source-port>25364</udp-source-port>
3833             <udp-destination-port>8080</udp-destination-port>
3834             <in-port>0</in-port>
3835         </match>
3836     </flow>
3837
3838 Push VLAN
3839 '''''''''
3840
3841 .. code:: xml
3842
3843     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3844     <flow xmlns="urn:opendaylight:flow:inventory">
3845        <strict>false</strict>
3846        <instructions>
3847            <instruction>
3848                <order>0</order>
3849                <apply-actions>
3850                   <action>
3851                      <push-vlan-action>
3852                          <ethernet-type>33024</ethernet-type>
3853                      </push-vlan-action>
3854                      <order>0</order>
3855                   </action>
3856                    <action>
3857                        <set-field>
3858                            <vlan-match>
3859                                 <vlan-id>
3860                                     <vlan-id>79</vlan-id>
3861                                     <vlan-id-present>true</vlan-id-present>
3862                                 </vlan-id>
3863                            </vlan-match>
3864                        </set-field>
3865                        <order>1</order>
3866                    </action>
3867                    <action>
3868                        <output-action>
3869                            <output-node-connector>5</output-node-connector>
3870                        </output-action>
3871                        <order>2</order>
3872                    </action>
3873                </apply-actions>
3874            </instruction>
3875        </instructions>
3876        <table_id>0</table_id>
3877        <id>31</id>
3878        <match>
3879            <ethernet-match>
3880                <ethernet-type>
3881                    <type>2048</type>
3882                </ethernet-type>
3883                <ethernet-destination>
3884                    <address>FF:FF:29:01:19:61</address>
3885                </ethernet-destination>
3886                <ethernet-source>
3887                    <address>00:00:00:11:23:AE</address>
3888                </ethernet-source>
3889            </ethernet-match>
3890          <in-port>1</in-port>
3891        </match>
3892        <flow-name>vlan_flow</flow-name>
3893        <priority>2</priority>
3894     </flow>
3895
3896 Push MPLS
3897 '''''''''
3898
3899 .. code:: xml
3900
3901     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3902     <flow
3903         xmlns="urn:opendaylight:flow:inventory">
3904         <flow-name>push-mpls-action</flow-name>
3905         <instructions>
3906             <instruction>
3907                 <order>3</order>
3908                 <apply-actions>
3909                     <action>
3910                         <push-mpls-action>
3911                             <ethernet-type>34887</ethernet-type>
3912                         </push-mpls-action>
3913                         <order>0</order>
3914                     </action>
3915                     <action>
3916                         <set-field>
3917                             <protocol-match-fields>
3918                                 <mpls-label>27</mpls-label>
3919                             </protocol-match-fields>
3920                         </set-field>
3921                         <order>1</order>
3922                     </action>
3923                     <action>
3924                         <output-action>
3925                             <output-node-connector>2</output-node-connector>
3926                         </output-action>
3927                         <order>2</order>
3928                     </action>
3929                 </apply-actions>
3930             </instruction>
3931         </instructions>
3932         <strict>false</strict>
3933         <id>100</id>
3934         <match>
3935             <ethernet-match>
3936                 <ethernet-type>
3937                     <type>2048</type>
3938                 </ethernet-type>
3939             </ethernet-match>
3940             <in-port>1</in-port>
3941             <ipv4-destination>10.0.0.4/32</ipv4-destination>
3942         </match>
3943         <idle-timeout>0</idle-timeout>
3944         <cookie_mask>255</cookie_mask>
3945         <cookie>401</cookie>
3946         <priority>8</priority>
3947         <hard-timeout>0</hard-timeout>
3948         <installHw>false</installHw>
3949         <table_id>0</table_id>
3950     </flow>
3951
3952 Swap MPLS
3953 '''''''''
3954
3955 -  Note that ethernet-type MUST be 34887
3956
3957 .. code:: xml
3958
3959     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3960     <flow
3961         xmlns="urn:opendaylight:flow:inventory">
3962         <flow-name>push-mpls-action</flow-name>
3963         <instructions>
3964             <instruction>
3965                 <order>2</order>
3966                 <apply-actions>
3967                     <action>
3968                         <set-field>
3969                             <protocol-match-fields>
3970                                 <mpls-label>37</mpls-label>
3971                             </protocol-match-fields>
3972                         </set-field>
3973                         <order>1</order>
3974                     </action>
3975                     <action>
3976                         <output-action>
3977                             <output-node-connector>2</output-node-connector>
3978                         </output-action>
3979                         <order>2</order>
3980                     </action>
3981                 </apply-actions>
3982             </instruction>
3983         </instructions>
3984         <strict>false</strict>
3985         <id>101</id>
3986         <match>
3987             <ethernet-match>
3988                 <ethernet-type>
3989                     <type>34887</type>
3990                 </ethernet-type>
3991             </ethernet-match>
3992             <in-port>1</in-port>
3993             <protocol-match-fields>
3994                 <mpls-label>27</mpls-label>
3995             </protocol-match-fields>
3996         </match>
3997         <idle-timeout>0</idle-timeout>
3998         <cookie_mask>255</cookie_mask>
3999         <cookie>401</cookie>
4000         <priority>8</priority>
4001         <hard-timeout>0</hard-timeout>
4002         <installHw>false</installHw>
4003         <table_id>0</table_id>
4004     </flow>
4005
4006 Pop MPLS
4007 ''''''''
4008
4009 -  Note that ethernet-type MUST be 34887
4010
4011 -  Issue with OVS 2.1 `OVS
4012    fix <http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b3f2fc93e3f357f8d05a92f53ec253339a40887f>`_
4013
4014 .. code:: xml
4015
4016     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
4017     <flow
4018         xmlns="urn:opendaylight:flow:inventory">
4019         <flow-name>FooXf10</flow-name>
4020         <instructions>
4021             <instruction>
4022                 <order>0</order>
4023                 <apply-actions>
4024                     <action>
4025                         <pop-mpls-action>
4026                             <ethernet-type>2048</ethernet-type>
4027                         </pop-mpls-action>
4028                         <order>1</order>
4029                     </action>
4030                     <action>
4031                         <output-action>
4032                             <output-node-connector>2</output-node-connector>
4033                             <max-length>60</max-length>
4034                         </output-action>
4035                         <order>2</order>
4036                     </action>
4037                 </apply-actions>
4038             </instruction>
4039         </instructions>
4040         <id>11</id>
4041         <strict>false</strict>
4042         <match>
4043             <ethernet-match>
4044                 <ethernet-type>
4045                     <type>34887</type>
4046                 </ethernet-type>
4047             </ethernet-match>
4048             <in-port>1</in-port>
4049             <protocol-match-fields>
4050                 <mpls-label>37</mpls-label>
4051             </protocol-match-fields>
4052         </match>
4053         <idle-timeout>0</idle-timeout>
4054         <cookie>889</cookie>
4055         <cookie_mask>255</cookie_mask>
4056         <installHw>false</installHw>
4057         <hard-timeout>0</hard-timeout>
4058         <priority>10</priority>
4059         <table_id>0</table_id>
4060     </flow>
4061
4062 Learn
4063 '''''
4064
4065 -  Nicira extension defined in
4066    https://github.com/osrg/openvswitch/blob/master/include/openflow/nicira-ext.h
4067
4068 -  Example section is -
4069    https://github.com/osrg/openvswitch/blob/master/include/openflow/nicira-ext.h#L788
4070
4071 .. code:: xml
4072
4073     <flow>
4074       <id>ICMP_Ingress258a5a5ad-08a8-4ff7-98f5-ef0b96ca3bb8</id>
4075       <hard-timeout>0</hard-timeout>
4076       <idle-timeout>0</idle-timeout>
4077       <match>
4078         <ethernet-match>
4079           <ethernet-type>
4080             <type>2048</type>
4081           </ethernet-type>
4082         </ethernet-match>
4083         <metadata>
4084           <metadata>2199023255552</metadata>
4085           <metadata-mask>2305841909702066176</metadata-mask>
4086         </metadata>
4087         <ip-match>
4088           <ip-protocol>1</ip-protocol>
4089         </ip-match>
4090       </match>
4091       <cookie>110100480</cookie>
4092       <instructions>
4093         <instruction>
4094           <order>0</order>
4095           <apply-actions>
4096             <action>
4097               <order>1</order>
4098               <nx-resubmit
4099                 xmlns="urn:opendaylight:openflowplugin:extension:nicira:action">
4100                 <table>220</table>
4101               </nx-resubmit>
4102             </action>
4103             <action>
4104               <order>0</order>
4105               <nx-learn
4106                 xmlns="urn:opendaylight:openflowplugin:extension:nicira:action">
4107                 <idle-timeout>60</idle-timeout>
4108                 <fin-idle-timeout>0</fin-idle-timeout>
4109                 <hard-timeout>60</hard-timeout>
4110                 <flags>0</flags>
4111                 <table-id>41</table-id>
4112                 <priority>61010</priority>
4113                 <fin-hard-timeout>0</fin-hard-timeout>
4114                 <flow-mods>
4115                   <flow-mod-add-match-from-value>
4116                     <src-ofs>0</src-ofs>
4117                     <value>2048</value>
4118                     <src-field>1538</src-field>
4119                     <flow-mod-num-bits>16</flow-mod-num-bits>
4120                   </flow-mod-add-match-from-value>
4121                 </flow-mods>
4122                 <flow-mods>
4123                   <flow-mod-add-match-from-field>
4124                     <src-ofs>0</src-ofs>
4125                     <dst-ofs>0</dst-ofs>
4126                     <dst-field>4100</dst-field>
4127                     <src-field>3588</src-field>
4128                     <flow-mod-num-bits>32</flow-mod-num-bits>
4129                   </flow-mod-add-match-from-field>
4130                 </flow-mods>
4131                 <flow-mods>
4132                   <flow-mod-add-match-from-field>
4133                     <src-ofs>0</src-ofs>
4134                     <dst-ofs>0</dst-ofs>
4135                     <dst-field>518</dst-field>
4136                     <src-field>1030</src-field>
4137                     <flow-mod-num-bits>48</flow-mod-num-bits>
4138                   </flow-mod-add-match-from-field>
4139                 </flow-mods>
4140                 <flow-mods>
4141                   <flow-mod-add-match-from-field>
4142                     <src-ofs>0</src-ofs>
4143                     <dst-ofs>0</dst-ofs>
4144                     <dst-field>3073</dst-field>
4145                     <src-field>3073</src-field>
4146                     <flow-mod-num-bits>8</flow-mod-num-bits>
4147                   </flow-mod-add-match-from-field>
4148                 </flow-mods>
4149                 <flow-mods>
4150                   <flow-mod-copy-value-into-field>
4151                     <dst-ofs>0</dst-ofs>
4152                     <value>1</value>
4153                     <dst-field>65540</dst-field>
4154                     <flow-mod-num-bits>8</flow-mod-num-bits>
4155                   </flow-mod-copy-value-into-field>
4156                 </flow-mods>
4157                 <cookie>110100480</cookie>
4158               </nx-learn>
4159             </action>
4160           </apply-actions>
4161         </instruction>
4162       </instructions>
4163       <installHw>true</installHw>
4164       <barrier>false</barrier>
4165       <strict>false</strict>
4166       <priority>61010</priority>
4167       <table_id>253</table_id>
4168       <flow-name>ACL</flow-name>
4169     </flow>
4170
4171 Opendaylight OpenFlow Plugin: Troubleshooting
4172 ---------------------------------------------
4173
4174 empty section