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