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