bridge: Store datapath version into ovsdb
[cascardo/ovs.git] / vswitchd / vswitch.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <database title="Open vSwitch Configuration Database">
3   <p>
4     A database with this schema holds the configuration for one Open
5     vSwitch daemon.  The top-level configuration for the daemon is the
6     <ref table="Open_vSwitch"/> table, which must have exactly one
7     record.  Records in other tables are significant only when they
8     can be reached directly or indirectly from the <ref
9     table="Open_vSwitch"/> table.  Records that are not reachable from
10     the <ref table="Open_vSwitch"/> table are automatically deleted
11     from the database, except for records in a few distinguished
12     ``root set'' tables.
13   </p>
14
15   <h2>Common Columns</h2>
16
17   <p>
18     Most tables contain two special columns, named <code>other_config</code>
19     and <code>external_ids</code>.  These columns have the same form and
20     purpose each place that they appear, so we describe them here to save space
21     later.
22   </p>
23
24   <dl>
25     <dt><code>other_config</code>: map of string-string pairs</dt>
26     <dd>
27       <p>
28         Key-value pairs for configuring rarely used features.  Supported keys,
29         along with the forms taken by their values, are documented individually
30         for each table.
31       </p>
32       <p>
33         A few tables do not have <code>other_config</code> columns because no
34         key-value pairs have yet been defined for them.
35       </p>
36     </dd>
37
38     <dt><code>external_ids</code>: map of string-string pairs</dt>
39     <dd>
40       Key-value pairs for use by external frameworks that integrate with Open
41       vSwitch, rather than by Open vSwitch itself.  System integrators should
42       either use the Open vSwitch development mailing list to coordinate on
43       common key-value definitions, or choose key names that are likely to be
44       unique.  In some cases, where key-value pairs have been defined that are
45       likely to be widely useful, they are documented individually for each
46       table.
47     </dd>
48   </dl>
49
50   <table name="Open_vSwitch" title="Open vSwitch configuration.">
51     Configuration for an Open vSwitch daemon.  There must be exactly
52     one record in the <ref table="Open_vSwitch"/> table.
53
54     <group title="Configuration">
55       <column name="bridges">
56         Set of bridges managed by the daemon.
57       </column>
58
59       <column name="ssl">
60         SSL used globally by the daemon.
61       </column>
62
63       <column name="external_ids" key="system-id">
64         A unique identifier for the Open vSwitch's physical host.
65         The form of the identifier depends on the type of the host.
66         On a Citrix XenServer, this will likely be the same as
67         <ref column="external_ids" key="xs-system-uuid"/>.
68       </column>
69
70       <column name="external_ids" key="xs-system-uuid">
71         The Citrix XenServer universally unique identifier for the physical
72         host as displayed by <code>xe host-list</code>.
73       </column>
74
75       <column name="other_config" key="stats-update-interval"
76               type='{"type": "integer", "minInteger": 5000}'>
77         <p>
78           Interval for updating statistics to the database, in milliseconds.
79           This option will affect the update of the <code>statistics</code>
80           column in the following tables: <code>Port</code>, <code>Interface
81           </code>, <code>Mirror</code>.
82         </p>
83         <p>
84           Default value is 5000 ms.
85         </p>
86         <p>
87           Getting statistics more frequently can be achieved via OpenFlow.
88         </p>
89       </column>
90
91       <column name="other_config" key="flow-restore-wait"
92               type='{"type": "boolean"}'>
93         <p>
94           When <code>ovs-vswitchd</code> starts up, it has an empty flow table
95           and therefore it handles all arriving packets in its default fashion
96           according to its configuration, by dropping them or sending them to
97           an OpenFlow controller or switching them as a standalone switch.
98           This behavior is ordinarily desirable.  However, if
99           <code>ovs-vswitchd</code> is restarting as part of a ``hot-upgrade,''
100           then this leads to a relatively long period during which packets are
101           mishandled.
102         </p>
103         <p>
104           This option allows for improvement.  When <code>ovs-vswitchd</code>
105           starts with this value set as <code>true</code>, it will neither
106           flush or expire previously set datapath flows nor will it send and
107           receive any packets to or from the datapath.  When this value is
108           later set to <code>false</code>, <code>ovs-vswitchd</code> will
109           start receiving packets from the datapath and re-setup the flows.
110         </p>
111         <p>
112           Thus, with this option, the procedure for a hot-upgrade of
113           <code>ovs-vswitchd</code> becomes roughly the following:
114         </p>
115         <ol>
116           <li>
117             Stop <code>ovs-vswitchd</code>.
118           </li>
119           <li>
120             Set <ref column="other_config" key="flow-restore-wait"/>
121             to <code>true</code>.
122           </li>
123           <li>
124             Start <code>ovs-vswitchd</code>.
125           </li>
126           <li>
127             Use <code>ovs-ofctl</code> (or some other program, such as an
128             OpenFlow controller) to restore the OpenFlow flow table
129             to the desired state.
130           </li>
131           <li>
132             Set <ref column="other_config" key="flow-restore-wait"/>
133             to <code>false</code> (or remove it entirely from the database).
134           </li>
135         </ol>
136         <p>
137           The <code>ovs-ctl</code>'s ``restart'' and ``force-reload-kmod''
138           functions use the above config option during hot upgrades.
139         </p>
140       </column>
141
142       <column name="other_config" key="flow-limit"
143               type='{"type": "integer", "minInteger": 0}'>
144         <p>
145           The maximum
146           number of flows allowed in the datapath flow table.  Internally OVS
147           will choose a flow limit which will likely be lower than this number,
148           based on real time network conditions.
149         </p>
150         <p>
151           The default is 200000.
152         </p>
153       </column>
154
155       <column name="other_config" key="n-dpdk-rxqs"
156               type='{"type": "integer", "minInteger": 1}'>
157         <p>
158           Specifies the number of rx queues to be created for each dpdk
159           interface.  If not specified or specified to 0, one rx queue will
160           be created for each dpdk interface by default.
161         </p>
162       </column>
163
164       <column name="other_config" key="pmd-cpu-mask">
165         <p>
166           Specifies CPU mask for setting the cpu affinity of PMD (Poll
167           Mode Driver) threads.  Value should be in the form of hex string,
168           similar to the dpdk EAL '-c COREMASK' option input or the 'taskset'
169           mask input.
170         </p>
171         <p>
172           The lowest order bit corresponds to the first CPU core.  A set bit
173           means the corresponding core is available and a pmd thread will be
174           created and pinned to it.  If the input does not cover all cores,
175           those uncovered cores are considered not set.
176         </p>
177         <p>
178           If not specified, one pmd thread will be created for each numa node
179           and pinned to any available core on the numa node by default.
180         </p>
181       </column>
182
183       <column name="other_config" key="n-handler-threads"
184               type='{"type": "integer", "minInteger": 1}'>
185         <p>
186           Specifies the number of threads for software datapaths to use for
187           handling new flows.  The default the number of online CPU cores minus
188           the number of revalidators.
189         </p>
190         <p>
191           This configuration is per datapath.  If you have more than one
192           software datapath (e.g. some <code>system</code> bridges and some
193           <code>netdev</code> bridges), then the total number of threads is
194           <code>n-handler-threads</code> times the number of software
195           datapaths.
196         </p>
197       </column>
198
199       <column name="other_config" key="n-revalidator-threads"
200               type='{"type": "integer", "minInteger": 1}'>
201         <p>
202           Specifies the number of threads for software datapaths to use for
203           revalidating flows in the datapath.  Typically, there is a direct
204           correlation between the number of revalidator threads, and the number
205           of flows allowed in the datapath.  The default is the number of cpu
206           cores divided by four plus one.  If <code>n-handler-threads</code> is
207           set, the default changes to the number of cpu cores minus the number
208           of handler threads.
209         </p>
210         <p>
211           This configuration is per datapath.  If you have more than one
212           software datapath (e.g. some <code>system</code> bridges and some
213           <code>netdev</code> bridges), then the total number of threads is
214           <code>n-handler-threads</code> times the number of software
215           datapaths.
216         </p>
217       </column>
218     </group>
219
220     <group title="Status">
221       <column name="next_cfg">
222         Sequence number for client to increment.  When a client modifies
223         any part of the database configuration and wishes to wait for
224         Open vSwitch to finish applying the changes, it may increment
225         this sequence number.
226       </column>
227
228       <column name="cur_cfg">
229         Sequence number that Open vSwitch sets to the current value of
230         <ref column="next_cfg"/> after it finishes applying a set of
231         configuration changes.
232       </column>
233
234       <group title="Statistics">
235         <p>
236           The <code>statistics</code> column contains key-value pairs that
237           report statistics about a system running an Open vSwitch.  These are
238           updated periodically (currently, every 5 seconds).  Key-value pairs
239           that cannot be determined or that do not apply to a platform are
240           omitted.
241         </p>
242
243         <column name="other_config" key="enable-statistics"
244                 type='{"type": "boolean"}'>
245           Statistics are disabled by default to avoid overhead in the common
246           case when statistics gathering is not useful.  Set this value to
247           <code>true</code> to enable populating the <ref column="statistics"/>
248           column or to <code>false</code> to explicitly disable it.
249         </column>
250
251         <column name="statistics" key="cpu"
252                 type='{"type": "integer", "minInteger": 1}'>
253           <p>
254             Number of CPU processors, threads, or cores currently online and
255             available to the operating system on which Open vSwitch is running,
256             as an integer.  This may be less than the number installed, if some
257             are not online or if they are not available to the operating
258             system.
259           </p>
260           <p>
261             Open vSwitch userspace processes are not multithreaded, but the
262             Linux kernel-based datapath is.
263           </p>
264         </column>
265
266         <column name="statistics" key="load_average">
267           A comma-separated list of three floating-point numbers,
268           representing the system load average over the last 1, 5, and 15
269           minutes, respectively.
270         </column>
271
272         <column name="statistics" key="memory">
273           <p>
274             A comma-separated list of integers, each of which represents a
275             quantity of memory in kilobytes that describes the operating
276             system on which Open vSwitch is running.  In respective order,
277             these values are:
278           </p>
279
280           <ol>
281             <li>Total amount of RAM allocated to the OS.</li>
282             <li>RAM allocated to the OS that is in use.</li>
283             <li>RAM that can be flushed out to disk or otherwise discarded
284             if that space is needed for another purpose.  This number is
285             necessarily less than or equal to the previous value.</li>
286             <li>Total disk space allocated for swap.</li>
287             <li>Swap space currently in use.</li>
288           </ol>
289
290           <p>
291             On Linux, all five values can be determined and are included.  On
292             other operating systems, only the first two values can be
293             determined, so the list will only have two values.
294           </p>
295         </column>
296
297         <column name="statistics" key="process_NAME">
298           <p>
299             One such key-value pair, with <code>NAME</code> replaced by
300             a process name, will exist for each running Open vSwitch
301             daemon process, with <var>name</var> replaced by the
302             daemon's name (e.g. <code>process_ovs-vswitchd</code>).  The
303             value is a comma-separated list of integers.  The integers
304             represent the following, with memory measured in kilobytes
305             and durations in milliseconds:
306           </p>
307
308           <ol>
309             <li>The process's virtual memory size.</li>
310             <li>The process's resident set size.</li>
311             <li>The amount of user and system CPU time consumed by the
312             process.</li>
313             <li>The number of times that the process has crashed and been
314             automatically restarted by the monitor.</li>
315             <li>The duration since the process was started.</li>
316             <li>The duration for which the process has been running.</li>
317           </ol>
318
319           <p>
320             The interpretation of some of these values depends on whether the
321             process was started with the <option>--monitor</option>.  If it
322             was not, then the crash count will always be 0 and the two
323             durations will always be the same.  If <option>--monitor</option>
324             was given, then the crash count may be positive; if it is, the
325             latter duration is the amount of time since the most recent crash
326             and restart.
327           </p>
328
329           <p>
330             There will be one key-value pair for each file in Open vSwitch's
331             ``run directory'' (usually <code>/var/run/openvswitch</code>)
332             whose name ends in <code>.pid</code>, whose contents are a
333             process ID, and which is locked by a running process.  The
334             <var>name</var> is taken from the pidfile's name.
335           </p>
336
337           <p>
338             Currently Open vSwitch is only able to obtain all of the above
339             detail on Linux systems.  On other systems, the same key-value
340             pairs will be present but the values will always be the empty
341             string.
342           </p>
343         </column>
344
345         <column name="statistics" key="file_systems">
346           <p>
347             A space-separated list of information on local, writable file
348             systems.  Each item in the list describes one file system and
349             consists in turn of a comma-separated list of the following:
350           </p>
351
352           <ol>
353             <li>Mount point, e.g. <code>/</code> or <code>/var/log</code>.
354             Any spaces or commas in the mount point are replaced by
355             underscores.</li>
356             <li>Total size, in kilobytes, as an integer.</li>
357             <li>Amount of storage in use, in kilobytes, as an integer.</li>
358           </ol>
359
360           <p>
361             This key-value pair is omitted if there are no local, writable
362             file systems or if Open vSwitch cannot obtain the needed
363             information.
364           </p>
365         </column>
366       </group>
367     </group>
368
369     <group title="Version Reporting">
370       <p>
371         These columns report the types and versions of the hardware and
372         software running Open vSwitch.  We recommend in general that software
373         should test whether specific features are supported instead of relying
374         on version number checks.  These values are primarily intended for
375         reporting to human administrators.
376       </p>
377
378       <column name="ovs_version">
379         The Open vSwitch version number, e.g. <code>1.1.0</code>.
380       </column>
381
382       <column name="db_version">
383         <p>
384           The database schema version number in the form
385           <code><var>major</var>.<var>minor</var>.<var>tweak</var></code>,
386           e.g. <code>1.2.3</code>.  Whenever the database schema is changed in
387           a non-backward compatible way (e.g. deleting a column or a table),
388           <var>major</var> is incremented.  When the database schema is changed
389           in a backward compatible way (e.g. adding a new column),
390           <var>minor</var> is incremented.  When the database schema is changed
391           cosmetically (e.g. reindenting its syntax), <var>tweak</var> is
392           incremented.
393         </p>
394
395         <p>
396           The schema version is part of the database schema, so it can also be
397           retrieved by fetching the schema using the Open vSwitch database
398           protocol.
399         </p>
400       </column>
401
402       <column name="system_type">
403         <p>
404           An identifier for the type of system on top of which Open vSwitch
405           runs, e.g. <code>XenServer</code> or <code>KVM</code>.
406         </p>
407         <p>
408           System integrators are responsible for choosing and setting an
409           appropriate value for this column.
410         </p>
411       </column>
412
413       <column name="system_version">
414         <p>
415           The version of the system identified by <ref column="system_type"/>,
416           e.g. <code>5.6.100-39265p</code> on XenServer 5.6.100 build 39265.
417         </p>
418         <p>
419           System integrators are responsible for choosing and setting an
420           appropriate value for this column.
421         </p>
422       </column>
423
424     </group>
425
426     <group title="Database Configuration">
427       <p>
428         These columns primarily configure the Open vSwitch database
429         (<code>ovsdb-server</code>), not the Open vSwitch switch
430         (<code>ovs-vswitchd</code>).  The OVSDB database also uses the <ref
431         column="ssl"/> settings.
432       </p>
433
434       <p>
435         The Open vSwitch switch does read the database configuration to
436         determine remote IP addresses to which in-band control should apply.
437       </p>
438
439       <column name="manager_options">
440         Database clients to which the Open vSwitch database server should
441         connect or to which it should listen, along with options for how these
442         connection should be configured.  See the <ref table="Manager"/> table
443         for more information.
444       </column>
445     </group>
446
447     <group title="Common Columns">
448       The overall purpose of these columns is described under <code>Common
449       Columns</code> at the beginning of this document.
450
451       <column name="other_config"/>
452       <column name="external_ids"/>
453     </group>
454   </table>
455
456   <table name="Bridge">
457     <p>
458       Configuration for a bridge within an
459       <ref table="Open_vSwitch"/>.
460     </p>
461     <p>
462       A <ref table="Bridge"/> record represents an Ethernet switch with one or
463       more ``ports,'' which are the <ref table="Port"/> records pointed to by
464       the <ref table="Bridge"/>'s <ref column="ports"/> column.
465     </p>
466
467     <group title="Core Features">
468       <column name="name">
469         Bridge identifier.  Should be alphanumeric and no more than about 8
470         bytes long.  Must be unique among the names of ports, interfaces, and
471         bridges on a host.
472       </column>
473
474       <column name="ports">
475         Ports included in the bridge.
476       </column>
477
478       <column name="mirrors">
479         Port mirroring configuration.
480       </column>
481
482       <column name="netflow">
483         NetFlow configuration.
484       </column>
485
486       <column name="sflow">
487         sFlow(R) configuration.
488       </column>
489
490       <column name="ipfix">
491         IPFIX configuration.
492       </column>
493
494       <column name="flood_vlans">
495         <p>
496           VLAN IDs of VLANs on which MAC address learning should be disabled,
497           so that packets are flooded instead of being sent to specific ports
498           that are believed to contain packets' destination MACs.  This should
499           ordinarily be used to disable MAC learning on VLANs used for
500           mirroring (RSPAN VLANs).  It may also be useful for debugging.
501         </p>
502         <p>
503           SLB bonding (see the <ref table="Port" column="bond_mode"/> column in
504           the <ref table="Port"/> table) is incompatible with
505           <code>flood_vlans</code>.  Consider using another bonding mode or
506           a different type of mirror instead.
507         </p>
508       </column>
509     </group>
510
511     <group title="OpenFlow Configuration">
512       <column name="controller">
513         <p>
514           OpenFlow controller set.  If unset, then no OpenFlow controllers
515           will be used.
516         </p>
517
518         <p>
519           If there are primary controllers, removing all of them clears the
520           flow table.  If there are no primary controllers, adding one also
521           clears the flow table.  Other changes to the set of controllers, such
522           as adding or removing a service controller, adding another primary
523           controller to supplement an existing primary controller, or removing
524           only one of two primary controllers, have no effect on the flow
525           table.
526         </p>
527       </column>
528
529       <column name="flow_tables">
530         Configuration for OpenFlow tables.  Each pair maps from an OpenFlow
531         table ID to configuration for that table.
532       </column>
533
534       <column name="fail_mode">
535         <p>When a controller is configured, it is, ordinarily, responsible
536         for setting up all flows on the switch.  Thus, if the connection to
537         the controller fails, no new network connections can be set up.
538         If the connection to the controller stays down long enough,
539         no packets can pass through the switch at all.  This setting
540         determines the switch's response to such a situation.  It may be set
541         to one of the following:
542         <dl>
543           <dt><code>standalone</code></dt>
544           <dd>If no message is received from the controller for three
545           times the inactivity probe interval
546           (see <ref column="inactivity_probe"/>), then Open vSwitch
547           will take over responsibility for setting up flows.  In
548           this mode, Open vSwitch causes the bridge to act like an
549           ordinary MAC-learning switch.  Open vSwitch will continue
550           to retry connecting to the controller in the background
551           and, when the connection succeeds, it will discontinue its
552           standalone behavior.</dd>
553           <dt><code>secure</code></dt>
554           <dd>Open vSwitch will not set up flows on its own when the
555           controller connection fails or when no controllers are
556           defined.  The bridge will continue to retry connecting to
557           any defined controllers forever.</dd>
558         </dl>
559         </p>
560         <p>
561           The default is <code>standalone</code> if the value is unset, but
562           future versions of Open vSwitch may change the default.
563         </p>
564         <p>
565           The <code>standalone</code> mode can create forwarding loops on a
566           bridge that has more than one uplink port unless STP is enabled.  To
567           avoid loops on such a bridge, configure <code>secure</code> mode or
568           enable STP (see <ref column="stp_enable"/>).
569         </p>
570         <p>When more than one controller is configured,
571         <ref column="fail_mode"/> is considered only when none of the
572         configured controllers can be contacted.</p>
573         <p>
574           Changing <ref column="fail_mode"/> when no primary controllers are
575           configured clears the flow table.
576         </p>
577       </column>
578
579       <column name="datapath_id">
580         Reports the OpenFlow datapath ID in use.  Exactly 16 hex digits.
581         (Setting this column has no useful effect.  Set <ref
582         column="other-config" key="datapath-id"/> instead.)
583       </column>
584
585       <column name="datapath_version">
586         <p>
587           Reports the version number of the Open vSwitch datapath in use.
588           This allows management software to detect and report discrepancies
589           between Open vSwitch userspace and datapath versions.  (The <ref
590           column="ovs_version" table="Open_vSwitch"/> column in the <ref
591           table="Open_vSwitch"/> reports the Open vSwitch userspace version.)
592           The version reported depends on the datapath in use:
593         </p>
594
595         <ul>
596           <li>
597             When the kernel module included in the Open vSwitch source tree is
598             used, this column reports the Open vSwitch version from which the
599             module was taken.
600           </li>
601
602           <li>
603             When the kernel module that is part of the upstream Linux kernel is
604             used, this column reports <code>&lt;unknown&gt;</code>.
605           </li>
606
607           <li>
608             When the datapath is built into the <code>ovs-vswitchd</code>
609             binary, this column reports <code>&lt;built-in&gt;</code>.  A
610             built-in datapath is by definition the same version as the rest of
611             the Open VSwitch userspace.
612           </li>
613
614           <li>
615             Other datapaths (such as the Hyper-V kernel datapath) currently
616             report <code>&lt;unknown&gt;</code>.
617           </li>
618         </ul>
619
620         <p>
621           A version discrepancy between <code>ovs-vswitchd</code> and the
622           datapath in use is not normally cause for alarm.  The Open vSwitch
623           kernel datapaths for Linux and Hyper-V, in particular, are designed
624           for maximum inter-version compatibility: any userspace version works
625           with with any kernel version.  Some reasons do exist to insist on
626           particular user/kernel pairings.  First, newer kernel versions add
627           new features, that can only be used by new-enough userspace, e.g.
628           VXLAN tunneling requires certain minimal userspace and kernel
629           versions.  Second, as an extension to the first reason, some newer
630           kernel versions add new features for enhancing performance that only
631           new-enough userspace versions can take advantage of.
632         </p>
633       </column>
634
635       <column name="other_config" key="datapath-id">
636         Exactly 16 hex digits to set the OpenFlow datapath ID to a specific
637         value.  May not be all-zero.
638       </column>
639
640       <column name="other_config" key="dp-desc">
641         Human readable description of datapath.  It it a maximum 256
642         byte-long free-form string to describe the datapath for
643         debugging purposes, e.g. <code>switch3 in room 3120</code>.
644       </column>
645
646       <column name="other_config" key="disable-in-band"
647               type='{"type": "boolean"}'>
648         If set to <code>true</code>, disable in-band control on the bridge
649         regardless of controller and manager settings.
650       </column>
651
652       <column name="other_config" key="in-band-queue"
653               type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
654         A queue ID as a nonnegative integer.  This sets the OpenFlow queue ID
655         that will be used by flows set up by in-band control on this bridge.
656         If unset, or if the port used by an in-band control flow does not have
657         QoS configured, or if the port does not have a queue with the specified
658         ID, the default queue is used instead.
659       </column>
660
661       <column name="protocols">
662         <p>
663           List of OpenFlow protocols that may be used when negotiating
664           a connection with a controller.  OpenFlow 1.0, 1.1, 1.2, and
665           1.3 are enabled by default if this column is empty.
666         </p>
667
668         <p>
669           OpenFlow 1.4 is not enabled by default because its implementation is
670           missing features.
671         </p>
672
673         <p>
674           OpenFlow 1.5 has the same risks as OpenFlow 1.4, but it is even more
675           experimental because the OpenFlow 1.5 specification is still under
676           development and thus subject to change.  Pass
677           <code>--enable-of15</code> to <code>ovs-vswitchd</code> to allow
678           OpenFlow 1.5 to be enabled.
679         </p>
680       </column>
681     </group>
682
683     <group title="Spanning Tree Configuration">
684       The IEEE 802.1D Spanning Tree Protocol (STP) is a network protocol
685       that ensures loop-free topologies.  It allows redundant links to
686       be included in the network to provide automatic backup paths if
687       the active links fails.
688
689       <column name="stp_enable" type='{"type": "boolean"}'>
690         Enable spanning tree on the bridge.  By default, STP is disabled
691         on bridges.  Bond, internal, and mirror ports are not supported
692         and will not participate in the spanning tree.
693       </column>
694
695       <column name="other_config" key="stp-system-id">
696         The bridge's STP identifier (the lower 48 bits of the bridge-id)
697         in the form
698         <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
699         By default, the identifier is the MAC address of the bridge.
700       </column>
701
702       <column name="other_config" key="stp-priority"
703               type='{"type": "integer", "minInteger": 0, "maxInteger": 65535}'>
704         The bridge's relative priority value for determining the root
705         bridge (the upper 16 bits of the bridge-id).  A bridge with the
706         lowest bridge-id is elected the root.  By default, the priority
707         is 0x8000.
708       </column>
709
710       <column name="other_config" key="stp-hello-time"
711               type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
712         The interval between transmissions of hello messages by
713         designated ports, in seconds.  By default the hello interval is
714         2 seconds.
715       </column>
716
717       <column name="other_config" key="stp-max-age"
718               type='{"type": "integer", "minInteger": 6, "maxInteger": 40}'>
719         The maximum age of the information transmitted by the bridge
720         when it is the root bridge, in seconds.  By default, the maximum
721         age is 20 seconds.
722       </column>
723
724       <column name="other_config" key="stp-forward-delay"
725               type='{"type": "integer", "minInteger": 4, "maxInteger": 30}'>
726         The delay to wait between transitioning root and designated
727         ports to <code>forwarding</code>, in seconds.  By default, the
728         forwarding delay is 15 seconds.
729       </column>
730
731       <column name="other_config" key="mcast-snooping-aging-time"
732               type='{"type": "integer", "minInteger": 1}'>
733         <p>
734           The maximum number of seconds to retain a multicast snooping entry for
735           which no packets have been seen.  The default is currently 300
736           seconds (5 minutes).  The value, if specified, is forced into a
737           reasonable range, currently 15 to 3600 seconds.
738         </p>
739       </column>
740
741       <column name="other_config" key="mcast-snooping-table-size"
742               type='{"type": "integer", "minInteger": 1}'>
743         <p>
744           The maximum number of multicast snooping addresses to learn.  The
745           default is currently 2048.  The value, if specified, is forced into
746           a reasonable range, currently 10 to 1,000,000.
747         </p>
748       </column>
749       <column name="other_config" key="mcast-snooping-disable-flood-unregistered"
750               type='{"type": "boolean"}'>
751         <p>
752           If set to <code>false</code>, unregistered multicast packets are forwarded
753           to all ports.
754           If set to <code>true</code>, unregistered multicast packets are forwarded
755           to ports connected to multicast routers.
756         </p>
757       </column>
758     </group>
759
760     <group title="Multicast Snooping Configuration">
761       Multicast snooping (RFC 4541) monitors the Internet Group Management
762       Protocol (IGMP) traffic between hosts and multicast routers.  The
763       switch uses what IGMP snooping learns to forward multicast traffic
764       only to interfaces that are connected to interested receivers.
765       Currently it supports IGMPv1 and IGMPv2 protocols.
766
767       <column name="mcast_snooping_enable">
768         Enable multicast snooping on the bridge. For now, the default
769         is disabled.
770       </column>
771     </group>
772
773     <group title="Rapid Spanning Tree Configuration">
774       In IEEE Std 802.1D, 1998 Edition, and prior editions of this standard,
775       Clause 8 specified the spanning tree algorithm and protocol (STP).  STP
776       has now been superseded by the Rapid Spanning Tree Protocol (RSTP)
777       specified in Clause 17 of the IEEE Std 802.1D, 2004 Edition.
778       The IEEE 802.1D-2004 Rapid Spanning Tree Algorithm Protocol configures
779       full, simple, and symmetric connectivity throughout a Bridged Local Area
780       Network that comprises individual LANs interconnected by Bridges.
781       Like STP, RSTP is a network protocol that ensures loop-free topologies.
782       It allows redundant links to be included in the network to provide
783       automatic backup paths if the active links fails.
784
785       <column name="rstp_enable" type='{"type": "boolean"}'>
786         Enable Rapid Spanning Tree on the bridge.  By default, RSTP is disabled
787         on bridges.  Bond, internal, and mirror ports are not supported
788         and will not participate in the spanning tree.
789       </column>
790
791       <column name="other_config" key="rstp-address">
792         The bridge's RSTP address (the lower 48 bits of the bridge-id)
793         in the form
794         <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
795         By default, the address is the MAC address of the bridge.
796       </column>
797
798       <column name="other_config" key="rstp-priority"
799               type='{"type": "integer", "minInteger": 0, "maxInteger": 61440}'>
800         The bridge's relative priority value for determining the root
801         bridge (the upper 16 bits of the bridge-id).  A bridge with the
802         lowest bridge-id is elected the root.  By default, the priority
803         is 0x8000 (32768).  This value needs to be a multiple of 4096,
804         otherwise it's rounded to the nearest inferior one.
805       </column>
806
807       <column name="other_config" key="rstp-ageing-time"
808               type='{"type": "integer", "minInteger": 10, "maxInteger": 1000000}'>
809         The Ageing Time parameter for the Bridge.  The default value
810         is 300 seconds.
811       </column>
812
813       <column name="other_config" key="rstp-force-protocol-version"
814               type='{"type": "integer"}'>
815         The Force Protocol Version parameter for the Bridge.  This
816         can take the value 0 (STP Compatibility mode) or 2
817         (the default, normal operation).
818       </column>
819
820       <column name="other_config" key="rstp-max-age"
821               type='{"type": "integer", "minInteger": 6, "maxInteger": 40}'>
822         The maximum age of the information transmitted by the Bridge
823         when it is the Root Bridge.  The default value is 20.
824       </column>
825
826       <column name="other_config" key="rstp-forward-delay"
827               type='{"type": "integer", "minInteger": 4, "maxInteger": 30}'>
828         The delay used by STP Bridges to transition Root and Designated
829         Ports to Forwarding.  The default value is 15.
830       </column>
831
832       <column name="other_config" key="rstp-transmit-hold-count"
833               type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
834         The Transmit Hold Count used by the Port Transmit state machine
835         to limit transmission rate.  The default value is 6.
836       </column>
837
838     </group>
839
840     <group title="Other Features">
841       <column name="datapath_type">
842         Name of datapath provider.  The kernel datapath has
843         type <code>system</code>.  The userspace datapath has
844         type <code>netdev</code>.
845       </column>
846
847       <column name="external_ids" key="bridge-id">
848         A unique identifier of the bridge.  On Citrix XenServer this will
849         commonly be the same as
850         <ref column="external_ids" key="xs-network-uuids"/>.
851       </column>
852
853       <column name="external_ids" key="xs-network-uuids">
854         Semicolon-delimited set of universally unique identifier(s) for the
855         network with which this bridge is associated on a Citrix XenServer
856         host.  The network identifiers are RFC 4122 UUIDs as displayed by,
857         e.g., <code>xe network-list</code>.
858       </column>
859
860       <column name="other_config" key="hwaddr">
861         An Ethernet address in the form
862         <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
863         to set the hardware address of the local port and influence the
864         datapath ID.
865       </column>
866
867       <column name="other_config" key="forward-bpdu"
868               type='{"type": "boolean"}'>
869         Option to allow forwarding of BPDU frames when NORMAL action is
870         invoked.  Frames with reserved Ethernet addresses (e.g. STP
871         BPDU) will be forwarded when this option is enabled and the
872         switch is not providing that functionality.  If STP is enabled
873         on the port, STP BPDUs will never be forwarded.  If the Open
874         vSwitch bridge is used to connect different Ethernet networks,
875         and if Open vSwitch node does not run STP, then this option
876         should be enabled.  Default is disabled, set to
877         <code>true</code> to enable.
878
879         The following destination MAC addresss will not be forwarded when this
880         option is enabled.
881         <dl>
882           <dt><code>01:80:c2:00:00:00</code></dt>
883           <dd>IEEE 802.1D Spanning Tree Protocol (STP).</dd>
884
885           <dt><code>01:80:c2:00:00:01</code></dt>
886           <dd>IEEE Pause frame.</dd>
887
888           <dt><code>01:80:c2:00:00:0<var>x</var></code></dt>
889           <dd>Other reserved protocols.</dd>
890
891           <dt><code>00:e0:2b:00:00:00</code></dt>
892           <dd>Extreme Discovery Protocol (EDP).</dd>
893
894           <dt>
895             <code>00:e0:2b:00:00:04</code> and <code>00:e0:2b:00:00:06</code>
896           </dt>
897           <dd>Ethernet Automatic Protection Switching (EAPS).</dd>
898
899           <dt><code>01:00:0c:cc:cc:cc</code></dt>
900           <dd>
901             Cisco Discovery Protocol (CDP), VLAN Trunking Protocol (VTP),
902             Dynamic Trunking Protocol (DTP), Port Aggregation Protocol (PAgP),
903             and others.
904           </dd>
905
906           <dt><code>01:00:0c:cc:cc:cd</code></dt>
907           <dd>Cisco Shared Spanning Tree Protocol PVSTP+.</dd>
908
909           <dt><code>01:00:0c:cd:cd:cd</code></dt>
910           <dd>Cisco STP Uplink Fast.</dd>
911
912           <dt><code>01:00:0c:00:00:00</code></dt>
913           <dd>Cisco Inter Switch Link.</dd>
914
915           <dt><code>01:00:0c:cc:cc:c<var>x</var></code></dt>
916           <dd>Cisco CFM.</dd>
917         </dl>
918       </column>
919
920       <column name="other_config" key="mac-aging-time"
921               type='{"type": "integer", "minInteger": 1}'>
922         <p>
923           The maximum number of seconds to retain a MAC learning entry for
924           which no packets have been seen.  The default is currently 300
925           seconds (5 minutes).  The value, if specified, is forced into a
926           reasonable range, currently 15 to 3600 seconds.
927         </p>
928
929         <p>
930           A short MAC aging time allows a network to more quickly detect that a
931           host is no longer connected to a switch port.  However, it also makes
932           it more likely that packets will be flooded unnecessarily, when they
933           are addressed to a connected host that rarely transmits packets.  To
934           reduce the incidence of unnecessary flooding, use a MAC aging time
935           longer than the maximum interval at which a host will ordinarily
936           transmit packets.
937         </p>
938       </column>
939
940       <column name="other_config" key="mac-table-size"
941               type='{"type": "integer", "minInteger": 1}'>
942         <p>
943           The maximum number of MAC addresses to learn.  The default is
944           currently 2048.  The value, if specified, is forced into a reasonable
945           range, currently 10 to 1,000,000.
946         </p>
947       </column>
948     </group>
949
950     <group title="Bridge Status">
951       <p>
952         Status information about bridges.
953       </p>
954       <column name="status">
955         Key-value pairs that report bridge status.
956       </column>
957       <column name="status" key="stp_bridge_id">
958         <p>
959           The bridge-id (in hex) used in spanning tree advertisements.
960           Configuring the bridge-id is described in the
961           <code>stp-system-id</code> and <code>stp-priority</code> keys
962           of the <code>other_config</code> section earlier.
963         </p>
964       </column>
965       <column name="status" key="stp_designated_root">
966         <p>
967           The designated root (in hex) for this spanning tree.
968         </p>
969       </column>
970       <column name="status" key="stp_root_path_cost">
971         <p>
972           The path cost of reaching the designated bridge.  A lower
973           number is better.
974         </p>
975       </column>
976     </group>
977
978     <group title="Common Columns">
979       The overall purpose of these columns is described under <code>Common
980       Columns</code> at the beginning of this document.
981
982       <column name="other_config"/>
983       <column name="external_ids"/>
984     </group>
985   </table>
986  
987  <table name="Port" table="Port or bond configuration.">
988     <p>A port within a <ref table="Bridge"/>.</p>
989     <p>Most commonly, a port has exactly one ``interface,'' pointed to by its
990     <ref column="interfaces"/> column.  Such a port logically
991     corresponds to a port on a physical Ethernet switch.  A port
992     with more than one interface is a ``bonded port'' (see
993     <ref group="Bonding Configuration"/>).</p>
994     <p>Some properties that one might think as belonging to a port are actually
995     part of the port's <ref table="Interface"/> members.</p>
996
997     <column name="name">
998       Port name.  Should be alphanumeric and no more than about 8
999       bytes long.  May be the same as the interface name, for
1000       non-bonded ports.  Must otherwise be unique among the names of
1001       ports, interfaces, and bridges on a host.
1002     </column>
1003
1004     <column name="interfaces">
1005       The port's interfaces.  If there is more than one, this is a
1006       bonded Port.
1007     </column>
1008
1009     <group title="VLAN Configuration">
1010       <p>Bridge ports support the following types of VLAN configuration:</p>
1011       <dl>
1012         <dt>trunk</dt>
1013         <dd>
1014           <p>
1015             A trunk port carries packets on one or more specified VLANs
1016             specified in the <ref column="trunks"/> column (often, on every
1017             VLAN).  A packet that ingresses on a trunk port is in the VLAN
1018             specified in its 802.1Q header, or VLAN 0 if the packet has no
1019             802.1Q header.  A packet that egresses through a trunk port will
1020             have an 802.1Q header if it has a nonzero VLAN ID.
1021           </p>
1022
1023           <p>
1024             Any packet that ingresses on a trunk port tagged with a VLAN that
1025             the port does not trunk is dropped.
1026           </p>
1027         </dd>
1028
1029         <dt>access</dt>
1030         <dd>
1031           <p>
1032             An access port carries packets on exactly one VLAN specified in the
1033             <ref column="tag"/> column.  Packets egressing on an access port
1034             have no 802.1Q header.
1035           </p>
1036
1037           <p>
1038             Any packet with an 802.1Q header with a nonzero VLAN ID that
1039             ingresses on an access port is dropped, regardless of whether the
1040             VLAN ID in the header is the access port's VLAN ID.
1041           </p>
1042         </dd>
1043
1044         <dt>native-tagged</dt>
1045         <dd>
1046           A native-tagged port resembles a trunk port, with the exception that
1047           a packet without an 802.1Q header that ingresses on a native-tagged
1048           port is in the ``native VLAN'' (specified in the <ref column="tag"/>
1049           column).
1050         </dd>
1051
1052         <dt>native-untagged</dt>
1053         <dd>
1054           A native-untagged port resembles a native-tagged port, with the
1055           exception that a packet that egresses on a native-untagged port in
1056           the native VLAN will not have an 802.1Q header.
1057         </dd>
1058       </dl>
1059       <p>
1060         A packet will only egress through bridge ports that carry the VLAN of
1061         the packet, as described by the rules above.
1062       </p>
1063
1064       <column name="vlan_mode">
1065         <p>
1066           The VLAN mode of the port, as described above.  When this column is
1067           empty, a default mode is selected as follows:
1068         </p>
1069         <ul>
1070           <li>
1071             If <ref column="tag"/> contains a value, the port is an access
1072             port.  The <ref column="trunks"/> column should be empty.
1073           </li>
1074           <li>
1075             Otherwise, the port is a trunk port.  The <ref column="trunks"/>
1076             column value is honored if it is present.
1077           </li>
1078         </ul>
1079       </column>
1080
1081       <column name="tag">
1082         <p>
1083           For an access port, the port's implicitly tagged VLAN.  For a
1084           native-tagged or native-untagged port, the port's native VLAN.  Must
1085           be empty if this is a trunk port.
1086         </p>
1087       </column>
1088
1089       <column name="trunks">
1090         <p>
1091           For a trunk, native-tagged, or native-untagged port, the 802.1Q VLAN
1092           or VLANs that this port trunks; if it is empty, then the port trunks
1093           all VLANs.  Must be empty if this is an access port.
1094         </p>
1095         <p>
1096           A native-tagged or native-untagged port always trunks its native
1097           VLAN, regardless of whether <ref column="trunks"/> includes that
1098           VLAN.
1099         </p>
1100       </column>
1101
1102       <column name="other_config" key="priority-tags"
1103               type='{"type": "boolean"}'>
1104         <p>
1105           An 802.1Q header contains two important pieces of information: a VLAN
1106           ID and a priority.  A frame with a zero VLAN ID, called a
1107           ``priority-tagged'' frame, is supposed to be treated the same way as
1108           a frame without an 802.1Q header at all (except for the priority).
1109         </p>
1110
1111         <p>
1112           However, some network elements ignore any frame that has 802.1Q
1113           header at all, even when the VLAN ID is zero.  Therefore, by default
1114           Open vSwitch does not output priority-tagged frames, instead omitting
1115           the 802.1Q header entirely if the VLAN ID is zero.  Set this key to
1116           <code>true</code> to enable priority-tagged frames on a port.
1117         </p>
1118
1119         <p>
1120           Regardless of this setting, Open vSwitch omits the 802.1Q header on
1121           output if both the VLAN ID and priority would be zero.
1122         </p>
1123
1124         <p>
1125           All frames output to native-tagged ports have a nonzero VLAN ID, so
1126           this setting is not meaningful on native-tagged ports.
1127         </p>
1128       </column>
1129     </group>
1130
1131     <group title="Bonding Configuration">
1132       <p>A port that has more than one interface is a ``bonded port.'' Bonding
1133       allows for load balancing and fail-over.</p>
1134
1135       <p>
1136         The following types of bonding will work with any kind of upstream
1137         switch.  On the upstream switch, do not configure the interfaces as a
1138         bond:
1139       </p>
1140
1141       <dl>
1142         <dt><code>balance-slb</code></dt>
1143         <dd>
1144           Balances flows among slaves based on source MAC address and output
1145           VLAN, with periodic rebalancing as traffic patterns change.
1146         </dd>
1147
1148         <dt><code>active-backup</code></dt>
1149         <dd>
1150           Assigns all flows to one slave, failing over to a backup slave when
1151           the active slave is disabled.  This is the only bonding mode in which
1152           interfaces may be plugged into different upstream switches.
1153         </dd>
1154       </dl>
1155
1156       <p>
1157         The following modes require the upstream switch to support 802.3ad with
1158         successful LACP negotiation. If LACP negotiation fails and
1159         other-config:lacp-fallback-ab is true, then <code>active-backup</code>
1160         mode is used:
1161       </p>
1162
1163       <dl>
1164         <dt><code>balance-tcp</code></dt>
1165         <dd>
1166           Balances flows among slaves based on L2, L3, and L4 protocol
1167           information such as destination MAC address, IP address, and TCP
1168           port.
1169         </dd>
1170       </dl>
1171
1172       <p>These columns apply only to bonded ports.  Their values are
1173       otherwise ignored.</p>
1174
1175       <column name="bond_mode">
1176         <p>The type of bonding used for a bonded port.  Defaults to
1177         <code>active-backup</code> if unset.
1178         </p>
1179       </column>
1180
1181       <column name="other_config" key="bond-hash-basis"
1182               type='{"type": "integer"}'>
1183         An integer hashed along with flows when choosing output slaves in load
1184         balanced bonds.  When changed, all flows will be assigned different
1185         hash values possibly causing slave selection decisions to change.  Does
1186         not affect bonding modes which do not employ load balancing such as
1187         <code>active-backup</code>.
1188       </column>
1189
1190       <group title="Link Failure Detection">
1191         <p>
1192           An important part of link bonding is detecting that links are down so
1193           that they may be disabled.  These settings determine how Open vSwitch
1194           detects link failure.
1195         </p>
1196
1197         <column name="other_config" key="bond-detect-mode"
1198                 type='{"type": "string", "enum": ["set", ["carrier", "miimon"]]}'>
1199           The means used to detect link failures.  Defaults to
1200           <code>carrier</code> which uses each interface's carrier to detect
1201           failures.  When set to <code>miimon</code>, will check for failures
1202           by polling each interface's MII.
1203         </column>
1204
1205         <column name="other_config" key="bond-miimon-interval"
1206                 type='{"type": "integer"}'>
1207           The interval, in milliseconds, between successive attempts to poll
1208           each interface's MII.  Relevant only when <ref column="other_config"
1209           key="bond-detect-mode"/> is <code>miimon</code>.
1210         </column>
1211
1212         <column name="bond_updelay">
1213           <p>
1214             The number of milliseconds for which the link must stay up on an
1215             interface before the interface is considered to be up.  Specify
1216             <code>0</code> to enable the interface immediately.
1217           </p>
1218
1219           <p>
1220             This setting is honored only when at least one bonded interface is
1221             already enabled.  When no interfaces are enabled, then the first
1222             bond interface to come up is enabled immediately.
1223           </p>
1224         </column>
1225
1226         <column name="bond_downdelay">
1227           The number of milliseconds for which the link must stay down on an
1228           interface before the interface is considered to be down.  Specify
1229           <code>0</code> to disable the interface immediately.
1230         </column>
1231       </group>
1232
1233       <group title="LACP Configuration">
1234         <p>
1235           LACP, the Link Aggregation Control Protocol, is an IEEE standard that
1236           allows switches to automatically detect that they are connected by
1237           multiple links and aggregate across those links.  These settings
1238           control LACP behavior.
1239         </p>
1240
1241         <column name="lacp">
1242           Configures LACP on this port.  LACP allows directly connected
1243           switches to negotiate which links may be bonded.  LACP may be enabled
1244           on non-bonded ports for the benefit of any switches they may be
1245           connected to.  <code>active</code> ports are allowed to initiate LACP
1246           negotiations.  <code>passive</code> ports are allowed to participate
1247           in LACP negotiations initiated by a remote switch, but not allowed to
1248           initiate such negotiations themselves.  If LACP is enabled on a port
1249           whose partner switch does not support LACP, the bond will be
1250           disabled, unless other-config:lacp-fallback-ab is set to true.
1251           Defaults to <code>off</code> if unset.
1252         </column>
1253
1254         <column name="other_config" key="lacp-system-id">
1255           The LACP system ID of this <ref table="Port"/>.  The system ID of a
1256           LACP bond is used to identify itself to its partners.  Must be a
1257           nonzero MAC address. Defaults to the bridge Ethernet address if
1258           unset.
1259         </column>
1260
1261         <column name="other_config" key="lacp-system-priority"
1262                 type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
1263           The LACP system priority of this <ref table="Port"/>.  In LACP
1264           negotiations, link status decisions are made by the system with the
1265           numerically lower priority.
1266         </column>
1267
1268         <column name="other_config" key="lacp-time"
1269           type='{"type": "string", "enum": ["set", ["fast", "slow"]]}'>
1270           <p>
1271             The LACP timing which should be used on this <ref table="Port"/>.
1272             By default <code>slow</code> is used.  When configured to be
1273             <code>fast</code> LACP heartbeats are requested at a rate of once
1274             per second causing connectivity problems to be detected more
1275             quickly.  In <code>slow</code> mode, heartbeats are requested at a
1276             rate of once every 30 seconds.
1277           </p>
1278         </column>
1279
1280         <column name="other_config" key="lacp-fallback-ab"
1281           type='{"type": "boolean"}'>
1282           <p>
1283             Determines the behavior of openvswitch bond in LACP mode. If
1284             the partner switch does not support LACP, setting this option
1285             to <code>true</code> allows openvswitch to fallback to
1286             active-backup. If the option is set to <code>false</code>, the
1287             bond will be disabled. In both the cases, once the partner switch
1288             is configured to LACP mode, the bond will use LACP.
1289           </p>
1290         </column>
1291       </group>
1292
1293       <group title="Rebalancing Configuration">
1294         <p>
1295           These settings control behavior when a bond is in
1296           <code>balance-slb</code> or <code>balance-tcp</code> mode.
1297         </p>
1298
1299         <column name="other_config" key="bond-rebalance-interval"
1300                 type='{"type": "integer", "minInteger": 0, "maxInteger": 10000}'>
1301           For a load balanced bonded port, the number of milliseconds between
1302           successive attempts to rebalance the bond, that is, to move flows
1303           from one interface on the bond to another in an attempt to keep usage
1304           of each interface roughly equal.  If zero, load balancing is disabled
1305           on the bond (link failure still cause flows to move).  If
1306           less than 1000ms, the rebalance interval will be 1000ms.
1307         </column>
1308       </group>
1309
1310       <column name="bond_fake_iface">
1311         For a bonded port, whether to create a fake internal interface with the
1312         name of the port.  Use only for compatibility with legacy software that
1313         requires this.
1314       </column>
1315     </group>
1316
1317     <group title="Spanning Tree Configuration">
1318       <column name="other_config" key="stp-enable"
1319               type='{"type": "boolean"}'>
1320         If spanning tree is enabled on the bridge, member ports are
1321         enabled by default (with the exception of bond, internal, and
1322         mirror ports which do not work with STP).  If this column's
1323         value is <code>false</code> spanning tree is disabled on the
1324         port.
1325       </column>
1326
1327        <column name="other_config" key="stp-port-num"
1328                type='{"type": "integer", "minInteger": 1, "maxInteger": 255}'>
1329         The port number used for the lower 8 bits of the port-id.  By
1330         default, the numbers will be assigned automatically.  If any
1331         port's number is manually configured on a bridge, then they
1332         must all be.
1333       </column>
1334
1335        <column name="other_config" key="stp-port-priority"
1336                type='{"type": "integer", "minInteger": 0, "maxInteger": 255}'>
1337         The port's relative priority value for determining the root
1338         port (the upper 8 bits of the port-id).  A port with a lower
1339         port-id will be chosen as the root port.  By default, the
1340         priority is 0x80.
1341       </column>
1342
1343        <column name="other_config" key="stp-path-cost"
1344                type='{"type": "integer", "minInteger": 0, "maxInteger": 65535}'>
1345         Spanning tree path cost for the port.  A lower number indicates
1346         a faster link.  By default, the cost is based on the maximum
1347         speed of the link.
1348       </column>
1349     </group>
1350
1351     <group title="Rapid Spanning Tree Configuration">
1352       <column name="other_config" key="rstp-enable"
1353               type='{"type": "boolean"}'>
1354         If rapid spanning tree is enabled on the bridge, member ports are
1355         enabled by default (with the exception of bond, internal, and
1356         mirror ports which do not work with RSTP).  If this column's
1357         value is <code>false</code> rapid spanning tree is disabled on the
1358         port.
1359       </column>
1360
1361       <column name="other_config" key="rstp-port-priority"
1362               type='{"type": "integer", "minInteger": 0, "maxInteger": 240}'>
1363         The port's relative priority value for determining the root
1364         port, in multiples of 16.  By default, the port priority is 0x80
1365         (128).  Any value in the lower 4 bits is rounded off.  The significant
1366         upper 4 bits become the upper 4 bits of the port-id.  A port with the
1367         lowest port-id is elected as the root.
1368       </column>
1369
1370       <column name="other_config" key="rstp-port-num"
1371               type='{"type": "integer", "minInteger": 1, "maxInteger": 4095}'>
1372         The local RSTP port number, used as the lower 12 bits of the port-id.
1373         By default the port numbers are assigned automatically, and typically
1374         may not correspond to the OpenFlow port numbers.  A port with the
1375         lowest port-id is elected as the root.
1376       </column>
1377
1378       <column name="other_config" key="rstp-port-path-cost"
1379               type='{"type": "integer"}'>
1380         The port path cost.  The Port's contribution, when it is
1381         the Root Port, to the Root Path Cost for the Bridge.  By default the
1382         cost is automatically calculated from the port's speed.
1383       </column>
1384
1385       <column name="other_config" key="rstp-port-admin-edge"
1386               type='{"type": "boolean"}'>
1387         The admin edge port parameter for the Port.  Default is
1388         <code>false</code>.
1389       </column>
1390
1391       <column name="other_config" key="rstp-port-auto-edge"
1392               type='{"type": "boolean"}'>
1393         The auto edge port parameter for the Port.  Default is
1394         <code>true</code>.
1395       </column>
1396
1397       <column name="other_config" key="rstp-port-mcheck"
1398               type='{"type": "boolean"}'>
1399         <p>
1400           The mcheck port parameter for the Port.  Default is
1401           <code>false</code>.  May be set to force the Port Protocol
1402           Migration state machine to transmit RST BPDUs for a
1403           MigrateTime period, to test whether all STP Bridges on the
1404           attached LAN have been removed and the Port can continue to
1405           transmit RSTP BPDUs.  Setting mcheck has no effect if the
1406           Bridge is operating in STP Compatibility mode.
1407         </p>
1408         <p>
1409           Changing the value from <code>true</code> to
1410           <code>false</code> has no effect, but needs to be done if
1411           this behavior is to be triggered again by subsequently
1412           changing the value from <code>false</code> to
1413           <code>true</code>.
1414         </p>
1415       </column>
1416     </group>
1417
1418     <group title="Multicast Snooping">
1419       <column name="other_config" key="mcast-snooping-flood"
1420               type='{"type": "boolean"}'>
1421         <p>
1422           If set to <code>true</code>, multicast packets are unconditionally
1423           forwarded to the specific port.
1424         </p>
1425       </column>
1426     </group>
1427
1428     <group title="Other Features">
1429       <column name="qos">
1430         Quality of Service configuration for this port.
1431       </column>
1432
1433       <column name="mac">
1434         The MAC address to use for this port for the purpose of choosing the
1435         bridge's MAC address.  This column does not necessarily reflect the
1436         port's actual MAC address, nor will setting it change the port's actual
1437         MAC address.
1438       </column>
1439
1440       <column name="fake_bridge">
1441         Does this port represent a sub-bridge for its tagged VLAN within the
1442         Bridge?  See ovs-vsctl(8) for more information.
1443       </column>
1444
1445       <column name="external_ids" key="fake-bridge-id-*">
1446         External IDs for a fake bridge (see the <ref column="fake_bridge"/>
1447         column) are defined by prefixing a <ref table="Bridge"/> <ref
1448         table="Bridge" column="external_ids"/> key with
1449         <code>fake-bridge-</code>,
1450         e.g. <code>fake-bridge-xs-network-uuids</code>.
1451       </column>
1452     </group>
1453
1454     <group title="Port Status">
1455       <p>
1456         Status information about ports attached to bridges.
1457       </p>
1458       <column name="status">
1459         Key-value pairs that report port status.
1460       </column>
1461       <column name="status" key="stp_port_id">
1462         <p>
1463           The port-id (in hex) used in spanning tree advertisements for
1464           this port.  Configuring the port-id is described in the
1465           <code>stp-port-num</code> and <code>stp-port-priority</code>
1466           keys of the <code>other_config</code> section earlier.
1467         </p>
1468       </column>
1469       <column name="status" key="stp_state"
1470               type='{"type": "string", "enum": ["set",
1471                             ["disabled", "listening", "learning",
1472                              "forwarding", "blocking"]]}'>
1473         <p>
1474           STP state of the port.
1475         </p>
1476       </column>
1477       <column name="status" key="stp_sec_in_state"
1478               type='{"type": "integer", "minInteger": 0}'>
1479         <p>
1480           The amount of time (in seconds) port has been in the current
1481           STP state.
1482         </p>
1483       </column>
1484       <column name="status" key="stp_role"
1485               type='{"type": "string", "enum": ["set",
1486                             ["root", "designated", "alternate"]]}'>
1487         <p>
1488           STP role of the port.
1489         </p>
1490       </column>
1491
1492       <column name="status" key="bond_active_slave">
1493         <p>
1494           For a bonded port, record the mac address of the current active slave.
1495         </p>
1496       </column>
1497
1498     </group>
1499
1500     <group title="Port Statistics">
1501       <p>
1502         Key-value pairs that report port statistics.  The update period
1503         is controlled by <ref column="other_config"
1504         key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
1505       </p>
1506       <group title="Statistics: STP transmit and receive counters">
1507         <column name="statistics" key="stp_tx_count">
1508           Number of STP BPDUs sent on this port by the spanning
1509           tree library.
1510         </column>
1511         <column name="statistics" key="stp_rx_count">
1512           Number of STP BPDUs received on this port and accepted by the
1513           spanning tree library.
1514         </column>
1515         <column name="statistics" key="stp_error_count">
1516           Number of bad STP BPDUs received on this port.  Bad BPDUs
1517           include runt packets and those with an unexpected protocol ID.
1518         </column>
1519       </group>
1520     </group>
1521
1522     <group title="Common Columns">
1523       The overall purpose of these columns is described under <code>Common
1524       Columns</code> at the beginning of this document.
1525
1526       <column name="other_config"/>
1527       <column name="external_ids"/>
1528     </group>
1529   </table>
1530
1531   <table name="Interface" title="One physical network device in a Port.">
1532     An interface within a <ref table="Port"/>.
1533
1534     <group title="Core Features">
1535       <column name="name">
1536         Interface name.  Should be alphanumeric and no more than about 8 bytes
1537         long.  May be the same as the port name, for non-bonded ports.  Must
1538         otherwise be unique among the names of ports, interfaces, and bridges
1539         on a host.
1540       </column>
1541
1542       <column name="ifindex">
1543         A positive interface index as defined for SNMP MIB-II in RFCs 1213 and
1544         2863, if the interface has one, otherwise 0.  The ifindex is useful for
1545         seamless integration with protocols such as SNMP and sFlow.
1546       </column>
1547
1548       <column name="mac_in_use">
1549         The MAC address in use by this interface.
1550       </column>
1551
1552       <column name="mac">
1553         <p>Ethernet address to set for this interface.  If unset then the
1554         default MAC address is used:</p>
1555         <ul>
1556           <li>For the local interface, the default is the lowest-numbered MAC
1557           address among the other bridge ports, either the value of the
1558           <ref table="Port" column="mac"/> in its <ref table="Port"/> record,
1559           if set, or its actual MAC (for bonded ports, the MAC of its slave
1560           whose name is first in alphabetical order).  Internal ports and
1561           bridge ports that are used as port mirroring destinations (see the
1562           <ref table="Mirror"/> table) are ignored.</li>
1563           <li>For other internal interfaces, the default MAC is randomly
1564           generated.</li>
1565           <li>External interfaces typically have a MAC address associated with
1566           their hardware.</li>
1567         </ul>
1568         <p>Some interfaces may not have a software-controllable MAC
1569         address.</p>
1570       </column>
1571
1572       <column name="error">
1573         If the configuration of the port failed, as indicated by -1 in <ref
1574         column="ofport"/>, Open vSwitch sets this column to an error
1575         description in human readable form.  Otherwise, Open vSwitch clears
1576         this column.
1577       </column>
1578
1579       <group title="OpenFlow Port Number">
1580         <p>
1581           When a client adds a new interface, Open vSwitch chooses an OpenFlow
1582           port number for the new port.  If the client that adds the port fills
1583           in <ref column="ofport_request"/>, then Open vSwitch tries to use its
1584           value as the OpenFlow port number.  Otherwise, or if the requested
1585           port number is already in use or cannot be used for another reason,
1586           Open vSwitch automatically assigns a free port number.  Regardless of
1587           how the port number was obtained, Open vSwitch then reports in <ref
1588           column="ofport"/> the port number actually assigned.
1589         </p>
1590
1591         <p>
1592           Open vSwitch limits the port numbers that it automatically assigns to
1593           the range 1 through 32,767, inclusive.  Controllers therefore have
1594           free use of ports 32,768 and up.
1595         </p>
1596
1597         <column name="ofport">
1598           <p>
1599             OpenFlow port number for this interface.  Open vSwitch sets this
1600             column's value, so other clients should treat it as read-only.
1601           </p>
1602           <p>
1603             The OpenFlow ``local'' port (<code>OFPP_LOCAL</code>) is 65,534.
1604             The other valid port numbers are in the range 1 to 65,279,
1605             inclusive.  Value -1 indicates an error adding the interface.
1606           </p>
1607         </column>
1608
1609         <column name="ofport_request"
1610                 type='{"type": "integer", "minInteger": 1, "maxInteger": 65279}'>
1611           <p>
1612             Requested OpenFlow port number for this interface.
1613           </p>
1614
1615           <p>
1616             A client should ideally set this column's value in the same
1617             database transaction that it uses to create the interface.  Open
1618             vSwitch version 2.1 and later will honor a later request for a
1619             specific port number, althuogh it might confuse some controllers:
1620             OpenFlow does not have a way to announce a port number change, so
1621             Open vSwitch represents it over OpenFlow as a port deletion
1622             followed immediately by a port addition.
1623           </p>
1624
1625           <p>
1626             If <ref column="ofport_request"/> is set or changed to some other
1627             port's automatically assigned port number, Open vSwitch chooses a
1628             new port number for the latter port.
1629           </p>
1630         </column>
1631       </group>
1632     </group>
1633
1634     <group title="System-Specific Details">
1635       <column name="type">
1636         <p>
1637           The interface type, one of:
1638         </p>
1639
1640         <dl>
1641           <dt><code>system</code></dt>
1642           <dd>An ordinary network device, e.g. <code>eth0</code> on Linux.
1643           Sometimes referred to as ``external interfaces'' since they are
1644           generally connected to hardware external to that on which the Open
1645           vSwitch is running.  The empty string is a synonym for
1646           <code>system</code>.</dd>
1647
1648           <dt><code>internal</code></dt>
1649           <dd>A simulated network device that sends and receives traffic.  An
1650           internal interface whose <ref column="name"/> is the same as its
1651           bridge's <ref table="Open_vSwitch" column="name"/> is called the
1652           ``local interface.''  It does not make sense to bond an internal
1653           interface, so the terms ``port'' and ``interface'' are often used
1654           imprecisely for internal interfaces.</dd>
1655
1656           <dt><code>tap</code></dt>
1657           <dd>A TUN/TAP device managed by Open vSwitch.</dd>
1658
1659           <dt><code>geneve</code></dt>
1660           <dd>
1661             An Ethernet over Geneve (<code>http://tools.ietf.org/html/draft-gross-geneve-00</code>)
1662             IPv4 tunnel.
1663
1664             Geneve supports options as a means to transport additional metadata,
1665             however, currently only the 24-bit VNI is supported. This is planned
1666             to be extended in the future.
1667           </dd>
1668
1669           <dt><code>gre</code></dt>
1670           <dd>
1671             An Ethernet over RFC 2890 Generic Routing Encapsulation over IPv4
1672             tunnel.
1673           </dd>
1674
1675           <dt><code>ipsec_gre</code></dt>
1676           <dd>
1677             An Ethernet over RFC 2890 Generic Routing Encapsulation over IPv4
1678             IPsec tunnel.
1679           </dd>
1680
1681           <dt><code>gre64</code></dt>
1682           <dd>
1683             It is same as GRE, but it allows 64 bit key. To store higher 32-bits
1684             of key, it uses GRE protocol sequence number field. This is non
1685             standard use of GRE protocol since OVS does not increment
1686             sequence number for every packet at time of encap as expected by
1687             standard GRE implementation. See <ref group="Tunnel Options"/>
1688             for information on configuring GRE tunnels.
1689           </dd>
1690
1691           <dt><code>ipsec_gre64</code></dt>
1692           <dd>
1693             Same as IPSEC_GRE except 64 bit key.
1694           </dd>
1695
1696           <dt><code>vxlan</code></dt>
1697           <dd>
1698             <p>
1699               An Ethernet tunnel over the experimental, UDP-based VXLAN
1700               protocol described at
1701               <code>http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-03</code>.
1702             </p>
1703             <p>
1704               Open vSwitch uses UDP destination port 4789.  The source port used for
1705               VXLAN traffic varies on a per-flow basis and is in the ephemeral port
1706               range.
1707             </p>
1708           </dd>
1709
1710           <dt><code>lisp</code></dt>
1711           <dd>
1712             <p>
1713               A layer 3 tunnel over the experimental, UDP-based Locator/ID
1714               Separation Protocol (RFC 6830).
1715             </p>
1716             <p>
1717               Only IPv4 and IPv6 packets are supported by the protocol, and
1718               they are sent and received without an Ethernet header.  Traffic
1719               to/from LISP ports is expected to be configured explicitly, and
1720               the ports are not intended to participate in learning based
1721               switching.  As such, they are always excluded from packet
1722               flooding.
1723             </p>
1724           </dd>
1725
1726           <dt><code>patch</code></dt>
1727           <dd>
1728             A pair of virtual devices that act as a patch cable.
1729           </dd>
1730
1731           <dt><code>null</code></dt>
1732           <dd>An ignored interface. Deprecated and slated for removal in
1733               February 2013.</dd>
1734         </dl>
1735       </column>
1736     </group>
1737
1738     <group title="Tunnel Options">
1739       <p>
1740         These options apply to interfaces with <ref column="type"/> of
1741         <code>geneve</code>, <code>gre</code>, <code>ipsec_gre</code>,
1742         <code>gre64</code>, <code>ipsec_gre64</code>, <code>vxlan</code>,
1743         and <code>lisp</code>.
1744       </p>
1745
1746       <p>
1747         Each tunnel must be uniquely identified by the combination of <ref
1748         column="type"/>, <ref column="options" key="remote_ip"/>, <ref
1749         column="options" key="local_ip"/>, and <ref column="options"
1750         key="in_key"/>.  If two ports are defined that are the same except one
1751         has an optional identifier and the other does not, the more specific
1752         one is matched first.  <ref column="options" key="in_key"/> is
1753         considered more specific than <ref column="options" key="local_ip"/> if
1754         a port defines one and another port defines the other.
1755       </p>
1756
1757       <column name="options" key="remote_ip">
1758         <p>Required.  The remote tunnel endpoint, one of:</p>
1759
1760         <ul>
1761           <li>
1762             An IPv4 address (not a DNS name), e.g. <code>192.168.0.123</code>.
1763             Only unicast endpoints are supported.
1764           </li>
1765           <li>
1766             The word <code>flow</code>.  The tunnel accepts packets from any
1767             remote tunnel endpoint.  To process only packets from a specific
1768             remote tunnel endpoint, the flow entries may match on the
1769             <code>tun_src</code> field.  When sending packets to a
1770             <code>remote_ip=flow</code> tunnel, the flow actions must
1771             explicitly set the <code>tun_dst</code> field to the IP address of
1772             the desired remote tunnel endpoint, e.g. with a
1773             <code>set_field</code> action.
1774           </li>
1775         </ul>
1776
1777         <p>
1778          The remote tunnel endpoint for any packet received from a tunnel
1779          is available in the <code>tun_src</code> field for matching in the
1780          flow table.
1781         </p>
1782       </column>
1783
1784       <column name="options" key="local_ip">
1785         <p>
1786           Optional.  The tunnel destination IP that received packets must
1787           match.  Default is to match all addresses.  If specified, may be one
1788           of:
1789         </p>
1790
1791         <ul>
1792           <li>
1793             An IPv4 address (not a DNS name), e.g. <code>192.168.12.3</code>.
1794           </li>
1795           <li>
1796             The word <code>flow</code>.  The tunnel accepts packets sent to any
1797             of the local IP addresses of the system running OVS.  To process
1798             only packets sent to a specific IP address, the flow entries may
1799             match on the <code>tun_dst</code> field.  When sending packets to a
1800             <code>local_ip=flow</code> tunnel, the flow actions may
1801             explicitly set the <code>tun_src</code> field to the desired IP
1802             address, e.g. with a <code>set_field</code> action.  However, while
1803             routing the tunneled packet out, the local system may override the
1804             specified address with the local IP address configured for the
1805             outgoing system interface.
1806
1807             <p>
1808               This option is valid only for tunnels also configured with the
1809               <code>remote_ip=flow</code> option.
1810             </p>
1811           </li>
1812         </ul>
1813
1814         <p>
1815           The tunnel destination IP address for any packet received from a
1816           tunnel is available in the <code>tun_dst</code> field for matching in
1817           the flow table.
1818         </p>
1819       </column>
1820
1821       <column name="options" key="in_key">
1822         <p>Optional.  The key that received packets must contain, one of:</p>
1823
1824         <ul>
1825           <li>
1826             <code>0</code>.  The tunnel receives packets with no key or with a
1827             key of 0.  This is equivalent to specifying no <ref column="options"
1828             key="in_key"/> at all.
1829           </li>
1830           <li>
1831             A positive 24-bit (for Geneve, VXLAN, and LISP), 32-bit (for GRE)
1832             or 64-bit (for GRE64) number.  The tunnel receives only packets
1833             with the specified key.
1834           </li>
1835           <li>
1836             The word <code>flow</code>.  The tunnel accepts packets with any
1837             key.  The key will be placed in the <code>tun_id</code> field for
1838             matching in the flow table.  The <code>ovs-ofctl</code> manual page
1839             contains additional information about matching fields in OpenFlow
1840             flows.
1841           </li>
1842         </ul>
1843
1844         <p>
1845         </p>
1846       </column>
1847
1848       <column name="options" key="out_key">
1849         <p>Optional.  The key to be set on outgoing packets, one of:</p>
1850
1851         <ul>
1852           <li>
1853             <code>0</code>.  Packets sent through the tunnel will have no key.
1854             This is equivalent to specifying no <ref column="options"
1855             key="out_key"/> at all.
1856           </li>
1857           <li>
1858             A positive 24-bit (for Geneve, VXLAN and LISP), 32-bit (for GRE) or
1859             64-bit (for GRE64) number.  Packets sent through the tunnel will
1860             have the specified key.
1861           </li>
1862           <li>
1863             The word <code>flow</code>.  Packets sent through the tunnel will
1864             have the key set using the <code>set_tunnel</code> Nicira OpenFlow
1865             vendor extension (0 is used in the absence of an action).  The
1866             <code>ovs-ofctl</code> manual page contains additional information
1867             about the Nicira OpenFlow vendor extensions.
1868           </li>
1869         </ul>
1870       </column>
1871
1872       <column name="options" key="key">
1873         Optional.  Shorthand to set <code>in_key</code> and
1874         <code>out_key</code> at the same time.
1875       </column>
1876
1877       <column name="options" key="tos">
1878         Optional.  The value of the ToS bits to be set on the encapsulating
1879         packet.  ToS is interpreted as DSCP and ECN bits, ECN part must be
1880         zero.  It may also be the word <code>inherit</code>, in which case
1881         the ToS will be copied from the inner packet if it is IPv4 or IPv6
1882         (otherwise it will be 0).  The ECN fields are always inherited.
1883         Default is 0.
1884       </column>
1885
1886       <column name="options" key="ttl">
1887         Optional.  The TTL to be set on the encapsulating packet.  It may also
1888         be the word <code>inherit</code>, in which case the TTL will be copied
1889         from the inner packet if it is IPv4 or IPv6 (otherwise it will be the
1890         system default, typically 64).  Default is the system default TTL.
1891       </column>
1892
1893       <column name="options" key="df_default"
1894               type='{"type": "boolean"}'>
1895         Optional.  If enabled, the Don't Fragment bit will be set on tunnel
1896         outer headers to allow path MTU discovery. Default is enabled; set
1897         to <code>false</code> to disable.
1898       </column>
1899
1900       <group title="Tunnel Options: gre and ipsec_gre only">
1901         <p>
1902           Only <code>gre</code> and <code>ipsec_gre</code> interfaces support
1903           these options.
1904         </p>
1905
1906         <column name="options" key="csum" type='{"type": "boolean"}'>
1907           <p>
1908             Optional.  Compute GRE checksums on outgoing packets.  Default is
1909             disabled, set to <code>true</code> to enable.  Checksums present on
1910             incoming packets will be validated regardless of this setting.
1911           </p>
1912
1913           <p>
1914             GRE checksums impose a significant performance penalty because they
1915             cover the entire packet.  The encapsulated L3, L4, and L7 packet
1916             contents typically have their own checksums, so this additional
1917             checksum only adds value for the GRE and encapsulated L2 headers.
1918           </p>
1919
1920           <p>
1921             This option is supported for <code>ipsec_gre</code>, but not useful
1922             because GRE checksums are weaker than, and redundant with, IPsec
1923             payload authentication.
1924           </p>
1925         </column>
1926       </group>
1927
1928       <group title="Tunnel Options: ipsec_gre only">
1929         <p>
1930           Only <code>ipsec_gre</code> interfaces support these options.
1931         </p>
1932
1933         <column name="options" key="peer_cert">
1934           Required for certificate authentication.  A string containing the
1935           peer's certificate in PEM format.  Additionally the host's
1936           certificate must be specified with the <code>certificate</code>
1937           option.
1938         </column>
1939
1940         <column name="options" key="certificate">
1941           Required for certificate authentication.  The name of a PEM file
1942           containing a certificate that will be presented to the peer during
1943           authentication.
1944         </column>
1945
1946         <column name="options" key="private_key">
1947           Optional for certificate authentication.  The name of a PEM file
1948           containing the private key associated with <code>certificate</code>.
1949           If <code>certificate</code> contains the private key, this option may
1950           be omitted.
1951         </column>
1952
1953         <column name="options" key="psk">
1954           Required for pre-shared key authentication.  Specifies a pre-shared
1955           key for authentication that must be identical on both sides of the
1956           tunnel.
1957         </column>
1958       </group>
1959     </group>
1960
1961     <group title="Patch Options">
1962       <p>
1963         Only <code>patch</code> interfaces support these options.
1964       </p>
1965
1966       <column name="options" key="peer">
1967         The <ref column="name"/> of the <ref table="Interface"/> for the other
1968         side of the patch.  The named <ref table="Interface"/>'s own
1969         <code>peer</code> option must specify this <ref table="Interface"/>'s
1970         name.  That is, the two patch interfaces must have reversed <ref
1971         column="name"/> and <code>peer</code> values.
1972       </column>
1973     </group>
1974
1975     <group title="Interface Status">
1976       <p>
1977         Status information about interfaces attached to bridges, updated every
1978         5 seconds.  Not all interfaces have all of these properties; virtual
1979         interfaces don't have a link speed, for example.  Non-applicable
1980         columns will have empty values.
1981       </p>
1982       <column name="admin_state">
1983         <p>
1984           The administrative state of the physical network link.
1985         </p>
1986       </column>
1987
1988       <column name="link_state">
1989         <p>
1990           The observed state of the physical network link.  This is ordinarily
1991           the link's carrier status.  If the interface's <ref table="Port"/> is
1992           a bond configured for miimon monitoring, it is instead the network
1993           link's miimon status.
1994         </p>
1995       </column>
1996
1997       <column name="link_resets">
1998         <p>
1999           The number of times Open vSwitch has observed the
2000           <ref column="link_state"/> of this <ref table="Interface"/> change.
2001         </p>
2002       </column>
2003
2004       <column name="link_speed">
2005         <p>
2006           The negotiated speed of the physical network link.
2007           Valid values are positive integers greater than 0.
2008         </p>
2009       </column>
2010
2011       <column name="duplex">
2012         <p>
2013           The duplex mode of the physical network link.
2014         </p>
2015       </column>
2016
2017       <column name="mtu">
2018         <p>
2019           The MTU (maximum transmission unit); i.e. the largest
2020           amount of data that can fit into a single Ethernet frame.
2021           The standard Ethernet MTU is 1500 bytes.  Some physical media
2022           and many kinds of virtual interfaces can be configured with
2023           higher MTUs.
2024         </p>
2025         <p>
2026           This column will be empty for an interface that does not
2027           have an MTU as, for example, some kinds of tunnels do not.
2028         </p>
2029       </column>
2030
2031       <column name="lacp_current">
2032         Boolean value indicating LACP status for this interface.  If true, this
2033         interface has current LACP information about its LACP partner.  This
2034         information may be used to monitor the health of interfaces in a LACP
2035         enabled port.  This column will be empty if LACP is not enabled.
2036       </column>
2037
2038       <column name="status">
2039         Key-value pairs that report port status.  Supported status values are
2040         <ref column="type"/>-dependent; some interfaces may not have a valid
2041         <ref column="status" key="driver_name"/>, for example.
2042       </column>
2043
2044       <column name="status" key="driver_name">
2045         The name of the device driver controlling the network adapter.
2046       </column>
2047
2048       <column name="status" key="driver_version">
2049         The version string of the device driver controlling the network
2050         adapter.
2051       </column>
2052
2053       <column name="status" key="firmware_version">
2054         The version string of the network adapter's firmware, if available.
2055       </column>
2056
2057       <column name="status" key="source_ip">
2058         The source IP address used for an IPv4 tunnel end-point, such as
2059         <code>gre</code>.
2060       </column>
2061
2062       <column name="status" key="tunnel_egress_iface">
2063         Egress interface for tunnels.  Currently only relevant for tunnels
2064         on Linux systems, this column will show the name of the interface
2065         which is responsible for routing traffic destined for the configured
2066         <ref column="options" key="remote_ip"/>.  This could be an internal
2067         interface such as a bridge port.
2068       </column>
2069
2070       <column name="status" key="tunnel_egress_iface_carrier"
2071               type='{"type": "string", "enum": ["set", ["down", "up"]]}'>
2072         Whether carrier is detected on <ref column="status"
2073         key="tunnel_egress_iface"/>.
2074       </column>
2075     </group>
2076
2077     <group title="Statistics">
2078       <p>
2079         Key-value pairs that report interface statistics.  The current
2080         implementation updates these counters periodically.  The update period
2081         is controlled by <ref column="other_config"
2082         key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
2083         Future implementations may update them when an interface is created,
2084         when they are queried (e.g. using an OVSDB <code>select</code>
2085         operation), and just before an interface is deleted due to virtual
2086         interface hot-unplug or VM shutdown, and perhaps at other times, but
2087         not on any regular periodic basis.
2088       </p>
2089       <p>
2090         These are the same statistics reported by OpenFlow in its <code>struct
2091         ofp_port_stats</code> structure.  If an interface does not support a
2092         given statistic, then that pair is omitted.
2093       </p>
2094       <group title="Statistics: Successful transmit and receive counters">
2095         <column name="statistics" key="rx_packets">
2096           Number of received packets.
2097         </column>
2098         <column name="statistics" key="rx_bytes">
2099           Number of received bytes.
2100         </column>
2101         <column name="statistics" key="tx_packets">
2102           Number of transmitted packets.
2103         </column>
2104         <column name="statistics" key="tx_bytes">
2105           Number of transmitted bytes.
2106         </column>
2107       </group>
2108       <group title="Statistics: Receive errors">
2109         <column name="statistics" key="rx_dropped">
2110           Number of packets dropped by RX.
2111         </column>
2112         <column name="statistics" key="rx_frame_err">
2113           Number of frame alignment errors.
2114         </column>
2115         <column name="statistics" key="rx_over_err">
2116           Number of packets with RX overrun.
2117         </column>
2118         <column name="statistics" key="rx_crc_err">
2119           Number of CRC errors.
2120         </column>
2121         <column name="statistics" key="rx_errors">
2122           Total number of receive errors, greater than or equal to the sum of
2123           the above.
2124         </column>
2125       </group>
2126       <group title="Statistics: Transmit errors">
2127         <column name="statistics" key="tx_dropped">
2128           Number of packets dropped by TX.
2129         </column>
2130         <column name="statistics" key="collisions">
2131           Number of collisions.
2132         </column>
2133         <column name="statistics" key="tx_errors">
2134           Total number of transmit errors, greater than or equal to the sum of
2135           the above.
2136         </column>
2137       </group>
2138     </group>
2139
2140     <group title="Ingress Policing">
2141       <p>
2142         These settings control ingress policing for packets received on this
2143         interface.  On a physical interface, this limits the rate at which
2144         traffic is allowed into the system from the outside; on a virtual
2145         interface (one connected to a virtual machine), this limits the rate at
2146         which the VM is able to transmit.
2147       </p>
2148       <p>
2149         Policing is a simple form of quality-of-service that simply drops
2150         packets received in excess of the configured rate.  Due to its
2151         simplicity, policing is usually less accurate and less effective than
2152         egress QoS (which is configured using the <ref table="QoS"/> and <ref
2153         table="Queue"/> tables).
2154       </p>
2155       <p>
2156         Policing is currently implemented only on Linux.  The Linux
2157         implementation uses a simple ``token bucket'' approach:
2158       </p>
2159       <ul>
2160         <li>
2161           The size of the bucket corresponds to <ref
2162           column="ingress_policing_burst"/>.  Initially the bucket is full.
2163         </li>
2164         <li>
2165           Whenever a packet is received, its size (converted to tokens) is
2166           compared to the number of tokens currently in the bucket.  If the
2167           required number of tokens are available, they are removed and the
2168           packet is forwarded.  Otherwise, the packet is dropped.
2169         </li>
2170         <li>
2171           Whenever it is not full, the bucket is refilled with tokens at the
2172           rate specified by <ref column="ingress_policing_rate"/>.
2173         </li>
2174       </ul>
2175       <p>
2176         Policing interacts badly with some network protocols, and especially
2177         with fragmented IP packets.  Suppose that there is enough network
2178         activity to keep the bucket nearly empty all the time.  Then this token
2179         bucket algorithm will forward a single packet every so often, with the
2180         period depending on packet size and on the configured rate.  All of the
2181         fragments of an IP packets are normally transmitted back-to-back, as a
2182         group.  In such a situation, therefore, only one of these fragments
2183         will be forwarded and the rest will be dropped.  IP does not provide
2184         any way for the intended recipient to ask for only the remaining
2185         fragments.  In such a case there are two likely possibilities for what
2186         will happen next: either all of the fragments will eventually be
2187         retransmitted (as TCP will do), in which case the same problem will
2188         recur, or the sender will not realize that its packet has been dropped
2189         and data will simply be lost (as some UDP-based protocols will do).
2190         Either way, it is possible that no forward progress will ever occur.
2191       </p>
2192       <column name="ingress_policing_rate">
2193         <p>
2194           Maximum rate for data received on this interface, in kbps.  Data
2195           received faster than this rate is dropped.  Set to <code>0</code>
2196           (the default) to disable policing.
2197         </p>
2198       </column>
2199
2200       <column name="ingress_policing_burst">
2201         <p>Maximum burst size for data received on this interface, in kb.  The
2202         default burst size if set to <code>0</code> is 1000 kb.  This value
2203         has no effect if <ref column="ingress_policing_rate"/>
2204         is <code>0</code>.</p>
2205         <p>
2206           Specifying a larger burst size lets the algorithm be more forgiving,
2207           which is important for protocols like TCP that react severely to
2208           dropped packets.  The burst size should be at least the size of the
2209           interface's MTU.  Specifying a value that is numerically at least as
2210           large as 10% of <ref column="ingress_policing_rate"/> helps TCP come
2211           closer to achieving the full rate.
2212         </p>
2213       </column>
2214     </group>
2215
2216     <group title="Bidirectional Forwarding Detection (BFD)">
2217       <p>
2218         BFD, defined in RFC 5880 and RFC 5881, allows point-to-point
2219         detection of connectivity failures by occasional transmission of
2220         BFD control messages.  Open vSwitch implements BFD to serve
2221         as a more popular and standards compliant alternative to CFM.
2222       </p>
2223
2224       <p>
2225         BFD operates by regularly transmitting BFD control messages at a rate
2226         negotiated independently in each direction.  Each endpoint specifies
2227         the rate at which it expects to receive control messages, and the rate
2228         at which it is willing to transmit them.  Open vSwitch uses a detection
2229         multiplier of three, meaning that an endpoint signals a connectivity
2230         fault if three consecutive BFD control messages fail to arrive.  In the
2231         case of a unidirectional connectivity issue, the system not receiving
2232         BFD control messages signals the problem to its peer in the messages it
2233         transmits.
2234       </p>
2235
2236       <p>
2237         The Open vSwitch implementation of BFD aims to comply faithfully
2238         with RFC 5880 requirements.  Open vSwitch does not implement the
2239         optional Authentication or ``Echo Mode'' features.
2240       </p>
2241
2242       <group title="BFD Configuration">
2243         <p>
2244           A controller sets up key-value pairs in the <ref column="bfd"/>
2245           column to enable and configure BFD.
2246         </p>
2247
2248         <column name="bfd" key="enable" type='{"type": "boolean"}'>
2249           True to enable BFD on this <ref table="Interface"/>.  If not
2250           specified, BFD will not be enabled by default.
2251         </column>
2252
2253         <column name="bfd" key="min_rx"
2254                 type='{"type": "integer", "minInteger": 1}'>
2255           The shortest interval, in milliseconds, at which this BFD session
2256           offers to receive BFD control messages.  The remote endpoint may
2257           choose to send messages at a slower rate.  Defaults to
2258           <code>1000</code>.
2259         </column>
2260
2261         <column name="bfd" key="min_tx"
2262                 type='{"type": "integer", "minInteger": 1}'>
2263           The shortest interval, in milliseconds, at which this BFD session is
2264           willing to transmit BFD control messages.  Messages will actually be
2265           transmitted at a slower rate if the remote endpoint is not willing to
2266           receive as quickly as specified.  Defaults to <code>100</code>.
2267         </column>
2268
2269         <column name="bfd" key="decay_min_rx" type='{"type": "integer"}'>
2270           An alternate receive interval, in milliseconds, that must be greater
2271           than or equal to <ref column="bfd" key="min_rx"/>.  The
2272           implementation switches from <ref column="bfd" key="min_rx"/> to <ref
2273           column="bfd" key="decay_min_rx"/> when there is no obvious incoming
2274           data traffic at the interface, to reduce the CPU and bandwidth cost
2275           of monitoring an idle interface.  This feature may be disabled by
2276           setting a value of 0.  This feature is reset whenever <ref
2277           column="bfd" key="decay_min_rx"/> or <ref column="bfd" key="min_rx"/>
2278           changes.
2279         </column>
2280
2281         <column name="bfd" key="forwarding_if_rx" type='{"type": "boolean"}'>
2282           When <code>true</code>, traffic received on the
2283           <ref table="Interface"/> is used to indicate the capability of packet
2284           I/O.  BFD control packets are still transmitted and received.  At
2285           least one BFD control packet must be received every 100 * <ref
2286           column="bfd" key="min_rx"/> amount of time.  Otherwise, even if
2287           traffic are received, the <ref column="bfd" key="forwarding"/>
2288           will be <code>false</code>.
2289         </column>
2290
2291         <column name="bfd" key="cpath_down" type='{"type": "boolean"}'>
2292           Set to true to notify the remote endpoint that traffic should not be
2293           forwarded to this system for some reason other than a connectivty
2294           failure on the interface being monitored.  The typical underlying
2295           reason is ``concatenated path down,'' that is, that connectivity
2296           beyond the local system is down.  Defaults to false.
2297         </column>
2298
2299         <column name="bfd" key="check_tnl_key" type='{"type": "boolean"}'>
2300           Set to true to make BFD accept only control messages with a tunnel
2301           key of zero.  By default, BFD accepts control messages with any
2302           tunnel key.
2303         </column>
2304
2305         <column name="bfd" key="bfd_local_src_mac">
2306           Set to an Ethernet address in the form
2307           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
2308           to set the MAC used as source for transmitted BFD packets.  The
2309           default is the mac address of the BFD enabled interface.
2310         </column>
2311
2312         <column name="bfd" key="bfd_local_dst_mac">
2313           Set to an Ethernet address in the form
2314           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
2315           to set the MAC used as destination for transmitted BFD packets.  The
2316           default is <code>00:23:20:00:00:01</code>.
2317         </column>
2318
2319         <column name="bfd" key="bfd_remote_dst_mac">
2320           Set to an Ethernet address in the form
2321           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
2322           to set the MAC used for checking the destination of received BFD packets.
2323           Packets with different destination MAC will not be considered as BFD packets.
2324           If not specified the destination MAC address of received BFD packets
2325           are not checked.
2326         </column>
2327
2328         <column name="bfd" key="bfd_src_ip">
2329           Set to an IPv4 address to set the IP address used as source for
2330           transmitted BFD packets.  The default is <code>169.254.1.1</code>.
2331         </column>
2332
2333         <column name="bfd" key="bfd_dst_ip">
2334           Set to an IPv4 address to set the IP address used as destination
2335           for transmitted BFD packets.  The default is <code>169.254.1.0</code>.
2336         </column>
2337       </group>
2338
2339       <group title="BFD Status">
2340         <p>
2341           The switch sets key-value pairs in the <ref column="bfd_status"/>
2342           column to report the status of BFD on this interface.  When BFD is
2343           not enabled, with <ref column="bfd" key="enable"/>, the switch clears
2344           all key-value pairs from <ref column="bfd_status"/>.
2345         </p>
2346
2347         <column name="bfd_status" key="state"
2348                 type='{"type": "string",
2349                       "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
2350           Reports the state of the BFD session.  The BFD session is fully
2351           healthy and negotiated if <code>UP</code>.
2352         </column>
2353
2354         <column name="bfd_status" key="forwarding" type='{"type": "boolean"}'>
2355           Reports whether the BFD session believes this <ref
2356           table="Interface"/> may be used to forward traffic.  Typically this
2357           means the local session is signaling <code>UP</code>, and the remote
2358           system isn't signaling a problem such as concatenated path down.
2359         </column>
2360
2361         <column name="bfd_status" key="diagnostic">
2362           In case of a problem, set to an error message that reports what the
2363           local BFD session thinks is wrong.  The error messages are defined
2364           in section 4.1 of [RFC 5880].
2365         </column>
2366
2367         <column name="bfd_status" key="remote_state"
2368                 type='{"type": "string",
2369                       "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
2370           Reports the state of the remote endpoint's BFD session.
2371         </column>
2372
2373         <column name="bfd_status" key="remote_diagnostic">
2374           In case of a problem, set to an error message that reports what the
2375           remote endpoint's BFD session thinks is wrong.  The error messages
2376           are defined in section 4.1 of [RFC 5880].
2377         </column>
2378
2379         <column name="bfd_status" key="flap_count"
2380           type='{"type": "integer", "minInteger": 0}'>
2381           Counts the number of <ref column="bfd_status" key="forwarding" />
2382           flaps since start.  A flap is considered as a change of the
2383           <ref column="bfd_status" key="forwarding" /> value.
2384         </column>
2385       </group>
2386     </group>
2387
2388     <group title="Connectivity Fault Management">
2389       <p>
2390         802.1ag Connectivity Fault Management (CFM) allows a group of
2391         Maintenance Points (MPs) called a Maintenance Association (MA) to
2392         detect connectivity problems with each other.  MPs within a MA should
2393         have complete and exclusive interconnectivity.  This is verified by
2394         occasionally broadcasting Continuity Check Messages (CCMs) at a
2395         configurable transmission interval.
2396       </p>
2397
2398       <p>
2399         According to the 802.1ag specification, each Maintenance Point should
2400         be configured out-of-band with a list of Remote Maintenance Points it
2401         should have connectivity to.  Open vSwitch differs from the
2402         specification in this area.  It simply assumes the link is faulted if
2403         no Remote Maintenance Points are reachable, and considers it not
2404         faulted otherwise.
2405       </p>
2406
2407       <p>
2408           When operating over tunnels which have no <code>in_key</code>, or an
2409           <code>in_key</code> of <code>flow</code>.  CFM will only accept CCMs
2410           with a tunnel key of zero.
2411       </p>
2412
2413       <column name="cfm_mpid">
2414         <p>
2415           A Maintenance Point ID (MPID) uniquely identifies each endpoint
2416           within a Maintenance Association.  The MPID is used to identify this
2417           endpoint to other Maintenance Points in the MA.  Each end of a link
2418           being monitored should have a different MPID.  Must be configured to
2419           enable CFM on this <ref table="Interface"/>.
2420         </p>
2421         <p>
2422           According to the 802.1ag specification, MPIDs can only range between
2423           [1, 8191].  However, extended mode (see <ref column="other_config"
2424           key="cfm_extended"/>) supports eight byte MPIDs.
2425         </p>
2426       </column>
2427
2428       <column name="cfm_flap_count">
2429         Counts the number of cfm fault flapps since boot.  A flap is
2430         considered to be a change of the <ref column="cfm_fault"/> value.
2431       </column>
2432
2433       <column name="cfm_fault">
2434         <p>
2435           Indicates a connectivity fault triggered by an inability to receive
2436           heartbeats from any remote endpoint.  When a fault is triggered on
2437           <ref table="Interface"/>s participating in bonds, they will be
2438           disabled.
2439         </p>
2440         <p>
2441           Faults can be triggered for several reasons.  Most importantly they
2442           are triggered when no CCMs are received for a period of 3.5 times the
2443           transmission interval. Faults are also triggered when any CCMs
2444           indicate that a Remote Maintenance Point is not receiving CCMs but
2445           able to send them.  Finally, a fault is triggered if a CCM is
2446           received which indicates unexpected configuration.  Notably, this
2447           case arises when a CCM is received which advertises the local MPID.
2448         </p>
2449       </column>
2450
2451       <column name="cfm_fault_status" key="recv">
2452         Indicates a CFM fault was triggered due to a lack of CCMs received on
2453         the <ref table="Interface"/>.
2454       </column>
2455
2456       <column name="cfm_fault_status" key="rdi">
2457         Indicates a CFM fault was triggered due to the reception of a CCM with
2458         the RDI bit flagged.  Endpoints set the RDI bit in their CCMs when they
2459         are not receiving CCMs themselves.  This typically indicates a
2460         unidirectional connectivity failure.
2461       </column>
2462
2463       <column name="cfm_fault_status" key="maid">
2464         Indicates a CFM fault was triggered due to the reception of a CCM with
2465         a MAID other than the one Open vSwitch uses.  CFM broadcasts are tagged
2466         with an identification number in addition to the MPID called the MAID.
2467         Open vSwitch only supports receiving CCM broadcasts tagged with the
2468         MAID it uses internally.
2469       </column>
2470
2471       <column name="cfm_fault_status" key="loopback">
2472         Indicates a CFM fault was triggered due to the reception of a CCM
2473         advertising the same MPID configured in the <ref column="cfm_mpid"/>
2474         column of this <ref table="Interface"/>.  This may indicate a loop in
2475         the network.
2476       </column>
2477
2478       <column name="cfm_fault_status" key="overflow">
2479         Indicates a CFM fault was triggered because the CFM module received
2480         CCMs from more remote endpoints than it can keep track of.
2481       </column>
2482
2483       <column name="cfm_fault_status" key="override">
2484         Indicates a CFM fault was manually triggered by an administrator using
2485         an <code>ovs-appctl</code> command.
2486       </column>
2487
2488       <column name="cfm_fault_status" key="interval">
2489         Indicates a CFM fault was triggered due to the reception of a CCM
2490         frame having an invalid interval.
2491       </column>
2492
2493       <column name="cfm_remote_opstate">
2494         <p>When in extended mode, indicates the operational state of the
2495           remote endpoint as either <code>up</code> or <code>down</code>.  See
2496           <ref column="other_config" key="cfm_opstate"/>.
2497         </p>
2498       </column>
2499
2500       <column name="cfm_health">
2501         <p>
2502           Indicates the health of the interface as a percentage of CCM frames
2503           received over 21 <ref column="other_config" key="cfm_interval"/>s.
2504           The health of an interface is undefined if it is communicating with
2505           more than one <ref column="cfm_remote_mpids"/>.  It reduces if
2506           healthy heartbeats are not received at the expected rate, and
2507           gradually improves as healthy heartbeats are received at the desired
2508           rate. Every 21 <ref column="other_config" key="cfm_interval"/>s, the
2509           health of the interface is refreshed.
2510         </p>
2511         <p>
2512           As mentioned above, the faults can be triggered for several reasons.
2513           The link health will deteriorate even if heartbeats are received but
2514           they are reported to be unhealthy.  An unhealthy heartbeat in this
2515           context is a heartbeat for which either some fault is set or is out
2516           of sequence.  The interface health can be 100 only on receiving
2517           healthy heartbeats at the desired rate.
2518         </p>
2519       </column>
2520
2521       <column name="cfm_remote_mpids">
2522         When CFM is properly configured, Open vSwitch will occasionally
2523         receive CCM broadcasts.  These broadcasts contain the MPID of the
2524         sending Maintenance Point.  The list of MPIDs from which this
2525         <ref table="Interface"/> is receiving broadcasts from is regularly
2526         collected and written to this column.
2527       </column>
2528
2529       <column name="other_config" key="cfm_interval"
2530               type='{"type": "integer"}'>
2531         <p>
2532           The interval, in milliseconds, between transmissions of CFM
2533           heartbeats.  Three missed heartbeat receptions indicate a
2534           connectivity fault.
2535         </p>
2536
2537         <p>
2538           In standard operation only intervals of 3, 10, 100, 1,000, 10,000,
2539           60,000, or 600,000 ms are supported.  Other values will be rounded
2540           down to the nearest value on the list.  Extended mode (see <ref
2541           column="other_config" key="cfm_extended"/>) supports any interval up
2542           to 65,535 ms.  In either mode, the default is 1000 ms.
2543         </p>
2544
2545         <p>We do not recommend using intervals less than 100 ms.</p>
2546       </column>
2547
2548       <column name="other_config" key="cfm_extended"
2549               type='{"type": "boolean"}'>
2550         When <code>true</code>, the CFM module operates in extended mode. This
2551         causes it to use a nonstandard destination address to avoid conflicting
2552         with compliant implementations which may be running concurrently on the
2553         network. Furthermore, extended mode increases the accuracy of the
2554         <code>cfm_interval</code> configuration parameter by breaking wire
2555         compatibility with 802.1ag compliant implementations.  And extended
2556         mode allows eight byte MPIDs.  Defaults to <code>false</code>.
2557       </column>
2558
2559       <column name="other_config" key="cfm_demand" type='{"type": "boolean"}'>
2560         <p>
2561           When <code>true</code>, and
2562           <ref column="other_config" key="cfm_extended"/> is true, the CFM
2563           module operates in demand mode.  When in demand mode, traffic
2564           received on the <ref table="Interface"/> is used to indicate
2565           liveness.  CCMs are still transmitted and received.  At least one
2566           CCM must be received every 100 * <ref column="other_config"
2567           key="cfm_interval"/> amount of time.  Otherwise, even if traffic
2568           are received, the CFM module will raise the connectivity fault.
2569         </p>
2570
2571         <p>
2572             Demand mode has a couple of caveats:
2573           <ul>
2574             <li>
2575               To ensure that ovs-vswitchd has enough time to pull statistics
2576               from the datapath, the fault detection interval is set to
2577               3.5 * MAX(<ref column="other_config" key="cfm_interval"/>, 500)
2578               ms.
2579             </li>
2580
2581             <li>
2582               To avoid ambiguity, demand mode disables itself when there are
2583               multiple remote maintenance points.
2584             </li>
2585
2586             <li>
2587               If the <ref table="Interface"/> is heavily congested, CCMs
2588               containing the <ref column="other_config" key="cfm_opstate"/>
2589               status may be dropped causing changes in the operational state to
2590               be delayed.  Similarly, if CCMs containing the RDI bit are not
2591               received, unidirectional link failures may not be detected.
2592             </li>
2593           </ul>
2594         </p>
2595       </column>
2596
2597       <column name="other_config" key="cfm_opstate"
2598               type='{"type": "string", "enum": ["set", ["down", "up"]]}'>
2599         When <code>down</code>, the CFM module marks all CCMs it generates as
2600         operationally down without triggering a fault.  This allows remote
2601         maintenance points to choose not to forward traffic to the
2602         <ref table="Interface"/> on which this CFM module is running.
2603         Currently, in Open vSwitch, the opdown bit of CCMs affects
2604         <ref table="Interface"/>s participating in bonds, and the bundle
2605         OpenFlow action. This setting is ignored when CFM is not in extended
2606         mode.  Defaults to <code>up</code>.
2607       </column>
2608
2609       <column name="other_config" key="cfm_ccm_vlan"
2610         type='{"type": "integer", "minInteger": 1, "maxInteger": 4095}'>
2611         When set, the CFM module will apply a VLAN tag to all CCMs it generates
2612         with the given value.  May be the string <code>random</code> in which
2613         case each CCM will be tagged with a different randomly generated VLAN.
2614       </column>
2615
2616       <column name="other_config" key="cfm_ccm_pcp"
2617         type='{"type": "integer", "minInteger": 1, "maxInteger": 7}'>
2618         When set, the CFM module will apply a VLAN tag to all CCMs it generates
2619         with the given PCP value, the VLAN ID of the tag is governed by the
2620         value of <ref column="other_config" key="cfm_ccm_vlan"/>. If
2621         <ref column="other_config" key="cfm_ccm_vlan"/> is unset, a VLAN ID of
2622         zero is used.
2623       </column>
2624
2625     </group>
2626
2627     <group title="Bonding Configuration">
2628       <column name="other_config" key="lacp-port-id"
2629               type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
2630         The LACP port ID of this <ref table="Interface"/>.  Port IDs are
2631         used in LACP negotiations to identify individual ports
2632         participating in a bond.
2633       </column>
2634
2635       <column name="other_config" key="lacp-port-priority"
2636               type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
2637         The LACP port priority of this <ref table="Interface"/>.  In LACP
2638         negotiations <ref table="Interface"/>s with numerically lower
2639         priorities are preferred for aggregation.
2640       </column>
2641
2642       <column name="other_config" key="lacp-aggregation-key"
2643               type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
2644         The LACP aggregation key of this <ref table="Interface"/>.  <ref
2645         table="Interface"/>s with different aggregation keys may not be active
2646         within a given <ref table="Port"/> at the same time.
2647       </column>
2648     </group>
2649
2650     <group title="Virtual Machine Identifiers">
2651       <p>
2652         These key-value pairs specifically apply to an interface that
2653         represents a virtual Ethernet interface connected to a virtual
2654         machine.  These key-value pairs should not be present for other types
2655         of interfaces.  Keys whose names end in <code>-uuid</code> have
2656         values that uniquely identify the entity in question.  For a Citrix
2657         XenServer hypervisor, these values are UUIDs in RFC 4122 format.
2658         Other hypervisors may use other formats.
2659       </p>
2660
2661       <column name="external_ids" key="attached-mac">
2662         The MAC address programmed into the ``virtual hardware'' for this
2663         interface, in the form
2664         <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
2665         For Citrix XenServer, this is the value of the <code>MAC</code> field
2666         in the VIF record for this interface.
2667       </column>
2668
2669       <column name="external_ids" key="iface-id">
2670         A system-unique identifier for the interface.  On XenServer, this will
2671         commonly be the same as <ref column="external_ids" key="xs-vif-uuid"/>.
2672       </column>
2673
2674       <column name="external_ids" key="iface-status"
2675               type='{"type": "string",
2676                     "enum": ["set", ["active", "inactive"]]}'>
2677         <p>
2678           Hypervisors may sometimes have more than one interface associated
2679           with a given <ref column="external_ids" key="iface-id"/>, only one of
2680           which is actually in use at a given time.  For example, in some
2681           circumstances XenServer has both a ``tap'' and a ``vif'' interface
2682           for a single <ref column="external_ids" key="iface-id"/>, but only
2683           uses one of them at a time.  A hypervisor that behaves this way must
2684           mark the currently in use interface <code>active</code> and the
2685           others <code>inactive</code>.  A hypervisor that never has more than
2686           one interface for a given <ref column="external_ids" key="iface-id"/>
2687           may mark that interface <code>active</code> or omit <ref
2688           column="external_ids" key="iface-status"/> entirely.
2689         </p>
2690
2691         <p>
2692           During VM migration, a given <ref column="external_ids"
2693           key="iface-id"/> might transiently be marked <code>active</code> on
2694           two different hypervisors.  That is, <code>active</code> means that
2695           this <ref column="external_ids" key="iface-id"/> is the active
2696           instance within a single hypervisor, not in a broader scope.
2697           There is one exception: some hypervisors support ``migration'' from a
2698           given hypervisor to itself (most often for test purposes).  During
2699           such a ``migration,'' two instances of a single <ref
2700           column="external_ids" key="iface-id"/> might both be briefly marked
2701           <code>active</code> on a single hypervisor.
2702         </p>
2703       </column>
2704
2705       <column name="external_ids" key="xs-vif-uuid">
2706         The virtual interface associated with this interface.
2707       </column>
2708
2709       <column name="external_ids" key="xs-network-uuid">
2710         The virtual network to which this interface is attached.
2711       </column>
2712
2713       <column name="external_ids" key="vm-id">
2714         The VM to which this interface belongs. On XenServer, this will be the
2715         same as <ref column="external_ids" key="xs-vm-uuid"/>.
2716       </column>
2717
2718       <column name="external_ids" key="xs-vm-uuid">
2719         The VM to which this interface belongs.
2720       </column>
2721     </group>
2722
2723     <group title="VLAN Splinters">
2724       <p>
2725         The ``VLAN splinters'' feature increases Open vSwitch compatibility
2726         with buggy network drivers in old versions of Linux that do not
2727         properly support VLANs when VLAN devices are not used, at some cost
2728         in memory and performance.
2729       </p>
2730
2731       <p>
2732         When VLAN splinters are enabled on a particular interface, Open vSwitch
2733         creates a VLAN device for each in-use VLAN.  For sending traffic tagged
2734         with a VLAN on the interface, it substitutes the VLAN device.  Traffic
2735         received on the VLAN device is treated as if it had been received on
2736         the interface on the particular VLAN.
2737       </p>
2738
2739       <p>
2740         VLAN splinters consider a VLAN to be in use if:
2741       </p>
2742
2743       <ul>
2744         <li>
2745           The VLAN is the <ref table="Port" column="tag"/> value in any <ref
2746           table="Port"/> record.
2747         </li>
2748
2749         <li>
2750           The VLAN is listed within the <ref table="Port" column="trunks"/>
2751           column of the <ref table="Port"/> record of an interface on which
2752           VLAN splinters are enabled.
2753
2754           An empty <ref table="Port" column="trunks"/> does not influence the
2755           in-use VLANs: creating 4,096 VLAN devices is impractical because it
2756           will exceed the current 1,024 port per datapath limit.
2757         </li>
2758
2759         <li>
2760           An OpenFlow flow within any bridge matches the VLAN.
2761         </li>
2762       </ul>
2763
2764       <p>
2765         The same set of in-use VLANs applies to every interface on which VLAN
2766         splinters are enabled.  That is, the set is not chosen separately for
2767         each interface but selected once as the union of all in-use VLANs based
2768         on the rules above.
2769       </p>
2770
2771       <p>
2772         It does not make sense to enable VLAN splinters on an interface for an
2773         access port, or on an interface that is not a physical port.
2774       </p>
2775
2776       <p>
2777         VLAN splinters are deprecated.  When broken device drivers are no
2778         longer in widespread use, we will delete this feature.
2779       </p>
2780
2781       <column name="other_config" key="enable-vlan-splinters"
2782               type='{"type": "boolean"}'>
2783         <p>
2784           Set to <code>true</code> to enable VLAN splinters on this interface.
2785           Defaults to <code>false</code>.
2786         </p>
2787
2788         <p>
2789           VLAN splinters increase kernel and userspace memory overhead, so do
2790           not use them unless they are needed.
2791         </p>
2792
2793         <p>
2794           VLAN splinters do not support 802.1p priority tags.  Received
2795           priorities will appear to be 0, regardless of their actual values,
2796           and priorities on transmitted packets will also be cleared to 0.
2797         </p>
2798       </column>
2799     </group>
2800
2801     <group title="Common Columns">
2802       The overall purpose of these columns is described under <code>Common
2803       Columns</code> at the beginning of this document.
2804
2805       <column name="other_config"/>
2806       <column name="external_ids"/>
2807     </group>
2808   </table>
2809
2810   <table name="Flow_Table" title="OpenFlow table configuration">
2811     <p>Configuration for a particular OpenFlow table.</p>
2812
2813     <column name="name">
2814       The table's name.  Set this column to change the name that controllers
2815       will receive when they request table statistics, e.g. <code>ovs-ofctl
2816       dump-tables</code>.  The name does not affect switch behavior.
2817     </column>
2818
2819     <column name="flow_limit">
2820       If set, limits the number of flows that may be added to the table.  Open
2821       vSwitch may limit the number of flows in a table for other reasons,
2822       e.g. due to hardware limitations or for resource availability or
2823       performance reasons.
2824     </column>
2825
2826     <column name="overflow_policy">
2827       <p>
2828         Controls the switch's behavior when an OpenFlow flow table modification
2829         request would add flows in excess of <ref column="flow_limit"/>.  The
2830         supported values are:
2831       </p>
2832
2833       <dl>
2834         <dt><code>refuse</code></dt>
2835         <dd>
2836           Refuse to add the flow or flows.  This is also the default policy
2837           when <ref column="overflow_policy"/> is unset.
2838         </dd>
2839
2840         <dt><code>evict</code></dt>
2841         <dd>
2842           Delete the flow that will expire soonest.  See <ref column="groups"/>
2843           for details.
2844         </dd>
2845       </dl>
2846     </column>
2847
2848     <column name="groups">
2849       <p>
2850         When <ref column="overflow_policy"/> is <code>evict</code>, this
2851         controls how flows are chosen for eviction when the flow table would
2852         otherwise exceed <ref column="flow_limit"/> flows.  Its value is a set
2853         of NXM fields or sub-fields, each of which takes one of the forms
2854         <code><var>field</var>[]</code> or
2855         <code><var>field</var>[<var>start</var>..<var>end</var>]</code>,
2856         e.g. <code>NXM_OF_IN_PORT[]</code>.  Please see
2857         <code>nicira-ext.h</code> for a complete list of NXM field names.
2858       </p>
2859
2860       <p>
2861         When a flow must be evicted due to overflow, the flow to evict is
2862         chosen through an approximation of the following algorithm:
2863       </p>
2864
2865       <ol>
2866         <li>
2867           Divide the flows in the table into groups based on the values of the
2868           specified fields or subfields, so that all of the flows in a given
2869           group have the same values for those fields.  If a flow does not
2870           specify a given field, that field's value is treated as 0.
2871         </li>
2872
2873         <li>
2874           Consider the flows in the largest group, that is, the group that
2875           contains the greatest number of flows.  If two or more groups all
2876           have the same largest number of flows, consider the flows in all of
2877           those groups.
2878         </li>
2879
2880         <li>
2881           Among the flows under consideration, choose the flow that expires
2882           soonest for eviction.
2883         </li>
2884       </ol>
2885
2886       <p>
2887         The eviction process only considers flows that have an idle timeout or
2888         a hard timeout.  That is, eviction never deletes permanent flows.
2889         (Permanent flows do count against <ref column="flow_limit"/>.)
2890       </p>
2891
2892       <p>
2893         Open vSwitch ignores any invalid or unknown field specifications.
2894       </p>
2895
2896       <p>
2897         When <ref column="overflow_policy"/> is not <code>evict</code>, this
2898         column has no effect.
2899       </p>
2900     </column>
2901
2902     <column name="prefixes">
2903       <p>
2904         This string set specifies which fields should be used for
2905         address prefix tracking.  Prefix tracking allows the
2906         classifier to skip rules with longer than necessary prefixes,
2907         resulting in better wildcarding for datapath flows.
2908       </p>
2909       <p>
2910         Prefix tracking may be beneficial when a flow table contains
2911         matches on IP address fields with different prefix lengths.
2912         For example, when a flow table contains IP address matches on
2913         both full addresses and proper prefixes, the full address
2914         matches will typically cause the datapath flow to un-wildcard
2915         the whole address field (depending on flow entry priorities).
2916         In this case each packet with a different address gets handed
2917         to the userspace for flow processing and generates its own
2918         datapath flow.  With prefix tracking enabled for the address
2919         field in question packets with addresses matching shorter
2920         prefixes would generate datapath flows where the irrelevant
2921         address bits are wildcarded, allowing the same datapath flow
2922         to handle all the packets within the prefix in question.  In
2923         this case many userspace upcalls can be avoided and the
2924         overall performance can be better.
2925       </p>
2926       <p>
2927         This is a performance optimization only, so packets will
2928         receive the same treatment with or without prefix tracking.
2929       </p>
2930       <p>
2931         The supported fields are: <code>tun_id</code>,
2932         <code>tun_src</code>, <code>tun_dst</code>,
2933         <code>nw_src</code>, <code>nw_dst</code> (or aliases
2934         <code>ip_src</code> and <code>ip_dst</code>),
2935         <code>ipv6_src</code>, and <code>ipv6_dst</code>.  (Using this
2936         feature for <code>tun_id</code> would only make sense if the
2937         tunnel IDs have prefix structure similar to IP addresses.)
2938       </p>
2939
2940       <p>
2941         By default, the <code>prefixes=ip_dst,ip_src</code> are used
2942         on each flow table.  This instructs the flow classifier to
2943         track the IP destination and source addresses used by the
2944         rules in this specific flow table.
2945       </p>
2946
2947       <p>
2948         The keyword <code>none</code> is recognized as an explicit
2949         override of the default values, causing no prefix fields to be
2950         tracked.
2951       </p>
2952
2953       <p>
2954         To set the prefix fields, the flow table record needs to
2955         exist:
2956       </p>
2957
2958       <dl>
2959         <dt><code>ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=table0</code></dt>
2960         <dd>
2961           Creates a flow table record for the OpenFlow table number 0.
2962         </dd>
2963
2964         <dt><code>ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src</code></dt>
2965         <dd>
2966           Enables prefix tracking for IP source and destination
2967           address fields.
2968         </dd>
2969       </dl>
2970
2971       <p>
2972         There is a maximum number of fields that can be enabled for any
2973         one flow table.  Currently this limit is 3.
2974       </p>
2975     </column>
2976
2977     <group title="Common Columns">
2978       The overall purpose of these columns is described under <code>Common
2979       Columns</code> at the beginning of this document.
2980
2981       <column name="external_ids"/>
2982     </group>
2983   </table>
2984
2985   <table name="QoS" title="Quality of Service configuration">
2986     <p>Quality of Service (QoS) configuration for each Port that
2987     references it.</p>
2988
2989     <column name="type">
2990       <p>The type of QoS to implement. The currently defined types are
2991       listed below:</p>
2992       <dl>
2993         <dt><code>linux-htb</code></dt>
2994         <dd>
2995           Linux ``hierarchy token bucket'' classifier.  See tc-htb(8) (also at
2996           <code>http://linux.die.net/man/8/tc-htb</code>) and the HTB manual
2997           (<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
2998           for information on how this classifier works and how to configure it.
2999         </dd>
3000       </dl>
3001       <dl>
3002         <dt><code>linux-hfsc</code></dt>
3003         <dd>
3004           Linux "Hierarchical Fair Service Curve" classifier.
3005           See <code>http://linux-ip.net/articles/hfsc.en/</code> for
3006           information on how this classifier works.
3007         </dd>
3008       </dl>
3009     </column>
3010
3011     <column name="queues">
3012       <p>A map from queue numbers to <ref table="Queue"/> records.  The
3013       supported range of queue numbers depend on <ref column="type"/>.  The
3014       queue numbers are the same as the <code>queue_id</code> used in
3015       OpenFlow in <code>struct ofp_action_enqueue</code> and other
3016       structures.</p>
3017
3018       <p>
3019         Queue 0 is the ``default queue.''  It is used by OpenFlow output
3020         actions when no specific queue has been set.  When no configuration for
3021         queue 0 is present, it is automatically configured as if a <ref
3022         table="Queue"/> record with empty <ref table="Queue" column="dscp"/>
3023         and <ref table="Queue" column="other_config"/> columns had been
3024         specified.
3025         (Before version 1.6, Open vSwitch would leave queue 0 unconfigured in
3026         this case.  With some queuing disciplines, this dropped all packets
3027         destined for the default queue.)
3028       </p>
3029     </column>
3030
3031     <group title="Configuration for linux-htb and linux-hfsc">
3032       <p>
3033         The <code>linux-htb</code> and <code>linux-hfsc</code> classes support
3034         the following key-value pair:
3035       </p>
3036
3037       <column name="other_config" key="max-rate" type='{"type": "integer"}'>
3038         Maximum rate shared by all queued traffic, in bit/s.  Optional.  If not
3039         specified, for physical interfaces, the default is the link rate.  For
3040         other interfaces or if the link rate cannot be determined, the default
3041         is currently 100 Mbps.
3042       </column>
3043     </group>
3044
3045     <group title="Common Columns">
3046       The overall purpose of these columns is described under <code>Common
3047       Columns</code> at the beginning of this document.
3048
3049       <column name="other_config"/>
3050       <column name="external_ids"/>
3051     </group>
3052   </table>
3053
3054   <table name="Queue" title="QoS output queue.">
3055     <p>A configuration for a port output queue, used in configuring Quality of
3056     Service (QoS) features.  May be referenced by <ref column="queues"
3057     table="QoS"/> column in <ref table="QoS"/> table.</p>
3058
3059     <column name="dscp">
3060       If set, Open vSwitch will mark all traffic egressing this
3061       <ref table="Queue"/> with the given DSCP bits.  Traffic egressing the
3062       default <ref table="Queue"/> is only marked if it was explicitly selected
3063       as the <ref table="Queue"/> at the time the packet was output.  If unset,
3064       the DSCP bits of traffic egressing this <ref table="Queue"/> will remain
3065       unchanged.
3066     </column>
3067
3068     <group title="Configuration for linux-htb QoS">
3069       <p>
3070         <ref table="QoS"/> <ref table="QoS" column="type"/>
3071         <code>linux-htb</code> may use <code>queue_id</code>s less than 61440.
3072         It has the following key-value pairs defined.
3073       </p>
3074
3075       <column name="other_config" key="min-rate"
3076               type='{"type": "integer", "minInteger": 1}'>
3077         Minimum guaranteed bandwidth, in bit/s.
3078       </column>
3079
3080       <column name="other_config" key="max-rate"
3081               type='{"type": "integer", "minInteger": 1}'>
3082         Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
3083         queue's rate will not be allowed to exceed the specified value, even
3084         if excess bandwidth is available.  If unspecified, defaults to no
3085         limit.
3086       </column>
3087
3088       <column name="other_config" key="burst"
3089               type='{"type": "integer", "minInteger": 1}'>
3090         Burst size, in bits.  This is the maximum amount of ``credits'' that a
3091         queue can accumulate while it is idle.  Optional.  Details of the
3092         <code>linux-htb</code> implementation require a minimum burst size, so
3093         a too-small <code>burst</code> will be silently ignored.
3094       </column>
3095
3096       <column name="other_config" key="priority"
3097               type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
3098         A queue with a smaller <code>priority</code> will receive all the
3099         excess bandwidth that it can use before a queue with a larger value
3100         receives any.  Specific priority values are unimportant; only relative
3101         ordering matters.  Defaults to 0 if unspecified.
3102       </column>
3103     </group>
3104
3105     <group title="Configuration for linux-hfsc QoS">
3106       <p>
3107         <ref table="QoS"/> <ref table="QoS" column="type"/>
3108         <code>linux-hfsc</code> may use <code>queue_id</code>s less than 61440.
3109         It has the following key-value pairs defined.
3110       </p>
3111
3112       <column name="other_config" key="min-rate"
3113               type='{"type": "integer", "minInteger": 1}'>
3114         Minimum guaranteed bandwidth, in bit/s.
3115       </column>
3116
3117       <column name="other_config" key="max-rate"
3118               type='{"type": "integer", "minInteger": 1}'>
3119         Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
3120         queue's rate will not be allowed to exceed the specified value, even if
3121         excess bandwidth is available.  If unspecified, defaults to no
3122         limit.
3123       </column>
3124     </group>
3125
3126     <group title="Common Columns">
3127       The overall purpose of these columns is described under <code>Common
3128       Columns</code> at the beginning of this document.
3129
3130       <column name="other_config"/>
3131       <column name="external_ids"/>
3132     </group>
3133   </table>
3134
3135   <table name="Mirror" title="Port mirroring.">
3136     <p>A port mirror within a <ref table="Bridge"/>.</p>
3137     <p>A port mirror configures a bridge to send selected frames to special
3138     ``mirrored'' ports, in addition to their normal destinations.  Mirroring
3139     traffic may also be referred to as SPAN or RSPAN, depending on how
3140     the mirrored traffic is sent.</p>
3141
3142     <column name="name">
3143       Arbitrary identifier for the <ref table="Mirror"/>.
3144     </column>
3145
3146     <group title="Selecting Packets for Mirroring">
3147       <p>
3148         To be selected for mirroring, a given packet must enter or leave the
3149         bridge through a selected port and it must also be in one of the
3150         selected VLANs.
3151       </p>
3152
3153       <column name="select_all">
3154         If true, every packet arriving or departing on any port is
3155         selected for mirroring.
3156       </column>
3157
3158       <column name="select_dst_port">
3159         Ports on which departing packets are selected for mirroring.
3160       </column>
3161
3162       <column name="select_src_port">
3163         Ports on which arriving packets are selected for mirroring.
3164       </column>
3165
3166       <column name="select_vlan">
3167         VLANs on which packets are selected for mirroring.  An empty set
3168         selects packets on all VLANs.
3169       </column>
3170     </group>
3171
3172     <group title="Mirroring Destination Configuration">
3173       <p>
3174         These columns are mutually exclusive.  Exactly one of them must be
3175         nonempty.
3176       </p>
3177
3178       <column name="output_port">
3179         <p>Output port for selected packets, if nonempty.</p>
3180         <p>Specifying a port for mirror output reserves that port exclusively
3181         for mirroring.  No frames other than those selected for mirroring
3182         via this column
3183         will be forwarded to the port, and any frames received on the port
3184         will be discarded.</p>
3185         <p>
3186           The output port may be any kind of port supported by Open vSwitch.
3187           It may be, for example, a physical port (sometimes called SPAN) or a
3188           GRE tunnel.
3189         </p>
3190       </column>
3191
3192       <column name="output_vlan">
3193         <p>Output VLAN for selected packets, if nonempty.</p>
3194         <p>The frames will be sent out all ports that trunk
3195         <ref column="output_vlan"/>, as well as any ports with implicit VLAN
3196         <ref column="output_vlan"/>.  When a mirrored frame is sent out a
3197         trunk port, the frame's VLAN tag will be set to
3198         <ref column="output_vlan"/>, replacing any existing tag; when it is
3199         sent out an implicit VLAN port, the frame will not be tagged.  This
3200         type of mirroring is sometimes called RSPAN.</p>
3201         <p>
3202           See the documentation for
3203           <ref column="other_config" key="forward-bpdu"/> in the
3204           <ref table="Interface"/> table for a list of destination MAC
3205           addresses which will not be mirrored to a VLAN to avoid confusing
3206           switches that interpret the protocols that they represent.
3207         </p>
3208         <p><em>Please note:</em> Mirroring to a VLAN can disrupt a network that
3209         contains unmanaged switches.  Consider an unmanaged physical switch
3210         with two ports: port 1, connected to an end host, and port 2,
3211         connected to an Open vSwitch configured to mirror received packets
3212         into VLAN 123 on port 2.  Suppose that the end host sends a packet on
3213         port 1 that the physical switch forwards to port 2.  The Open vSwitch
3214         forwards this packet to its destination and then reflects it back on
3215         port 2 in VLAN 123.  This reflected packet causes the unmanaged
3216         physical switch to replace the MAC learning table entry, which
3217         correctly pointed to port 1, with one that incorrectly points to port
3218         2.  Afterward, the physical switch will direct packets destined for
3219         the end host to the Open vSwitch on port 2, instead of to the end
3220         host on port 1, disrupting connectivity.  If mirroring to a VLAN is
3221         desired in this scenario, then the physical switch must be replaced
3222         by one that learns Ethernet addresses on a per-VLAN basis.  In
3223         addition, learning should be disabled on the VLAN containing mirrored
3224         traffic. If this is not done then intermediate switches will learn
3225         the MAC address of each end host from the mirrored traffic.  If
3226         packets being sent to that end host are also mirrored, then they will
3227         be dropped since the switch will attempt to send them out the input
3228         port. Disabling learning for the VLAN will cause the switch to
3229         correctly send the packet out all ports configured for that VLAN.  If
3230         Open vSwitch is being used as an intermediate switch, learning can be
3231         disabled by adding the mirrored VLAN to <ref column="flood_vlans"/>
3232         in the appropriate <ref table="Bridge"/> table or tables.</p>
3233         <p>
3234           Mirroring to a GRE tunnel has fewer caveats than mirroring to a
3235           VLAN and should generally be preferred.
3236         </p>
3237       </column>
3238     </group>
3239
3240     <group title="Statistics: Mirror counters">
3241       <p>
3242         Key-value pairs that report mirror statistics.  The update period
3243         is controlled by <ref column="other_config"
3244         key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
3245       </p>
3246       <column name="statistics" key="tx_packets">
3247         Number of packets transmitted through this mirror.
3248       </column>
3249       <column name="statistics" key="tx_bytes">
3250         Number of bytes transmitted through this mirror.
3251       </column>
3252     </group>
3253
3254     <group title="Common Columns">
3255       The overall purpose of these columns is described under <code>Common
3256       Columns</code> at the beginning of this document.
3257
3258       <column name="external_ids"/>
3259     </group>
3260   </table>
3261
3262   <table name="Controller" title="OpenFlow controller configuration.">
3263     <p>An OpenFlow controller.</p>
3264
3265     <p>
3266       Open vSwitch supports two kinds of OpenFlow controllers:
3267     </p>
3268
3269     <dl>
3270       <dt>Primary controllers</dt>
3271       <dd>
3272         <p>
3273           This is the kind of controller envisioned by the OpenFlow 1.0
3274           specification.  Usually, a primary controller implements a network
3275           policy by taking charge of the switch's flow table.
3276         </p>
3277
3278         <p>
3279           Open vSwitch initiates and maintains persistent connections to
3280           primary controllers, retrying the connection each time it fails or
3281           drops.  The <ref table="Bridge" column="fail_mode"/> column in the
3282           <ref table="Bridge"/> table applies to primary controllers.
3283         </p>
3284
3285         <p>
3286           Open vSwitch permits a bridge to have any number of primary
3287           controllers.  When multiple controllers are configured, Open
3288           vSwitch connects to all of them simultaneously.  Because
3289           OpenFlow 1.0 does not specify how multiple controllers
3290           coordinate in interacting with a single switch, more than
3291           one primary controller should be specified only if the
3292           controllers are themselves designed to coordinate with each
3293           other.  (The Nicira-defined <code>NXT_ROLE</code> OpenFlow
3294           vendor extension may be useful for this.)
3295         </p>
3296       </dd>
3297       <dt>Service controllers</dt>
3298       <dd>
3299         <p>
3300           These kinds of OpenFlow controller connections are intended for
3301           occasional support and maintenance use, e.g. with
3302           <code>ovs-ofctl</code>.  Usually a service controller connects only
3303           briefly to inspect or modify some of a switch's state.
3304         </p>
3305
3306         <p>
3307           Open vSwitch listens for incoming connections from service
3308           controllers.  The service controllers initiate and, if necessary,
3309           maintain the connections from their end.  The <ref table="Bridge"
3310           column="fail_mode"/> column in the <ref table="Bridge"/> table does
3311           not apply to service controllers.
3312         </p>
3313
3314         <p>
3315           Open vSwitch supports configuring any number of service controllers.
3316         </p>
3317       </dd>
3318     </dl>
3319
3320     <p>
3321       The <ref column="target"/> determines the type of controller.
3322     </p>
3323
3324     <group title="Core Features">
3325       <column name="target">
3326         <p>Connection method for controller.</p>
3327         <p>
3328           The following connection methods are currently supported for primary
3329           controllers:
3330         </p>
3331         <dl>
3332           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
3333           <dd>
3334             <p>The specified SSL <var>port</var> on the host at the
3335             given <var>ip</var>, which must be expressed as an IP
3336             address (not a DNS name).  The <ref table="Open_vSwitch"
3337             column="ssl"/> column in the <ref table="Open_vSwitch"/>
3338             table must point to a valid SSL configuration when this form
3339             is used.</p>
3340             <p>If <var>port</var> is not specified, it currently
3341             defaults to 6633.  In the future, the default will change to
3342             6653, which is the IANA-defined value.</p>
3343             <p>SSL support is an optional feature that is not always built as
3344             part of Open vSwitch.</p>
3345           </dd>
3346           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
3347           <dd>
3348             <p>
3349               The specified TCP <var>port</var> on the host at the given
3350               <var>ip</var>, which must be expressed as an IP address (not a
3351               DNS name), where <var>ip</var> can be IPv4 or IPv6 address.  If
3352               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3353               e.g. <code>tcp:[::1]:6632</code>.
3354             </p>
3355             <p>
3356               If <var>port</var> is not specified, it currently defaults to
3357               6633.  In the future, the default will change to 6653, which is
3358               the IANA-defined value.
3359             </p>
3360           </dd>
3361         </dl>
3362         <p>
3363           The following connection methods are currently supported for service
3364           controllers:
3365         </p>
3366         <dl>
3367           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
3368           <dd>
3369             <p>
3370               Listens for SSL connections on the specified TCP <var>port</var>.
3371               If <var>ip</var>, which must be expressed as an IP address (not a
3372               DNS name), is specified, then connections are restricted to the
3373               specified local IP address (either IPv4 or IPv6).  If
3374               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3375               e.g. <code>pssl:6632:[::1]</code>.
3376             </p>
3377             <p>
3378               If <var>port</var> is not specified, it currently defaults to
3379               6633.  If <var>ip</var> is not specified then it listens only on
3380               IPv4 (but not IPv6) addresses.  The
3381               <ref table="Open_vSwitch" column="ssl"/>
3382               column in the <ref table="Open_vSwitch"/> table must point to a
3383               valid SSL configuration when this form is used.
3384             </p>
3385             <p>
3386               If <var>port</var> is not specified, it currently defaults to
3387               6633.  In the future, the default will change to 6653, which is
3388               the IANA-defined value.
3389             </p>
3390             <p>
3391               SSL support is an optional feature that is not always built as
3392               part of Open vSwitch.
3393             </p>
3394           </dd>
3395           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
3396           <dd>
3397             <p>
3398               Listens for connections on the specified TCP <var>port</var>.  If
3399               <var>ip</var>, which must be expressed as an IP address (not a
3400               DNS name), is specified, then connections are restricted to the
3401               specified local IP address (either IPv4 or IPv6).  If
3402               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3403               e.g. <code>ptcp:6632:[::1]</code>. If <var>ip</var> is not
3404               specified then it listens only on IPv4 addresses.
3405             </p>
3406             <p>
3407               If <var>port</var> is not specified, it currently defaults to
3408               6633.  In the future, the default will change to 6653, which is
3409               the IANA-defined value.
3410             </p>
3411           </dd>
3412         </dl>
3413         <p>When multiple controllers are configured for a single bridge, the
3414         <ref column="target"/> values must be unique.  Duplicate
3415         <ref column="target"/> values yield unspecified results.</p>
3416       </column>
3417
3418       <column name="connection_mode">
3419         <p>If it is specified, this setting must be one of the following
3420         strings that describes how Open vSwitch contacts this OpenFlow
3421         controller over the network:</p>
3422
3423         <dl>
3424           <dt><code>in-band</code></dt>
3425           <dd>In this mode, this controller's OpenFlow traffic travels over the
3426           bridge associated with the controller.  With this setting, Open
3427           vSwitch allows traffic to and from the controller regardless of the
3428           contents of the OpenFlow flow table.  (Otherwise, Open vSwitch
3429           would never be able to connect to the controller, because it did
3430           not have a flow to enable it.)  This is the most common connection
3431           mode because it is not necessary to maintain two independent
3432           networks.</dd>
3433           <dt><code>out-of-band</code></dt>
3434           <dd>In this mode, OpenFlow traffic uses a control network separate
3435           from the bridge associated with this controller, that is, the
3436           bridge does not use any of its own network devices to communicate
3437           with the controller.  The control network must be configured
3438           separately, before or after <code>ovs-vswitchd</code> is started.
3439           </dd>
3440         </dl>
3441
3442         <p>If not specified, the default is implementation-specific.</p>
3443       </column>
3444     </group>
3445
3446     <group title="Controller Failure Detection and Handling">
3447       <column name="max_backoff">
3448         Maximum number of milliseconds to wait between connection attempts.
3449         Default is implementation-specific.
3450       </column>
3451
3452       <column name="inactivity_probe">
3453         Maximum number of milliseconds of idle time on connection to
3454         controller before sending an inactivity probe message.  If Open
3455         vSwitch does not communicate with the controller for the specified
3456         number of seconds, it will send a probe.  If a response is not
3457         received for the same additional amount of time, Open vSwitch
3458         assumes the connection has been broken and attempts to reconnect.
3459         Default is implementation-specific.  A value of 0 disables
3460         inactivity probes.
3461       </column>
3462     </group>
3463
3464     <group title="Asynchronous Messages">
3465       <p>
3466         OpenFlow switches send certain messages to controllers spontanenously,
3467         that is, not in response to any request from the controller.  These
3468         messages are called ``asynchronous messages.''  These columns allow
3469         asynchronous messages to be limited or disabled to ensure the best use
3470         of network resources.
3471       </p>
3472
3473       <column name="enable_async_messages">
3474         The OpenFlow protocol enables asynchronous messages at time of
3475         connection establishment, which means that a controller can receive
3476         asynchronous messages, potentially many of them, even if it turns them
3477         off immediately after connecting.  Set this column to
3478         <code>false</code> to change Open vSwitch behavior to disable, by
3479         default, all asynchronous messages.  The controller can use the
3480         <code>NXT_SET_ASYNC_CONFIG</code> Nicira extension to OpenFlow to turn
3481         on any messages that it does want to receive, if any.
3482       </column>
3483
3484       <group title="Controller Rate Limiting">
3485         <p>
3486           A switch can forward packets to a controller over the OpenFlow
3487           protocol.  Forwarding packets this way at too high a rate can
3488           overwhelm a controller, frustrate use of the OpenFlow connection for
3489           other purposes, increase the latency of flow setup, and use an
3490           unreasonable amount of bandwidth.  Therefore, Open vSwitch supports
3491           limiting the rate of packet forwarding to a controller.
3492         </p>
3493
3494         <p>
3495           There are two main reasons in OpenFlow for a packet to be sent to a
3496           controller: either the packet ``misses'' in the flow table, that is,
3497           there is no matching flow, or a flow table action says to send the
3498           packet to the controller.  Open vSwitch limits the rate of each kind
3499           of packet separately at the configured rate.  Therefore, the actual
3500           rate that packets are sent to the controller can be up to twice the
3501           configured rate, when packets are sent for both reasons.
3502         </p>
3503
3504         <p>
3505           This feature is specific to forwarding packets over an OpenFlow
3506           connection.  It is not general-purpose QoS.  See the <ref
3507           table="QoS"/> table for quality of service configuration, and <ref
3508           column="ingress_policing_rate" table="Interface"/> in the <ref
3509           table="Interface"/> table for ingress policing configuration.
3510         </p>
3511
3512         <column name="controller_rate_limit">
3513           <p>
3514             The maximum rate at which the switch will forward packets to the
3515             OpenFlow controller, in packets per second.  If no value is
3516             specified, rate limiting is disabled.
3517           </p>
3518         </column>
3519
3520         <column name="controller_burst_limit">
3521           <p>
3522             When a high rate triggers rate-limiting, Open vSwitch queues
3523             packets to the controller for each port and transmits them to the
3524             controller at the configured rate.  This value limits the number of
3525             queued packets.  Ports on a bridge share the packet queue fairly.
3526           </p>
3527
3528           <p>
3529             This value has no effect unless <ref
3530             column="controller_rate_limit"/> is configured.  The current
3531             default when this value is not specified is one-quarter of <ref
3532             column="controller_rate_limit"/>, meaning that queuing can delay
3533             forwarding a packet to the controller by up to 250 ms.
3534           </p>
3535         </column>
3536
3537         <group title="Controller Rate Limiting Statistics">
3538           <p>
3539             These values report the effects of rate limiting.  Their values are
3540             relative to establishment of the most recent OpenFlow connection,
3541             or since rate limiting was enabled, whichever happened more
3542             recently.  Each consists of two values, one with <code>TYPE</code>
3543             replaced by <code>miss</code> for rate limiting flow table misses,
3544             and the other with <code>TYPE</code> replaced by
3545             <code>action</code> for rate limiting packets sent by OpenFlow
3546             actions.
3547           </p>
3548
3549           <p>
3550             These statistics are reported only when controller rate limiting is
3551             enabled.
3552           </p>
3553
3554           <column name="status" key="packet-in-TYPE-bypassed"
3555                   type='{"type": "integer", "minInteger": 0}'>
3556             Number of packets sent directly to the controller, without queuing,
3557             because the rate did not exceed the configured maximum.
3558           </column>
3559
3560           <column name="status" key="packet-in-TYPE-queued"
3561                   type='{"type": "integer", "minInteger": 0}'>
3562             Number of packets added to the queue to send later.
3563           </column>
3564
3565           <column name="status" key="packet-in-TYPE-dropped"
3566                   type='{"type": "integer", "minInteger": 0}'>
3567             Number of packets added to the queue that were later dropped due to
3568             overflow.  This value is less than or equal to <ref column="status"
3569             key="packet-in-TYPE-queued"/>.
3570           </column>
3571
3572           <column name="status" key="packet-in-TYPE-backlog"
3573                   type='{"type": "integer", "minInteger": 0}'>
3574             Number of packets currently queued.  The other statistics increase
3575             monotonically, but this one fluctuates between 0 and the <ref
3576             column="controller_burst_limit"/> as conditions change.
3577           </column>
3578         </group>
3579       </group>
3580     </group>
3581
3582     <group title="Additional In-Band Configuration">
3583       <p>These values are considered only in in-band control mode (see
3584       <ref column="connection_mode"/>).</p>
3585
3586       <p>When multiple controllers are configured on a single bridge, there
3587       should be only one set of unique values in these columns.  If different
3588       values are set for these columns in different controllers, the effect
3589       is unspecified.</p>
3590
3591       <column name="local_ip">
3592         The IP address to configure on the local port,
3593         e.g. <code>192.168.0.123</code>.  If this value is unset, then
3594         <ref column="local_netmask"/> and <ref column="local_gateway"/> are
3595         ignored.
3596       </column>
3597
3598       <column name="local_netmask">
3599         The IP netmask to configure on the local port,
3600         e.g. <code>255.255.255.0</code>.  If <ref column="local_ip"/> is set
3601         but this value is unset, then the default is chosen based on whether
3602         the IP address is class A, B, or C.
3603       </column>
3604
3605       <column name="local_gateway">
3606         The IP address of the gateway to configure on the local port, as a
3607         string, e.g. <code>192.168.0.1</code>.  Leave this column unset if
3608         this network has no gateway.
3609       </column>
3610     </group>
3611
3612     <group title="Controller Status">
3613       <column name="is_connected">
3614         <code>true</code> if currently connected to this controller,
3615         <code>false</code> otherwise.
3616       </column>
3617
3618       <column name="role"
3619               type='{"type": "string", "enum": ["set", ["other", "master", "slave"]]}'>
3620         <p>The level of authority this controller has on the associated
3621         bridge. Possible values are:</p>
3622         <dl>
3623           <dt><code>other</code></dt>
3624           <dd>Allows the controller access to all OpenFlow features.</dd>
3625           <dt><code>master</code></dt>
3626           <dd>Equivalent to <code>other</code>, except that there may be at
3627           most one master controller at a time.  When a controller configures
3628           itself as <code>master</code>, any existing master is demoted to
3629           the <code>slave</code> role.</dd>
3630           <dt><code>slave</code></dt>
3631           <dd>Allows the controller read-only access to OpenFlow features.
3632           Attempts to modify the flow table will be rejected with an
3633           error.  Slave controllers do not receive OFPT_PACKET_IN or
3634           OFPT_FLOW_REMOVED messages, but they do receive OFPT_PORT_STATUS
3635           messages.</dd>
3636         </dl>
3637       </column>
3638
3639       <column name="status" key="last_error">
3640         A human-readable description of the last error on the connection
3641         to the controller; i.e. <code>strerror(errno)</code>.  This key
3642         will exist only if an error has occurred.
3643       </column>
3644
3645       <column name="status" key="state"
3646               type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
3647         <p>
3648           The state of the connection to the controller:
3649         </p>
3650         <dl>
3651           <dt><code>VOID</code></dt>
3652           <dd>Connection is disabled.</dd>
3653
3654           <dt><code>BACKOFF</code></dt>
3655           <dd>Attempting to reconnect at an increasing period.</dd>
3656
3657           <dt><code>CONNECTING</code></dt>
3658           <dd>Attempting to connect.</dd>
3659
3660           <dt><code>ACTIVE</code></dt>
3661           <dd>Connected, remote host responsive.</dd>
3662
3663           <dt><code>IDLE</code></dt>
3664           <dd>Connection is idle.  Waiting for response to keep-alive.</dd>
3665         </dl>
3666         <p>
3667           These values may change in the future.  They are provided only for
3668           human consumption.
3669         </p>
3670       </column>
3671
3672       <column name="status" key="sec_since_connect"
3673               type='{"type": "integer", "minInteger": 0}'>
3674         The amount of time since this controller last successfully connected to
3675         the switch (in seconds).  Value is empty if controller has never
3676         successfully connected.
3677       </column>
3678
3679       <column name="status" key="sec_since_disconnect"
3680               type='{"type": "integer", "minInteger": 1}'>
3681         The amount of time since this controller last disconnected from
3682         the switch (in seconds). Value is empty if controller has never
3683         disconnected.
3684       </column>
3685     </group>
3686
3687     <group title="Connection Parameters">
3688       <p>
3689         Additional configuration for a connection between the controller
3690         and the Open vSwitch.
3691       </p>
3692
3693       <column name="other_config" key="dscp"
3694                 type='{"type": "integer"}'>
3695         The Differentiated Service Code Point (DSCP) is specified using 6 bits
3696         in the Type of Service (TOS) field in the IP header. DSCP provides a
3697         mechanism to classify the network traffic and provide Quality of
3698         Service (QoS) on IP networks.
3699
3700         The DSCP value specified here is used when establishing the connection
3701         between the controller and the Open vSwitch.  If no value is specified,
3702         a default value of 48 is chosen.  Valid DSCP values must be in the
3703         range 0 to 63.
3704       </column>
3705     </group>
3706
3707
3708     <group title="Common Columns">
3709       The overall purpose of these columns is described under <code>Common
3710       Columns</code> at the beginning of this document.
3711
3712       <column name="external_ids"/>
3713       <column name="other_config"/>
3714     </group>
3715   </table>
3716
3717   <table name="Manager" title="OVSDB management connection.">
3718     <p>
3719       Configuration for a database connection to an Open vSwitch database
3720       (OVSDB) client.
3721     </p>
3722
3723     <p>
3724       This table primarily configures the Open vSwitch database
3725       (<code>ovsdb-server</code>), not the Open vSwitch switch
3726       (<code>ovs-vswitchd</code>).  The switch does read the table to determine
3727       what connections should be treated as in-band.
3728     </p>
3729
3730     <p>
3731       The Open vSwitch database server can initiate and maintain active
3732       connections to remote clients.  It can also listen for database
3733       connections.
3734     </p>
3735
3736     <group title="Core Features">
3737       <column name="target">
3738         <p>Connection method for managers.</p>
3739         <p>
3740           The following connection methods are currently supported:
3741         </p>
3742         <dl>
3743           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
3744           <dd>
3745             <p>
3746               The specified SSL <var>port</var> on the host at the given
3747               <var>ip</var>, which must be expressed as an IP address
3748               (not a DNS name).  The <ref table="Open_vSwitch"
3749               column="ssl"/> column in the <ref table="Open_vSwitch"/>
3750               table must point to a valid SSL configuration when this
3751               form is used.
3752             </p>
3753             <p>
3754               If <var>port</var> is not specified, it currently defaults
3755               to 6632.  In the future, the default will change to 6640,
3756               which is the IANA-defined value.
3757             </p>
3758             <p>
3759               SSL support is an optional feature that is not always
3760               built as part of Open vSwitch.
3761             </p>
3762           </dd>
3763
3764           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
3765           <dd>
3766             <p>
3767               The specified TCP <var>port</var> on the host at the given
3768               <var>ip</var>, which must be expressed as an IP address (not a
3769               DNS name), where <var>ip</var> can be IPv4 or IPv6 address.  If
3770               <var>ip</var> is an IPv6 address, wrap it in square brackets,
3771               e.g. <code>tcp:[::1]:6632</code>.
3772             </p>
3773             <p>
3774               If <var>port</var> is not specified, it currently defaults
3775               to 6632.  In the future, the default will change to 6640,
3776               which is the IANA-defined value.
3777             </p>
3778           </dd>
3779           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
3780           <dd>
3781             <p>
3782               Listens for SSL connections on the specified TCP <var>port</var>.
3783               Specify 0 for <var>port</var> to have the kernel automatically
3784               choose an available port.  If <var>ip</var>, which must be
3785               expressed as an IP address (not a DNS name), is specified, then
3786               connections are restricted to the specified local IP address
3787               (either IPv4 or IPv6 address).  If <var>ip</var> is an IPv6
3788               address, wrap in square brackets,
3789               e.g. <code>pssl:6632:[::1]</code>.  If <var>ip</var> is not
3790               specified then it listens only on IPv4 (but not IPv6) addresses.
3791               The <ref table="Open_vSwitch" column="ssl"/> column in the <ref
3792               table="Open_vSwitch"/> table must point to a valid SSL
3793               configuration when this form is used.
3794             </p>
3795             <p>
3796               If <var>port</var> is not specified, it currently defaults
3797               to 6632.  In the future, the default will change to 6640,
3798               which is the IANA-defined value.
3799             </p>
3800             <p>
3801               SSL support is an optional feature that is not always built as
3802               part of Open vSwitch.
3803             </p>
3804           </dd>
3805           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
3806           <dd>
3807             <p>
3808               Listens for connections on the specified TCP <var>port</var>.
3809               Specify 0 for <var>port</var> to have the kernel automatically
3810               choose an available port.  If <var>ip</var>, which must be
3811               expressed as an IP address (not a DNS name), is specified, then
3812               connections are restricted to the specified local IP address
3813               (either IPv4 or IPv6 address).  If <var>ip</var> is an IPv6
3814               address, wrap it in square brackets,
3815               e.g. <code>ptcp:6632:[::1]</code>.  If <var>ip</var> is not
3816               specified then it listens only on IPv4 addresses.
3817             </p>
3818             <p>
3819               If <var>port</var> is not specified, it currently defaults
3820               to 6632.  In the future, the default will change to 6640,
3821               which is the IANA-defined value.
3822             </p>
3823           </dd>
3824         </dl>
3825         <p>When multiple managers are configured, the <ref column="target"/>
3826         values must be unique.  Duplicate <ref column="target"/> values yield
3827         unspecified results.</p>
3828       </column>
3829
3830       <column name="connection_mode">
3831         <p>
3832           If it is specified, this setting must be one of the following strings
3833           that describes how Open vSwitch contacts this OVSDB client over the
3834           network:
3835         </p>
3836
3837         <dl>
3838           <dt><code>in-band</code></dt>
3839           <dd>
3840             In this mode, this connection's traffic travels over a bridge
3841             managed by Open vSwitch.  With this setting, Open vSwitch allows
3842             traffic to and from the client regardless of the contents of the
3843             OpenFlow flow table.  (Otherwise, Open vSwitch would never be able
3844             to connect to the client, because it did not have a flow to enable
3845             it.)  This is the most common connection mode because it is not
3846             necessary to maintain two independent networks.
3847           </dd>
3848           <dt><code>out-of-band</code></dt>
3849           <dd>
3850             In this mode, the client's traffic uses a control network separate
3851             from that managed by Open vSwitch, that is, Open vSwitch does not
3852             use any of its own network devices to communicate with the client.
3853             The control network must be configured separately, before or after
3854             <code>ovs-vswitchd</code> is started.
3855           </dd>
3856         </dl>
3857
3858         <p>
3859           If not specified, the default is implementation-specific.
3860         </p>
3861       </column>
3862     </group>
3863
3864     <group title="Client Failure Detection and Handling">
3865       <column name="max_backoff">
3866         Maximum number of milliseconds to wait between connection attempts.
3867         Default is implementation-specific.
3868       </column>
3869
3870       <column name="inactivity_probe">
3871         Maximum number of milliseconds of idle time on connection to the client
3872         before sending an inactivity probe message.  If Open vSwitch does not
3873         communicate with the client for the specified number of seconds, it
3874         will send a probe.  If a response is not received for the same
3875         additional amount of time, Open vSwitch assumes the connection has been
3876         broken and attempts to reconnect.  Default is implementation-specific.
3877         A value of 0 disables inactivity probes.
3878       </column>
3879     </group>
3880
3881     <group title="Status">
3882       <column name="is_connected">
3883         <code>true</code> if currently connected to this manager,
3884         <code>false</code> otherwise.
3885       </column>
3886
3887       <column name="status" key="last_error">
3888         A human-readable description of the last error on the connection
3889         to the manager; i.e. <code>strerror(errno)</code>.  This key
3890         will exist only if an error has occurred.
3891       </column>
3892
3893       <column name="status" key="state"
3894               type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
3895         <p>
3896           The state of the connection to the manager:
3897         </p>
3898         <dl>
3899           <dt><code>VOID</code></dt>
3900           <dd>Connection is disabled.</dd>
3901
3902           <dt><code>BACKOFF</code></dt>
3903           <dd>Attempting to reconnect at an increasing period.</dd>
3904
3905           <dt><code>CONNECTING</code></dt>
3906           <dd>Attempting to connect.</dd>
3907
3908           <dt><code>ACTIVE</code></dt>
3909           <dd>Connected, remote host responsive.</dd>
3910
3911           <dt><code>IDLE</code></dt>
3912           <dd>Connection is idle.  Waiting for response to keep-alive.</dd>
3913         </dl>
3914         <p>
3915           These values may change in the future.  They are provided only for
3916           human consumption.
3917         </p>
3918       </column>
3919
3920       <column name="status" key="sec_since_connect"
3921               type='{"type": "integer", "minInteger": 0}'>
3922         The amount of time since this manager last successfully connected
3923         to the database (in seconds). Value is empty if manager has never
3924         successfully connected.
3925       </column>
3926
3927       <column name="status" key="sec_since_disconnect"
3928               type='{"type": "integer", "minInteger": 0}'>
3929         The amount of time since this manager last disconnected from the
3930         database (in seconds). Value is empty if manager has never
3931         disconnected.
3932       </column>
3933
3934       <column name="status" key="locks_held">
3935         Space-separated list of the names of OVSDB locks that the connection
3936         holds.  Omitted if the connection does not hold any locks.
3937       </column>
3938
3939       <column name="status" key="locks_waiting">
3940         Space-separated list of the names of OVSDB locks that the connection is
3941         currently waiting to acquire.  Omitted if the connection is not waiting
3942         for any locks.
3943       </column>
3944
3945       <column name="status" key="locks_lost">
3946         Space-separated list of the names of OVSDB locks that the connection
3947         has had stolen by another OVSDB client.  Omitted if no locks have been
3948         stolen from this connection.
3949       </column>
3950
3951       <column name="status" key="n_connections"
3952               type='{"type": "integer", "minInteger": 2}'>
3953         <p>
3954           When <ref column="target"/> specifies a connection method that
3955           listens for inbound connections (e.g. <code>ptcp:</code> or
3956           <code>pssl:</code>) and more than one connection is actually active,
3957           the value is the number of active connections.  Otherwise, this
3958           key-value pair is omitted.
3959         </p>
3960         <p>
3961           When multiple connections are active, status columns and key-value
3962           pairs (other than this one) report the status of one arbitrarily
3963           chosen connection.
3964         </p>
3965       </column>
3966
3967       <column name="status" key="bound_port" type='{"type": "integer"}'>
3968           When <ref column="target"/> is <code>ptcp:</code> or
3969           <code>pssl:</code>, this is the TCP port on which the OVSDB server is
3970           listening.  (This is is particularly useful when <ref
3971           column="target"/> specifies a port of 0, allowing the kernel to
3972           choose any available port.)
3973       </column>
3974     </group>
3975
3976     <group title="Connection Parameters">
3977       <p>
3978         Additional configuration for a connection between the manager
3979         and the Open vSwitch Database.
3980       </p>
3981
3982       <column name="other_config" key="dscp"
3983                 type='{"type": "integer"}'>
3984         The Differentiated Service Code Point (DSCP) is specified using 6 bits
3985         in the Type of Service (TOS) field in the IP header. DSCP provides a
3986         mechanism to classify the network traffic and provide Quality of
3987         Service (QoS) on IP networks.
3988
3989         The DSCP value specified here is used when establishing the connection
3990         between the manager and the Open vSwitch.  If no value is specified, a
3991         default value of 48 is chosen.  Valid DSCP values must be in the range
3992         0 to 63.
3993       </column>
3994     </group>
3995
3996     <group title="Common Columns">
3997       The overall purpose of these columns is described under <code>Common
3998       Columns</code> at the beginning of this document.
3999
4000       <column name="external_ids"/>
4001       <column name="other_config"/>
4002     </group>
4003   </table>
4004
4005   <table name="NetFlow">
4006     A NetFlow target.  NetFlow is a protocol that exports a number of
4007     details about terminating IP flows, such as the principals involved
4008     and duration.
4009
4010     <column name="targets">
4011       NetFlow targets in the form
4012       <code><var>ip</var>:<var>port</var></code>.  The <var>ip</var>
4013       must be specified numerically, not as a DNS name.
4014     </column>
4015
4016     <column name="engine_id">
4017       Engine ID to use in NetFlow messages.  Defaults to datapath index
4018       if not specified.
4019     </column>
4020
4021     <column name="engine_type">
4022       Engine type to use in NetFlow messages.  Defaults to datapath
4023       index if not specified.
4024     </column>
4025
4026     <column name="active_timeout">
4027       The interval at which NetFlow records are sent for flows that are
4028       still active, in seconds.  A value of <code>0</code> requests the
4029       default timeout (currently 600 seconds); a value of <code>-1</code>
4030       disables active timeouts.
4031     </column>
4032
4033     <column name="add_id_to_interface">
4034       <p>If this column's value is <code>false</code>, the ingress and egress
4035       interface fields of NetFlow flow records are derived from OpenFlow port
4036       numbers.  When it is <code>true</code>, the 7 most significant bits of
4037       these fields will be replaced by the least significant 7 bits of the
4038       engine id.  This is useful because many NetFlow collectors do not
4039       expect multiple switches to be sending messages from the same host, so
4040       they do not store the engine information which could be used to
4041       disambiguate the traffic.</p>
4042       <p>When this option is enabled, a maximum of 508 ports are supported.</p>
4043     </column>
4044
4045     <group title="Common Columns">
4046       The overall purpose of these columns is described under <code>Common
4047       Columns</code> at the beginning of this document.
4048
4049       <column name="external_ids"/>
4050     </group>
4051   </table>
4052
4053   <table name="SSL">
4054     SSL configuration for an Open_vSwitch.
4055
4056     <column name="private_key">
4057       Name of a PEM file containing the private key used as the switch's
4058       identity for SSL connections to the controller.
4059     </column>
4060
4061     <column name="certificate">
4062       Name of a PEM file containing a certificate, signed by the
4063       certificate authority (CA) used by the controller and manager,
4064       that certifies the switch's private key, identifying a trustworthy
4065       switch.
4066     </column>
4067
4068     <column name="ca_cert">
4069       Name of a PEM file containing the CA certificate used to verify
4070       that the switch is connected to a trustworthy controller.
4071     </column>
4072
4073     <column name="bootstrap_ca_cert">
4074       If set to <code>true</code>, then Open vSwitch will attempt to
4075       obtain the CA certificate from the controller on its first SSL
4076       connection and save it to the named PEM file. If it is successful,
4077       it will immediately drop the connection and reconnect, and from then
4078       on all SSL connections must be authenticated by a certificate signed
4079       by the CA certificate thus obtained.  <em>This option exposes the
4080       SSL connection to a man-in-the-middle attack obtaining the initial
4081       CA certificate.</em>  It may still be useful for bootstrapping.
4082     </column>
4083
4084     <group title="Common Columns">
4085       The overall purpose of these columns is described under <code>Common
4086       Columns</code> at the beginning of this document.
4087
4088       <column name="external_ids"/>
4089     </group>
4090   </table>
4091
4092   <table name="sFlow">
4093     <p>A set of sFlow(R) targets.  sFlow is a protocol for remote
4094     monitoring of switches.</p>
4095
4096     <column name="agent">
4097       Name of the network device whose IP address should be reported as the
4098       ``agent address'' to collectors.  If not specified, the agent device is
4099       figured from the first target address and the routing table.  If the
4100       routing table does not contain a route to the target, the IP address
4101       defaults to the <ref table="Controller" column="local_ip"/> in the
4102       collector's <ref table="Controller"/>.  If an agent IP address cannot be
4103       determined any of these ways, sFlow is disabled.
4104     </column>
4105
4106     <column name="header">
4107       Number of bytes of a sampled packet to send to the collector.
4108       If not specified, the default is 128 bytes.
4109     </column>
4110
4111     <column name="polling">
4112       Polling rate in seconds to send port statistics to the collector.
4113       If not specified, defaults to 30 seconds.
4114     </column>
4115
4116     <column name="sampling">
4117       Rate at which packets should be sampled and sent to the collector.
4118       If not specified, defaults to 400, which means one out of 400
4119       packets, on average, will be sent to the collector.
4120     </column>
4121
4122     <column name="targets">
4123       sFlow targets in the form
4124       <code><var>ip</var>:<var>port</var></code>.
4125     </column>
4126
4127     <group title="Common Columns">
4128       The overall purpose of these columns is described under <code>Common
4129       Columns</code> at the beginning of this document.
4130
4131       <column name="external_ids"/>
4132     </group>
4133   </table>
4134
4135   <table name="IPFIX">
4136     <p>Configuration for sending packets to IPFIX collectors.</p>
4137
4138     <p>
4139       IPFIX is a protocol that exports a number of details about flows.  The
4140       IPFIX implementation in Open vSwitch samples packets at a configurable
4141       rate, extracts flow information from those packets, optionally caches and
4142       aggregates the flow information, and sends the result to one or more
4143       collectors.
4144     </p>
4145
4146     <p>
4147       IPFIX in Open vSwitch can be configured two different ways:
4148     </p>
4149
4150     <ul>
4151       <li>
4152         With <em>per-bridge sampling</em>, Open vSwitch performs IPFIX sampling
4153         automatically on all packets that pass through a bridge.  To configure
4154         per-bridge sampling, create an <ref table="IPFIX"/> record and point a
4155         <ref table="Bridge"/> table's <ref table="Bridge" column="ipfix"/>
4156         column to it.  The <ref table="Flow_Sample_Collector_Set"/> table is
4157         not used for per-bridge sampling.
4158       </li>
4159
4160       <li>
4161         <p>
4162           With <em>flow-based sampling</em>, <code>sample</code> actions in the
4163           OpenFlow flow table drive IPFIX sampling.  See
4164           <code>ovs-ofctl</code>(8) for a description of the
4165           <code>sample</code> action.
4166         </p>
4167
4168         <p>
4169           Flow-based sampling also requires database configuration: create a
4170           <ref table="IPFIX"/> record that describes the IPFIX configuration
4171           and a <ref table="Flow_Sample_Collector_Set"/> record that points to
4172           the <ref table="Bridge"/> whose flow table holds the
4173           <code>sample</code> actions and to <ref table="IPFIX"/> record.  The
4174           <ref table="Bridge" column="ipfix"/> in the <ref table="Bridge"/>
4175           table is not used for flow-based sampling.
4176         </p>
4177       </li>
4178     </ul>
4179
4180     <column name="targets">
4181       IPFIX target collectors in the form
4182       <code><var>ip</var>:<var>port</var></code>.
4183     </column>
4184
4185     <column name="cache_active_timeout">
4186       The maximum period in seconds for which an IPFIX flow record is
4187       cached and aggregated before being sent.  If not specified,
4188       defaults to 0.  If 0, caching is disabled.
4189     </column>
4190
4191     <column name="cache_max_flows">
4192       The maximum number of IPFIX flow records that can be cached at a
4193       time.  If not specified, defaults to 0.  If 0, caching is
4194       disabled.
4195     </column>
4196
4197     <group title="Per-Bridge Sampling">
4198       <p>
4199         These values affect only per-bridge sampling.  See above for a
4200         description of the differences between per-bridge and flow-based
4201         sampling.
4202       </p>
4203
4204       <column name="sampling">
4205         The rate at which packets should be sampled and sent to each target
4206         collector.  If not specified, defaults to 400, which means one out of
4207         400 packets, on average, will be sent to each target collector.
4208       </column>
4209
4210       <column name="obs_domain_id">
4211         The IPFIX Observation Domain ID sent in each IPFIX packet.  If not
4212         specified, defaults to 0.
4213       </column>
4214
4215       <column name="obs_point_id">
4216         The IPFIX Observation Point ID sent in each IPFIX flow record.  If not
4217         specified, defaults to 0.
4218       </column>
4219
4220       <column name="other_config" key="enable-tunnel-sampling"
4221               type='{"type": "boolean"}'>
4222         <p>
4223           Set to <code>true</code> to enable sampling and reporting tunnel
4224           header 7-tuples in IPFIX flow records.  Tunnel sampling is disabled
4225           by default.
4226         </p>
4227
4228         <p>
4229           The following enterprise entities report the sampled tunnel info:
4230         </p>
4231
4232         <dl>
4233           <dt>tunnelType:</dt>
4234           <dd>
4235             <p>ID: 891, and enterprise ID 6876 (VMware).</p>
4236             <p>type: unsigned 8-bit integer.</p>
4237             <p>data type semantics: identifier.</p>
4238             <p>description: Identifier of the layer 2 network overlay network
4239             encapsulation type: 0x01 VxLAN, 0x02 GRE, 0x03 LISP, 0x05 IPsec+GRE,
4240             0x07 GENEVE.</p>
4241           </dd>
4242           <dt>tunnelKey:</dt>
4243           <dd>
4244             <p>ID: 892, and enterprise ID 6876 (VMware).</p>
4245             <p>type: variable-length octetarray.</p>
4246             <p>data type semantics: identifier.</p>
4247             <p>description: Key which is used for identifying an individual
4248             traffic flow within a VxLAN (24-bit VNI), GENEVE (24-bit VNI),
4249             GRE (32- or 64-bit key), or LISP (24-bit instance ID) tunnel. The
4250             key is encoded in this octetarray as a 3-, 4-, or 8-byte integer
4251             ID in network byte order.</p>
4252           </dd>
4253           <dt>tunnelSourceIPv4Address:</dt>
4254           <dd>
4255             <p>ID: 893, and enterprise ID 6876 (VMware).</p>
4256             <p>type: unsigned 32-bit integer.</p>
4257             <p>data type semantics: identifier.</p>
4258             <p>description: The IPv4 source address in the tunnel IP packet
4259             header.</p>
4260           </dd>
4261           <dt>tunnelDestinationIPv4Address:</dt>
4262           <dd>
4263             <p>ID: 894, and enterprise ID 6876 (VMware).</p>
4264             <p>type: unsigned 32-bit integer.</p>
4265             <p>data type semantics: identifier.</p>
4266             <p>description: The IPv4 destination address in the tunnel IP
4267             packet header.</p>
4268           </dd>
4269           <dt>tunnelProtocolIdentifier:</dt>
4270           <dd>
4271             <p>ID: 895, and enterprise ID 6876 (VMware).</p>
4272             <p>type: unsigned 8-bit integer.</p>
4273             <p>data type semantics: identifier.</p>
4274             <p>description: The value of the protocol number in the tunnel
4275             IP packet header. The protocol number identifies the tunnel IP
4276             packet payload type.</p>
4277           </dd>
4278           <dt>tunnelSourceTransportPort:</dt>
4279           <dd>
4280             <p>ID: 896, and enterprise ID 6876 (VMware).</p>
4281             <p>type: unsigned 16-bit integer.</p>
4282             <p>data type semantics: identifier.</p>
4283             <p>description: The source port identifier in the tunnel transport
4284             header. For the transport protocols UDP, TCP, and SCTP, this is
4285             the source port number given in the respective header.</p>
4286           </dd>
4287           <dt>tunnelDestinationTransportPort:</dt>
4288           <dd>
4289             <p>ID: 897, and enterprise ID 6876 (VMware).</p>
4290             <p>type: unsigned 16-bit integer.</p>
4291             <p>data type semantics: identifier.</p>
4292             <p>description: The destination port identifier in the tunnel
4293             transport header. For the transport protocols UDP, TCP, and SCTP,
4294             this is the destination port number given in the respective header.
4295             </p>
4296           </dd>
4297         </dl>
4298       </column>
4299
4300       <column name="other_config" key="enable-input-sampling"
4301               type='{"type": "boolean"}'>
4302         By default, Open vSwitch samples and reports flows at bridge port input
4303         in IPFIX flow records.  Set this column to <code>false</code> to
4304         disable input sampling.
4305       </column>
4306
4307       <column name="other_config" key="enable-output-sampling"
4308               type='{"type": "boolean"}'>
4309         By default, Open vSwitch samples and reports flows at bridge port
4310         output in IPFIX flow records.  Set this column to <code>false</code> to
4311         disable output sampling.
4312       </column>
4313     </group>
4314
4315     <group title="Common Columns">
4316       The overall purpose of these columns is described under <code>Common
4317       Columns</code> at the beginning of this document.
4318
4319       <column name="external_ids"/>
4320     </group>
4321   </table>
4322
4323   <table name="Flow_Sample_Collector_Set">
4324     <p>
4325       A set of IPFIX collectors of packet samples generated by OpenFlow
4326       <code>sample</code> actions.  This table is used only for IPFIX
4327       flow-based sampling, not for per-bridge sampling (see the <ref
4328       table="IPFIX"/> table for a description of the two forms).
4329     </p>
4330
4331     <column name="id">
4332       The ID of this collector set, unique among the bridge's
4333       collector sets, to be used as the <code>collector_set_id</code>
4334       in OpenFlow <code>sample</code> actions.
4335     </column>
4336
4337     <column name="bridge">
4338       The bridge into which OpenFlow <code>sample</code> actions can
4339       be added to send packet samples to this set of IPFIX collectors.
4340     </column>
4341
4342     <column name="ipfix">
4343       Configuration of the set of IPFIX collectors to send one flow
4344       record per sampled packet to.
4345     </column>
4346
4347     <group title="Common Columns">
4348       The overall purpose of these columns is described under <code>Common
4349       Columns</code> at the beginning of this document.
4350
4351       <column name="external_ids"/>
4352     </group>
4353   </table>
4354
4355 </database>