ovs-vswitchd: Export system stats through Open_vSwitch table.
[sliver-openvswitch.git] / vswitchd / vswitch.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <database title="Open vSwitch Configuration Database">
3   <p>A database with this schema holds the configuration for one Open
4     vSwitch daemon.  The root of the configuration for the daemon is
5     the <ref table="Open_vSwitch"/> table, which must have exactly one
6     record.  Records in other tables are significant only when they
7     can be reached directly or indirectly from the
8     <ref table="Open_vSwitch"/> table.</p>
9
10   <table name="Open_vSwitch" title="Open vSwitch configuration.">
11     Configuration for an Open vSwitch daemon.  There must be exactly one record
12     in the <ref table="Open_vSwitch"/> table.
13
14     <group title="Configuration">
15       <column name="bridges">
16         Set of bridges managed by the daemon.
17       </column>
18
19       <column name="managers">
20         Remote database clients to which the Open vSwitch's database server
21         should connect or to which it should listen.
22       </column>
23
24       <column name="ssl">
25         SSL used globally by the daemon.
26       </column>
27
28       <column name="external_ids">
29         Key-value pairs for use by external frameworks that integrate
30         with Open vSwitch, rather than by Open vSwitch itself.  System
31         integrators should either use the Open vSwitch development
32         mailing list to coordinate on common key-value definitions, or
33         choose key names that are likely to be unique.  The currently
34         defined common key-value pairs are:
35         <dl>
36           <dt><code>system-type</code></dt>
37           <dd>An identifier for the switch type, such as
38             <code>XenServer</code> or <code>KVM</code>.</dd>
39           <dt><code>system-version</code></dt>
40           <dd>The version of the switch software, such as
41             <code>5.6.0</code> on XenServer.</dd>
42           <dt><code>system-id</code></dt>
43           <dd>A unique identifier for the Open vSwitch's physical host.
44             The form of the identifier depends on the type of the host.
45             On a Citrix XenServer, this will likely be the same as
46             <code>xs-system-uuid</code>.</dd>
47           <dt><code>xs-system-uuid</code></dt>
48           <dd>The Citrix XenServer universally unique identifier for the
49             physical host as displayed by <code>xe host-list</code>.</dd>
50         </dl>
51       </column>
52     </group>
53
54     <group title="Status">
55       <column name="next_cfg">
56         Sequence number for client to increment.  When a client modifies
57         any part of the database configuration and wishes to wait for
58         Open vSwitch to finish applying the changes, it may increment
59         this sequence number.
60       </column>
61
62       <column name="cur_cfg">
63         Sequence number that Open vSwitch sets to the current value of
64         <ref column="next_cfg"/> after it finishes applying a set of
65         configuration changes.
66       </column>
67
68       <column name="capabilities">
69         Describes functionality supported by the hardware and software platform
70         on which this Open vSwitch is based.  Clients should not modify this
71         column.  See the <ref table="Capability"/> description for defined
72         capability categories and the meaning of associated
73         <ref table="Capability"/> records.
74       </column>
75
76       <column name="statistics">
77         <p>
78           Key-value pairs that report statistics about a system running an Open
79           vSwitch.  These are updated periodically (currently, every 5
80           seconds).  Key-value pairs that cannot be determined or that do not
81           apply to a platform are omitted.
82         </p>
83
84         <dl>
85           <dt><code>cpu</code></dt>
86           <dd>
87             <p>
88               Number of CPU processors, threads, or cores currently online and
89               available to the operating system on which Open vSwitch is
90               running, as an integer.  This may be less than the number
91               installed, if some are not online or if they are not available to
92               the operating system.
93             </p>
94             <p>
95               Open vSwitch userspace processes are not multithreaded, but the
96               Linux kernel-based datapath is.
97             </p>
98           </dd>
99
100           <dt><code>load_average</code></dt>
101           <dd>
102             <p>
103               A comma-separated list of three floating-point numbers,
104               representing the system load average over the last 1, 5, and 15
105               minutes, respectively.
106             </p>
107           </dd>
108
109           <dt><code>memory</code></dt>
110           <dd>
111             <p>
112               A comma-separated list of integers, each of which represents a
113               quantity of memory in kilobytes that describes the operating
114               system on which Open vSwitch is running.  In respective order,
115               these values are:
116             </p>
117
118             <ol>
119               <li>Total amount of RAM allocated to the OS.</li>
120               <li>RAM allocated to the OS that is in use.</li>
121               <li>RAM that can be flushed out to disk or otherwise discarded
122               if that space is needed for another purpose.  This number is
123               necessarily less than or equal to the previous value.</li>
124               <li>Total disk space allocated for swap.</li>
125               <li>Swap space currently in use.</li>
126             </ol>
127
128             <p>
129               On Linux, all five values can be determined and are included.  On
130               other operating systems, only the first two values can be
131               determined, so the list will only have two values.
132             </p>
133           </dd>
134
135           <dt><code>process_</code><var>name</var></dt>
136           <dd>
137             <p>
138               One such key-value pair will exist for each running Open vSwitch
139               daemon process, with <var>name</var> replaced by the daemon's
140               name (e.g. <code>process_ovs-vswitchd</code>).  The value is a
141               comma-separated list of integers.  The integers represent the
142               following, with memory measured in kilobytes and durations in
143               milliseconds:
144             </p>
145
146             <ol>
147               <li>The process's virtual memory size.</li>
148               <li>The process's resident set size.</li>
149               <li>The amount of user and system CPU time consumed by the
150               process.</li>
151               <li>The number of times that the process has crashed and been
152               automatically restarted by the monitor.</li>
153               <li>The duration since the process was started.</li>
154               <li>The duration for which the process has been running.</li>
155             </ol>
156
157             <p>
158               The interpretation of some of these values depends on whether the
159               process was started with the <option>--monitor</option>.  If it
160               was not, then the crash count will always be 0 and the two
161               durations will always be the same.  If <option>--monitor</option>
162               was given, then the crash count may be positive; if it is, the
163               latter duration is the amount of time since the most recent crash
164               and restart.
165             </p>
166
167             <p>
168               There will be one key-value pair for each file in Open vSwitch's
169               ``run directory'' (usually <code>/var/run/openvswitch</code>)
170               whose name ends in <code>.pid</code>, whose contents are a
171               process ID, and which is locked by a running process.  The
172               <var>name</var> is taken from the pidfile's name.
173             </p>
174
175             <p>
176               Currently Open vSwitch is only able to obtain all of the above
177               detail on Linux systems.  On other systems, the same key-value
178               pairs will be present but the values will always be the empty
179               string.
180             </p>
181           </dd>
182
183           <dt><code>file_systems</code></dt>
184           <dd>
185             <p>
186               A space-separated list of information on local, writable file
187               systems.  Each item in the list describes one file system and
188               consists in turn of a comma-separated list of the following:
189             </p>
190
191             <ol>
192               <li>Mount point, e.g. <code>/</code> or <code>/var/log</code>.
193               Any spaces or commas in the mount point are replaced by
194               underscores.</li>
195               <li>Total size, in kilobytes, as an integer.</li>
196               <li>Amount of storage in use, in kilobytes, as an integer.</li>
197             </ol>
198
199             <p>
200               This key-value pair is omitted if there are no local, writable
201               file systems or if Open vSwitch cannot obtain the needed
202               information.
203             </p>
204           </dd>
205         </dl>
206       </column>
207     </group>
208   </table>
209
210   <table name="Bridge">
211     <p>
212       Configuration for a bridge within an
213       <ref table="Open_vSwitch"/>.
214     </p>
215     <p>
216       A <ref table="Bridge"/> record represents an Ethernet switch with one or
217       more ``ports,'' which are the <ref table="Port"/> records pointed to by
218       the <ref table="Bridge"/>'s <ref column="ports"/> column.
219     </p>
220
221     <group title="Core Features">
222       <column name="name">
223         Bridge identifier.  Should be alphanumeric and no more than about 8
224         bytes long.  Must be unique among the names of ports, interfaces, and
225         bridges on a host.
226       </column>
227
228       <column name="ports">
229         Ports included in the bridge.
230       </column>
231
232       <column name="mirrors">
233         Port mirroring configuration.
234       </column>
235
236       <column name="netflow">
237         NetFlow configuration.
238       </column>
239
240       <column name="sflow">
241         sFlow configuration.
242       </column>
243
244       <column name="flood_vlans">
245         VLAN IDs of VLANs on which MAC address learning should be disabled, so
246         that packets are flooded instead of being sent to specific ports that
247         are believed to contain packets' destination MACs.  This should
248         ordinarily be used to disable MAC learning on VLANs used for mirroring
249         (RSPAN VLANs).  It may also be useful for debugging.
250       </column>
251     </group>
252
253     <group title="OpenFlow Configuration">
254       <column name="controller">
255         OpenFlow controller set.  If unset, then no OpenFlow controllers
256         will be used.
257       </column>
258
259       <column name="fail_mode">
260         <p>When a controller is configured, it is, ordinarily, responsible
261           for setting up all flows on the switch.  Thus, if the connection to
262           the controller fails, no new network connections can be set up.
263           If the connection to the controller stays down long enough,
264           no packets can pass through the switch at all.  This setting
265           determines the switch's response to such a situation.  It may be set
266           to one of the following:
267           <dl>
268             <dt><code>standalone</code></dt>
269             <dd>If no message is received from the controller for three
270               times the inactivity probe interval
271               (see <ref column="inactivity_probe"/>), then Open vSwitch
272               will take over responsibility for setting up flows.  In
273               this mode, Open vSwitch causes the bridge to act like an
274               ordinary MAC-learning switch.  Open vSwitch will continue
275               to retry connecting to the controller in the background
276               and, when the connection succeeds, it will discontinue its
277               standalone behavior.</dd>
278             <dt><code>secure</code></dt>
279             <dd>Open vSwitch will not set up flows on its own when the
280               controller connection fails or when no controllers are
281               defined.  The bridge will continue to retry connecting to
282               any defined controllers forever.</dd>
283           </dl>
284         </p>
285         <p>If this value is unset, the default is implementation-specific.</p>
286         <p>When more than one controller is configured, 
287           <ref column="fail_mode"/> is considered only when none of the
288           configured controllers can be contacted.</p>
289       </column>
290
291       <column name="datapath_id">
292         Reports the OpenFlow datapath ID in use.  Exactly 16 hex
293         digits.  (Setting this column will have no useful effect.  Set
294         <ref column="other_config"/>:<code>other-config</code>
295         instead.)
296       </column>
297     </group>
298
299     <group title="Other Features">
300       <column name="datapath_type">
301         Name of datapath provider.  The kernel datapath has
302         type <code>system</code>.  The userspace datapath has
303         type <code>netdev</code>.
304       </column>
305
306       <column name="external_ids">
307         Key-value pairs for use by external frameworks that integrate
308         with Open vSwitch, rather than by Open vSwitch itself.  System
309         integrators should either use the Open vSwitch development
310         mailing list to coordinate on common key-value definitions, or
311         choose key names that are likely to be unique.  The currently
312         defined key-value pairs are:
313         <dl>
314           <dt><code>bridge-id</code></dt>
315           <dd>A unique identifier of the bridge.  On Citrix XenServer this 
316             will commonly be the same as <code>xs-network-uuids</code>.</dd>
317           <dt><code>xs-network-uuids</code></dt>
318           <dd>Semicolon-delimited set of universally unique identifier(s) for
319             the network with which this bridge is associated on a Citrix
320             XenServer host.  The network identifiers are RFC 4122 UUIDs as
321             displayed by, e.g., <code>xe network-list</code>.</dd>
322         </dl>
323       </column>
324
325       <column name="other_config">
326         Key-value pairs for configuring rarely used bridge
327         features.  The currently defined key-value pairs are:
328         <dl>
329           <dt><code>datapath-id</code></dt>
330           <dd>Exactly 16 hex
331             digits to set the OpenFlow datapath ID to a specific
332             value.</dd>
333           <dt><code>hwaddr</code></dt>
334           <dd>An Ethernet address in the form
335             <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
336             to set the hardware address of the local port and influence the
337             datapath ID.</dd>
338         </dl>
339       </column>
340     </group>
341   </table>
342
343   <table name="Port" table="Port or bond configuration.">
344     <p>A port within a <ref table="Bridge"/>.</p>
345     <p>Most commonly, a port has exactly one ``interface,'' pointed to by its
346       <ref column="interfaces"/> column.  Such a port logically
347       corresponds to a port on a physical Ethernet switch.  A port
348       with more than one interface is a ``bonded port'' (see
349       <ref group="Bonding Configuration"/>).</p>
350     <p>Some properties that one might think as belonging to a port are actually
351       part of the port's <ref table="Interface"/> members.</p>
352
353     <column name="name">
354       Port name.  Should be alphanumeric and no more than about 8
355       bytes long.  May be the same as the interface name, for
356       non-bonded ports.  Must otherwise be unique among the names of
357       ports, interfaces, and bridges on a host.
358     </column>
359
360     <column name="interfaces">
361       The port's interfaces.  If there is more than one, this is a
362       bonded Port.
363     </column>
364
365     <group title="VLAN Configuration">
366       <p>A bridge port must be configured for VLANs in one of two
367         mutually exclusive ways:
368         <ul>
369           <li>A ``trunk port'' has an empty value for <ref
370             column="tag"/>.  Its <ref column="trunks"/> value may be
371             empty or non-empty.</li>
372           <li>An ``implicitly tagged VLAN port'' or ``access port''
373             has an nonempty value for <ref column="tag"/>.  Its
374             <ref column="trunks"/> value must be empty.</li>
375         </ul>
376         If <ref column="trunks"/> and <ref column="tag"/> are both
377         nonempty, the configuration is ill-formed.
378       </p>
379
380       <column name="tag">
381         <p>
382           If this is an access port (see above), the port's implicitly
383           tagged VLAN.  Must be empty if this is a trunk port.
384         </p>
385         <p>
386           Frames arriving on trunk ports will be forwarded to this
387           port only if they are tagged with the given VLAN (or, if
388           <ref column="tag"/> is 0, then if they lack a VLAN header).
389           Frames arriving on other access ports will be forwarded to
390           this port only if they have the same <ref column="tag"/>
391           value.  Frames forwarded to this port will not have an
392           802.1Q header.
393         </p>
394         <p>
395           When a frame with a 802.1Q header that indicates a nonzero
396           VLAN is received on an access port, it is discarded.
397         </p>
398       </column>
399
400       <column name="trunks">
401         <p>
402           If this is a trunk port (see above), the 802.1Q VLAN(s) that
403           this port trunks; if it is empty, then the port trunks all
404           VLANs.  Must be empty if this is an access port.
405         </p>
406         <p>
407           Frames arriving on trunk ports are dropped if they are not
408           in one of the specified VLANs.  For this purpose, packets
409           that have no VLAN header are treated as part of VLAN 0.
410         </p>
411       </column>
412     </group>
413
414     <group title="Bonding Configuration">
415       <p>A port that has more than one interface is a ``bonded port.''
416         Bonding allows for load balancing and fail-over.  Open vSwitch
417         supports ``source load balancing'' (SLB) bonding, which
418         assigns flows to slaves based on source MAC address, with
419         periodic rebalancing as traffic patterns change.  This form of
420         bonding does not require 802.3ad or other special support from
421         the upstream switch to which the slave devices are
422         connected.</p>
423
424       <p>These columns apply only to bonded ports.  Their values are
425         otherwise ignored.</p>
426
427       <column name="bond_updelay">
428         <p>For a bonded port, the number of milliseconds for which carrier must
429           stay up on an interface before the interface is considered to be up.
430           Specify <code>0</code> to enable the interface immediately.</p>
431         <p>This setting is honored only when at least one bonded interface is
432           already enabled.  When no interfaces are enabled, then the first bond
433           interface to come up is enabled immediately.</p>
434       </column>
435
436       <column name="bond_downdelay">
437         For a bonded port, the number of milliseconds for which carrier must
438         stay down on an interface before the interface is considered to be
439         down.  Specify <code>0</code> to disable the interface immediately.
440       </column>
441
442       <column name="bond_fake_iface">
443         For a bonded port, whether to create a fake internal interface with the
444         name of the port.  Use only for compatibility with legacy software that
445         requires this.
446       </column>
447     </group>
448
449     <group title="Other Features">
450       <column name="qos">
451         Quality of Service configuration for this port.
452       </column>
453       
454       <column name="mac">
455         The MAC address to use for this port for the purpose of choosing the
456         bridge's MAC address.  This column does not necessarily reflect the
457         port's actual MAC address, nor will setting it change the port's actual
458         MAC address.
459       </column>
460
461       <column name="fake_bridge">
462         Does this port represent a sub-bridge for its tagged VLAN within the
463         Bridge?  See ovs-vsctl(8) for more information.
464       </column>
465
466       <column name="external_ids">
467         <p>
468           Key-value pairs for use by external frameworks that integrate with
469           Open vSwitch, rather than by Open vSwitch itself.  System integrators
470           should either use the Open vSwitch development mailing list to
471           coordinate on common key-value definitions, or choose key names that
472           are likely to be unique.
473         </p>
474         <p>
475           No key-value pairs native to <ref table="Port"/> are currently
476           defined.  For fake bridges (see the <ref column="fake_bridge"/>
477           column), external IDs for the fake bridge are defined here by
478           prefixing a <ref table="Bridge"/> <ref table="Bridge"
479           column="external_ids"/> key with <code>fake-bridge-</code>,
480           e.g. <code>fake-bridge-xs-network-uuids</code>.
481         </p>
482       </column>
483
484       <column name="other_config">
485         Key-value pairs for configuring rarely used port features.  The
486         currently defined key-value pairs are:
487         <dl>
488           <dt><code>hwaddr</code></dt>
489           <dd>An Ethernet address in the form
490             <code><var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var></code>.</dd>
491           <dt><code>bond-rebalance-interval</code></dt>
492           <dd>For a bonded port, the number of milliseconds between
493             successive attempts to rebalance the bond, that is, to
494             move source MACs and their flows from one interface on
495             the bond to another in an attempt to keep usage of each
496             interface roughly equal.  The default is 10000 (10
497             seconds), and the minimum is 1000 (1 second).</dd>
498         </dl>
499       </column>
500     </group>
501   </table>
502
503   <table name="Interface" title="One physical network device in a Port.">
504     An interface within a <ref table="Port"/>.
505
506     <group title="Core Features">
507       <column name="name">
508         Interface name.  Should be alphanumeric and no more than about 8 bytes
509         long.  May be the same as the port name, for non-bonded ports.  Must
510         otherwise be unique among the names of ports, interfaces, and bridges
511         on a host.
512       </column>
513
514       <column name="mac">
515         <p>Ethernet address to set for this interface.  If unset then the
516           default MAC address is used:</p>
517         <ul>
518           <li>For the local interface, the default is the lowest-numbered MAC
519             address among the other bridge ports, either the value of the
520             <ref table="Port" column="mac"/> in its <ref table="Port"/> record,
521             if set, or its actual MAC (for bonded ports, the MAC of its slave
522             whose name is first in alphabetical order).  Internal ports and
523             bridge ports that are used as port mirroring destinations (see the
524             <ref table="Mirror"/> table) are ignored.</li>
525           <li>For other internal interfaces, the default MAC is randomly
526             generated.</li>
527           <li>External interfaces typically have a MAC address associated with
528             their hardware.</li>
529         </ul>
530         <p>Some interfaces may not have a software-controllable MAC
531         address.</p>
532       </column>
533
534       <column name="ofport">
535         <p>OpenFlow port number for this interface.  Unlike most columns, this
536           column's value should be set only by Open vSwitch itself.  Other
537           clients should set this column to an empty set (the default) when
538           creating an <ref table="Interface"/>.</p>
539         <p>Open vSwitch populates this column when the port number becomes
540           known.  If the interface is successfully added,
541           <ref column="ofport"/> will be set to a number between 1 and 65535
542           (generally either in the range 1 to 65280, exclusive, or 65534, the
543           port number for the OpenFlow ``local port'').  If the interface
544           cannot be added then Open vSwitch sets this column
545           to -1.</p>
546       </column>
547     </group>
548
549     <group title="System-Specific Details">
550       <column name="type">
551         The interface type, one of:
552         <dl>
553           <dt><code>system</code></dt>
554           <dd>An ordinary network device, e.g. <code>eth0</code> on Linux.
555             Sometimes referred to as ``external interfaces'' since they are
556             generally connected to hardware external to that on which the Open
557             vSwitch is running.  The empty string is a synonym for
558             <code>system</code>.</dd>
559           <dt><code>internal</code></dt>
560           <dd>A simulated network device that sends and receives traffic.  An
561             internal interface whose <ref column="name"/> is the same as its
562             bridge's <ref table="Open_vSwitch" column="name"/> is called the
563             ``local interface.''  It does not make sense to bond an internal
564             interface, so the terms ``port'' and ``interface'' are often used
565             imprecisely for internal interfaces.</dd>
566           <dt><code>tap</code></dt>
567           <dd>A TUN/TAP device managed by Open vSwitch.</dd>
568           <dt><code>gre</code></dt>
569           <dd>An Ethernet over RFC 2890 Generic Routing Encapsulation over IPv4
570              tunnel.  Each tunnel must be uniquely identified by the
571              combination of <code>remote_ip</code>, <code>local_ip</code>, and
572              <code>in_key</code>.  Note that if two ports are defined that are
573              the same except one has an optional identifier and the other does
574              not, the more specific one is matched first.  <code>in_key</code>
575              is considered more specific than <code>local_ip</code> if a port
576              defines one and another port defines the other.  The following 
577              options may be specified in the <ref column="options"/> column:
578             <dl>
579               <dt><code>remote_ip</code></dt>
580               <dd>Required.  The tunnel endpoint.</dd>
581             </dl>
582             <dl>
583               <dt><code>local_ip</code></dt>
584               <dd>Optional.  The destination IP that received packets must
585                 match.  Default is to match all addresses.</dd>
586             </dl>
587             <dl>
588               <dt><code>in_key</code></dt>
589               <dd>Optional.  The GRE key that received packets must contain.
590                 It may either be a 32-bit number (no key and a key of 0 are
591                 treated as equivalent) or the word <code>flow</code>.  If
592                 <code>flow</code> is specified then any key will be accepted
593                 and the key will be placed in the <code>tun_id</code> field
594                 for matching in the flow table.  The ovs-ofctl manual page
595                 contains additional information about matching fields in
596                 OpenFlow flows.  Default is no key.</dd>
597             </dl>
598             <dl>
599               <dt><code>out_key</code></dt>
600               <dd>Optional.  The GRE key to be set on outgoing packets.  It may
601                 either be a 32-bit number or the word <code>flow</code>.  If
602                 <code>flow</code> is specified then the key may be set using
603                 the <code>set_tunnel</code> Nicira OpenFlow vendor extension (0
604                 is used in the absence of an action).  The ovs-ofctl manual
605                 page contains additional information about the Nicira OpenFlow
606                 vendor extensions.  Default is no key.</dd>
607             </dl>
608             <dl>
609               <dt><code>key</code></dt>
610               <dd>Optional.  Shorthand to set <code>in_key</code> and
611                 <code>out_key</code> at the same time.</dd>
612             </dl>
613             <dl>
614               <dt><code>tos</code></dt>
615               <dd>Optional.  The value of the ToS bits to be set on the
616                 encapsulating packet.  It may also be the word
617                 <code>inherit</code>, in which case the ToS will be copied from
618                 the inner packet if it is IPv4 or IPv6 (otherwise it will be
619                 0).  Note that the ECN fields are always inherited.  Default is
620                 0.</dd>
621             </dl>
622             <dl>
623               <dt><code>ttl</code></dt>
624               <dd>Optional.  The TTL to be set on the encapsulating packet.
625                 It may also be the word <code>inherit</code>, in which case the
626                 TTL will be copied from the inner packet if it is IPv4 or IPv6
627                 (otherwise it will be the system default, typically 64).
628                 Default is the system default TTL.</dd>
629             </dl>
630             <dl>
631               <dt><code>csum</code></dt>
632               <dd>Optional.  Compute GRE checksums on outgoing packets.
633                 Checksums present on incoming packets will be validated
634                 regardless of this setting.  Note that GRE checksums
635                 impose a significant performance penalty as they cover the
636                 entire packet.  As the contents of the packet is typically
637                 covered by L3 and L4 checksums, this additional checksum only
638                 adds value for the GRE and encapsulated Ethernet headers.
639                 Default is disabled, set to <code>true</code> to enable.</dd>
640             </dl>
641             <dl>
642               <dt><code>pmtud</code></dt>
643               <dd>Optional.  Enable tunnel path MTU discovery.  If enabled
644                 ``ICMP destination unreachable - fragmentation'' needed
645                 messages will be generated for IPv4 packets with the DF bit set
646                 and IPv6 packets above the minimum MTU if the packet size
647                 exceeds the path MTU minus the size of the tunnel headers.  It
648                 also forces the encapsulating packet DF bit to be set (it is
649                 always set if the inner packet implies path MTU discovery).
650                 Note that this option causes behavior that is typically
651                 reserved for routers and therefore is not entirely in
652                 compliance with the IEEE 802.1D specification for bridges.
653                 Default is enabled, set to <code>false</code> to disable.</dd>
654             </dl>
655             <dl>
656               <dt><code>header_cache</code></dt>
657               <dd>Optional.  Enable caching of tunnel headers and the output
658                 path.  This can lead to a significant performance increase
659                 without changing behavior.  In general it should not be
660                 necessary to adjust this setting.  However, the caching can
661                 bypass certain components of the IP stack (such as IP tables)
662                 and it may be useful to disable it if these features are
663                 required or as a debugging measure.  Default is enabled, set to
664                 <code>false</code> to disable.</dd>
665             </dl>
666           </dd>
667           <dt><code>capwap</code></dt>
668           <dd>Ethernet tunneling over the UDP transport portion of CAPWAP
669              (RFC 5415).  This allows interoperability with certain switches
670              where GRE is not available.  Note that only the tunneling component
671              of the protocol is implemented.  Due to the non-standard use of
672              CAPWAP, UDP ports 58881 and 58882 are used as the source and
673              destinations ports respectivedly.  Each tunnel must be uniquely
674              identified by the combination of <code>remote_ip</code> and
675              <code>local_ip</code>.  If two ports are defined that are the same
676              except one includes <code>local_ip</code> and the other does not,
677              the more specific one is matched first.  CAPWAP support is not
678              available on all platforms.  Currently it is only supported in the
679              Linux kernel module with kernel versions >= 2.6.25.  The following
680              options may be specified in the <ref column="options"/> column:
681             <dl>
682               <dt><code>remote_ip</code></dt>
683               <dd>Required.  The tunnel endpoint.</dd>
684             </dl>
685             <dl>
686               <dt><code>local_ip</code></dt>
687               <dd>Optional.  The destination IP that received packets must
688                 match.  Default is to match all addresses.</dd>
689             </dl>
690             <dl>
691               <dt><code>tos</code></dt>
692               <dd>Optional.  The value of the ToS bits to be set on the
693                 encapsulating packet.  It may also be the word
694                 <code>inherit</code>, in which case the ToS will be copied from
695                 the inner packet if it is IPv4 or IPv6 (otherwise it will be
696                 0).  Note that the ECN fields are always inherited.  Default is
697                 0.</dd>
698             </dl>
699             <dl>
700               <dt><code>ttl</code></dt>
701               <dd>Optional.  The TTL to be set on the encapsulating packet.
702                 It may also be the word <code>inherit</code>, in which case the
703                 TTL will be copied from the inner packet if it is IPv4 or IPv6
704                 (otherwise it will be the system default, typically 64).
705                 Default is the system default TTL.</dd>
706             </dl>
707             <dl>
708               <dt><code>pmtud</code></dt>
709               <dd>Optional.  Enable tunnel path MTU discovery.  If enabled
710                 ``ICMP destination unreachable - fragmentation'' needed
711                 messages will be generated for IPv4 packets with the DF bit set
712                 and IPv6 packets above the minimum MTU if the packet size
713                 exceeds the path MTU minus the size of the tunnel headers.  It
714                 also forces the encapsulating packet DF bit to be set (it is
715                 always set if the inner packet implies path MTU discovery).
716                 Note that this option causes behavior that is typically
717                 reserved for routers and therefore is not entirely in
718                 compliance with the IEEE 802.1D specification for bridges.
719                 Default is enabled, set to <code>false</code> to disable.</dd>
720             </dl>
721             <dl>
722               <dt><code>header_cache</code></dt>
723               <dd>Optional.  Enable caching of tunnel headers and the output
724                 path.  This can lead to a significant performance increase
725                 without changing behavior.  In general it should not be
726                 necessary to adjust this setting.  However, the caching can
727                 bypass certain components of the IP stack (such as IP tables)
728                 and it may be useful to disable it if these features are
729                 required or as a debugging measure.  Default is enabled, set to
730                 <code>false</code> to disable.</dd>
731             </dl>
732           </dd>
733           <dt><code>patch</code></dt>
734           <dd>
735             <p>
736               A pair of virtual devices that act as a patch cable.  The <ref
737               column="options"/> column must have the following key-value pair:
738             </p>
739             <dl>
740               <dt><code>peer</code></dt>
741               <dd>
742                 The <ref column="name"/> of the <ref table="Interface"/> for
743                 the other side of the patch.  The named <ref
744                 table="Interface"/>'s own <code>peer</code> option must specify
745                 this <ref table="Interface"/>'s name.  That is, the two patch
746                 interfaces must have reversed <ref column="name"/> and
747                 <code>peer</code> values.
748               </dd>
749             </dl>
750           </dd>
751         </dl>
752       </column>
753
754       <column name="options">
755         Configuration options whose interpretation varies based on
756         <ref column="type"/>.
757       </column>
758
759       <column name="status">
760         <p>
761           Key-value pairs that report port status.  Supported status
762           values are <code>type</code>-dependent.
763         </p>
764         <p>The only currently defined key-value pair is:</p>
765         <dl>
766           <dt><code>source_ip</code></dt>
767           <dd>The source IP address used for an IPv4 tunnel end-point,
768             such as <code>gre</code> or <code>capwap</code>.  Not
769             supported by all implementations.</dd>
770         </dl>
771       </column>
772     </group>
773
774     <group title="Ingress Policing">
775       <p>
776         These settings control ingress policing for packets received on this
777         interface.  On a physical interface, this limits the rate at which
778         traffic is allowed into the system from the outside; on a virtual
779         interface (one connected to a virtual machine), this limits the rate at
780         which the VM is able to transmit.
781       </p>
782       <p>
783         Policing is a simple form of quality-of-service that simply drops
784         packets received in excess of the configured rate.  Due to its
785         simplicity, policing is usually less accurate and less effective than
786         egress QoS (which is configured using the <ref table="QoS"/> and <ref
787         table="Queue"/> tables).
788       </p>
789       <p>
790         Policing is currently implemented only on Linux.  The Linux
791         implementation uses a simple ``token bucket'' approach:
792       </p>
793       <ul>
794         <li>
795           The size of the bucket corresponds to <ref
796           column="ingress_policing_burst"/>.  Initially the bucket is full.
797         </li>
798         <li>
799           Whenever a packet is received, its size (converted to tokens) is
800           compared to the number of tokens currently in the bucket.  If the
801           required number of tokens are available, they are removed and the
802           packet is forwarded.  Otherwise, the packet is dropped.
803         </li>
804         <li>
805           Whenever it is not full, the bucket is refilled with tokens at the
806           rate specified by <ref column="ingress_policing_rate"/>.
807         </li>
808       </ul>
809       <p>
810         Policing interacts badly with some network protocols, and especially
811         with fragmented IP packets.  Suppose that there is enough network
812         activity to keep the bucket nearly empty all the time.  Then this token
813         bucket algorithm will forward a single packet every so often, with the
814         period depending on packet size and on the configured rate.  All of the
815         fragments of an IP packets are normally transmitted back-to-back, as a
816         group.  In such a situation, therefore, only one of these fragments
817         will be forwarded and the rest will be dropped.  IP does not provide
818         any way for the intended recipient to ask for only the remaining
819         fragments.  In such a case there are two likely possibilities for what
820         will happen next: either all of the fragments will eventually be
821         retransmitted (as TCP will do), in which case the same problem will
822         recur, or the sender will not realize that its packet has been dropped
823         and data will simply be lost (as some UDP-based protocols will do).
824         Either way, it is possible that no forward progress will ever occur.
825       </p>
826       <column name="ingress_policing_rate">
827         <p>
828           Maximum rate for data received on this interface, in kbps.  Data
829           received faster than this rate is dropped.  Set to <code>0</code>
830           (the default) to disable policing.
831         </p>
832       </column>
833
834       <column name="ingress_policing_burst">
835         <p>Maximum burst size for data received on this interface, in kb.  The
836           default burst size if set to <code>0</code> is 1000 kb.  This value
837           has no effect if <ref column="ingress_policing_rate"/>
838           is <code>0</code>.</p>
839         <p>
840           Specifying a larger burst size lets the algorithm be more forgiving,
841           which is important for protocols like TCP that react severely to
842           dropped packets.  The burst size should be at least the size of the
843           interface's MTU.  Specifying a value that is numerically at least as
844           large as 10% of <ref column="ingress_policing_rate"/> helps TCP come
845           closer to achieving the full rate.
846         </p>
847       </column>
848     </group>
849
850     <group title="Other Features">
851       <column name="external_ids">
852         Key-value pairs for use by external frameworks that integrate
853         with Open vSwitch, rather than by Open vSwitch itself.  System
854         integrators should either use the Open vSwitch development
855         mailing list to coordinate on common key-value definitions, or
856         choose key names that are likely to be unique.  The currently
857         defined common key-value pairs are:
858         <dl>
859           <dt><code>attached-mac</code></dt>
860           <dd>
861             The MAC address programmed into the ``virtual hardware'' for this
862             interface, in the form
863             <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
864             For Citrix XenServer, this is the value of the <code>MAC</code>
865             field in the VIF record for this interface.</dd>
866           <dt><code>iface-id</code></dt>
867           <dd>A system-unique identifier for the interface.  On XenServer, 
868             this will commonly be the same as <code>xs-vif-uuid</code>.</dd>
869         </dl>
870         <p>
871           Additionally the following key-value pairs specifically
872           apply to an interface that represents a virtual Ethernet interface
873           connected to a virtual machine.  These key-value pairs should not be
874           present for other types of interfaces.  Keys whose names end
875           in <code>-uuid</code> have values that uniquely identify the entity
876           in question.  For a Citrix XenServer hypervisor, these values are
877           UUIDs in RFC 4122 format.  Other hypervisors may use other
878           formats.
879         </p>
880         <p>The currently defined key-value pairs for XenServer are:</p>
881         <dl>
882           <dt><code>xs-vif-uuid</code></dt>
883           <dd>The virtual interface associated with this interface.</dd>
884           <dt><code>xs-network-uuid</code></dt>
885           <dd>The virtual network to which this interface is attached.</dd>
886           <dt><code>xs-vm-uuid</code></dt>
887           <dd>The VM to which this interface belongs.</dd>
888         </dl>
889       </column>
890
891       <column name="other_config">
892         Key-value pairs for rarely used interface features.  Currently,
893         the only keys are for configuring GRE-over-IPsec, which is only
894         available through the <code>openvswitch-ipsec</code> package for
895         Debian.  The currently defined key-value pairs are:
896         <dl>
897           <dt><code>ipsec_local_ip</code></dt>
898           <dd>Required key for GRE-over-IPsec interfaces.  Additionally,
899             the <ref column="type"/> must be <code>gre</code> and the
900             <code>ipsec_psk</code> <ref column="other_config"/> key must
901             be set.  The <code>in_key</code>, <code>out_key</code>, and
902             <code>key</code> <ref column="options"/> must not be
903             set.</dd>
904           <dt><code>ipsec_psk</code></dt>
905           <dd>Required key for GRE-over-IPsec interfaces.  Specifies a
906             pre-shared key for authentication that must be identical on 
907             both sides of the tunnel.  Additionally, the
908             <code>ipsec_local_ip</code> key must also be set.</dd>
909         </dl>
910       </column>
911
912       <column name="statistics">
913         <p>
914           Key-value pairs that report interface statistics.  The current
915           implementation updates these counters periodically.  In the future,
916           we plan to, instead, update them when an interface is created, when
917           they are queried (e.g. using an OVSDB <code>select</code> operation),
918           and just before an interface is deleted due to virtual interface
919           hot-unplug or VM shutdown, and perhaps at other times, but not on any
920           regular periodic basis.</p>
921         <p>
922           The currently defined key-value pairs are listed below.  These are
923           the same statistics reported by OpenFlow in its <code>struct
924           ofp_port_stats</code> structure.  If an interface does not support a
925           given statistic, then that pair is omitted.</p>
926         <ul>
927           <li>
928             Successful transmit and receive counters:
929             <dl>
930               <dt><code>rx_packets</code></dt>
931               <dd>Number of received packets.</dd>
932               <dt><code>rx_bytes</code></dt>
933               <dd>Number of received bytes.</dd>
934               <dt><code>tx_packets</code></dt>
935               <dd>Number of transmitted packets.</dd>
936               <dt><code>tx_bytes</code></dt>
937               <dd>Number of transmitted bytes.</dd>
938             </dl>
939           </li>
940           <li>
941             Receive errors:
942             <dl>
943               <dt><code>rx_dropped</code></dt>
944               <dd>Number of packets dropped by RX.</dd>
945               <dt><code>rx_frame_err</code></dt>
946               <dd>Number of frame alignment errors.</dd>
947               <dt><code>rx_over_err</code></dt>
948               <dd>Number of packets with RX overrun.</dd>
949               <dt><code>rx_crc_err</code></dt>
950               <dd>Number of CRC errors.</dd>
951               <dt><code>rx_errors</code></dt>
952               <dd>
953                 Total number of receive errors, greater than or equal
954                 to the sum of the above.
955               </dd>
956             </dl>
957           </li>
958           <li>
959             Transmit errors:
960             <dl>
961               <dt><code>tx_dropped</code></dt>
962               <dd>Number of packets dropped by TX.</dd>
963               <dt><code>collisions</code></dt>
964               <dd>Number of collisions.</dd>
965               <dt><code>tx_errors</code></dt>
966               <dd>
967                 Total number of transmit errors, greater
968                 than or equal to the sum of the above.
969               </dd>
970             </dl>
971           </li>
972         </ul>
973       </column>
974     </group>
975   </table>
976
977   <table name="QoS" title="Quality of Service configuration">
978     <p>Quality of Service (QoS) configuration for each Port that
979       references it.</p>
980
981     <column name="type">
982       <p>The type of QoS to implement.  The <ref table="Open_vSwitch"
983         column="capabilities"/> column in the <ref table="Open_vSwitch"/> table
984         identifies the types that a switch actually supports.  The currently
985         defined types are listed below:</p>
986       <dl>
987         <dt><code>linux-htb</code></dt>
988         <dd>
989           Linux ``hierarchy token bucket'' classifier.  See tc-htb(8) (also at
990           <code>http://linux.die.net/man/8/tc-htb</code>) and the HTB manual
991           (<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
992           for information on how this classifier works and how to configure it.
993         </dd>
994       </dl>
995     </column>
996
997     <column name="queues">
998       <p>A map from queue numbers to <ref table="Queue"/> records.  The
999         supported range of queue numbers depend on <ref column="type"/>.  The
1000         queue numbers are the same as the <code>queue_id</code> used in
1001         OpenFlow in <code>struct ofp_action_enqueue</code> and other
1002         structures.  Queue 0 is used by OpenFlow output actions that do not
1003         specify a specific queue.</p>
1004     </column>
1005
1006     <column name="other_config">
1007       <p>Key-value pairs for configuring QoS features that depend on
1008         <ref column="type"/>.</p>
1009       <p>The <code>linux-htb</code> class supports the following key-value
1010         pairs:</p>
1011       <dl>
1012         <dt><code>max-rate</code></dt>
1013         <dd>Maximum rate shared by all queued traffic, in bit/s.
1014           Optional.  If not specified, for physical interfaces, the
1015           default is the link rate.  For other interfaces or if the
1016           link rate cannot be determined, the default is currently 100
1017           Mbps.</dd>
1018       </dl>
1019     </column>
1020
1021     <column name="external_ids">
1022       Key-value pairs for use by external frameworks that integrate with Open
1023       vSwitch, rather than by Open vSwitch itself.  System integrators should
1024       either use the Open vSwitch development mailing list to coordinate on
1025       common key-value definitions, or choose key names that are likely to be
1026       unique.  No common key-value pairs are currently defined.
1027     </column>
1028   </table>
1029
1030   <table name="Queue" title="QoS output queue.">
1031     <p>A configuration for a port output queue, used in configuring Quality of
1032       Service (QoS) features.  May be referenced by <ref column="queues"
1033       table="QoS"/> column in <ref table="QoS"/> table.</p>
1034
1035     <column name="other_config">
1036       <p>Key-value pairs for configuring the output queue.  The supported
1037         key-value pairs and their meanings depend on the <ref column="type"/>
1038         of the <ref column="QoS"/> records that reference this row.</p>
1039       <p>The key-value pairs defined for <ref table="QoS"/> <ref table="QoS"
1040         column="type"/> of <code>min-rate</code> are:</p>
1041       <dl>
1042         <dt><code>min-rate</code></dt>
1043         <dd>Minimum guaranteed bandwidth, in bit/s.  Required.</dd>
1044       </dl>
1045       <p>The key-value pairs defined for <ref table="QoS"/> <ref table="QoS"
1046         column="type"/> of <code>linux-htb</code> are:</p>
1047       <dl>
1048         <dt><code>min-rate</code></dt>
1049         <dd>Minimum guaranteed bandwidth, in bit/s.  Required.</dd>
1050         <dt><code>max-rate</code></dt>
1051         <dd>Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
1052           queue's rate will not be allowed to exceed the specified value, even
1053           if excess bandwidth is available.  If unspecified, defaults to no
1054           limit.</dd>
1055         <dt><code>burst</code></dt>
1056         <dd>Burst size, in bits.  This is the maximum amount of ``credits''
1057           that a queue can accumulate while it is idle.  Optional.  Details of
1058           the <code>linux-htb</code> implementation require a minimum burst
1059           size, so a too-small <code>burst</code> will be silently
1060           ignored.</dd>
1061         <dt><code>priority</code></dt>
1062         <dd>A nonnegative 32-bit integer.  Defaults to 0 if
1063           unspecified.  A queue with a smaller <code>priority</code>
1064           will receive all the excess bandwidth that it can use before
1065           a queue with a larger value receives any.  Specific priority
1066           values are unimportant; only relative ordering matters.</dd>
1067       </dl>
1068     </column>
1069
1070     <column name="external_ids">
1071       Key-value pairs for use by external frameworks that integrate with Open
1072       vSwitch, rather than by Open vSwitch itself.  System integrators should
1073       either use the Open vSwitch development mailing list to coordinate on
1074       common key-value definitions, or choose key names that are likely to be
1075       unique.  No common key-value pairs are currently defined.
1076     </column>
1077   </table>
1078
1079   <table name="Mirror" title="Port mirroring (SPAN/RSPAN).">
1080     <p>A port mirror within a <ref table="Bridge"/>.</p>
1081     <p>A port mirror configures a bridge to send selected frames to special
1082       ``mirrored'' ports, in addition to their normal destinations.  Mirroring
1083       traffic may also be referred to as SPAN or RSPAN, depending on the
1084       mechanism used for delivery.</p>
1085
1086     <column name="name">
1087       Arbitrary identifier for the <ref table="Mirror"/>.
1088     </column>
1089
1090     <group title="Selecting Packets for Mirroring">
1091       <column name="select_all">
1092         If true, every packet arriving or departing on any port is
1093         selected for mirroring.
1094       </column>
1095
1096       <column name="select_dst_port">
1097         Ports on which departing packets are selected for mirroring.
1098       </column>
1099
1100       <column name="select_src_port">
1101         Ports on which arriving packets are selected for mirroring.
1102       </column>
1103
1104       <column name="select_vlan">
1105         VLANs on which packets are selected for mirroring.  An empty set
1106         selects packets on all VLANs.
1107       </column>
1108     </group>
1109
1110     <group title="Mirroring Destination Configuration">
1111       <column name="output_port">
1112         <p>Output port for selected packets, if nonempty.  Mutually exclusive
1113           with <ref column="output_vlan"/>.</p>
1114         <p>Specifying a port for mirror output reserves that port exclusively
1115           for mirroring.  No frames other than those selected for mirroring
1116           will be forwarded to the port, and any frames received on the port
1117           will be discarded.</p>
1118         <p>This type of mirroring is sometimes called SPAN.</p>
1119       </column>
1120
1121       <column name="output_vlan">
1122         <p>Output VLAN for selected packets, if nonempty.  Mutually exclusive
1123           with <ref column="output_port"/>.</p>
1124         <p>The frames will be sent out all ports that trunk
1125           <ref column="output_vlan"/>, as well as any ports with implicit VLAN
1126           <ref column="output_vlan"/>.  When a mirrored frame is sent out a
1127           trunk port, the frame's VLAN tag will be set to
1128           <ref column="output_vlan"/>, replacing any existing tag; when it is
1129           sent out an implicit VLAN port, the frame will not be tagged.  This
1130           type of mirroring is sometimes called RSPAN.</p>
1131         <p><em>Please note:</em> Mirroring to a VLAN can disrupt a network that
1132           contains unmanaged switches.  Consider an unmanaged physical switch
1133           with two ports: port 1, connected to an end host, and port 2,
1134           connected to an Open vSwitch configured to mirror received packets
1135           into VLAN 123 on port 2.  Suppose that the end host sends a packet on
1136           port 1 that the physical switch forwards to port 2.  The Open vSwitch
1137           forwards this packet to its destination and then reflects it back on
1138           port 2 in VLAN 123.  This reflected packet causes the unmanaged
1139           physical switch to replace the MAC learning table entry, which
1140           correctly pointed to port 1, with one that incorrectly points to port
1141           2.  Afterward, the physical switch will direct packets destined for
1142           the end host to the Open vSwitch on port 2, instead of to the end
1143           host on port 1, disrupting connectivity.  If mirroring to a VLAN is
1144           desired in this scenario, then the physical switch must be replaced
1145           by one that learns Ethernet addresses on a per-VLAN basis.  In
1146           addition, learning should be disabled on the VLAN containing mirrored
1147           traffic. If this is not done then intermediate switches will learn
1148           the MAC address of each end host from the mirrored traffic.  If
1149           packets being sent to that end host are also mirrored, then they will
1150           be dropped since the switch will attempt to send them out the input
1151           port. Disabling learning for the VLAN will cause the switch to
1152           correctly send the packet out all ports configured for that VLAN.  If
1153           Open vSwitch is being used as an intermediate switch, learning can be
1154           disabled by adding the mirrored VLAN to <ref column="flood_vlans"/>
1155           in the appropriate <ref table="Bridge"/> table or tables.</p>
1156       </column>
1157     </group>
1158
1159     <group title="Other Features">
1160       <column name="external_ids">
1161         Key-value pairs for use by external frameworks that integrate with Open
1162         vSwitch, rather than by Open vSwitch itself.  System integrators should
1163         either use the Open vSwitch development mailing list to coordinate on
1164         common key-value definitions, or choose key names that are likely to be
1165         unique.  No common key-value pairs are currently defined.
1166       </column>
1167     </group>
1168   </table>
1169
1170   <table name="Controller" title="OpenFlow controller configuration.">
1171     <p>An OpenFlow controller.</p>
1172
1173     <p>
1174       Open vSwitch supports two kinds of OpenFlow controllers:
1175     </p>
1176     
1177     <dl>
1178       <dt>Primary controllers</dt>
1179       <dd>
1180         <p>
1181           This is the kind of controller envisioned by the OpenFlow 1.0
1182           specification.  Usually, a primary controller implements a network
1183           policy by taking charge of the switch's flow table.
1184         </p>
1185
1186         <p>
1187           Open vSwitch initiates and maintains persistent connections to
1188           primary controllers, retrying the connection each time it fails or
1189           drops.  The <ref table="Bridge" column="fail_mode"/> column in the
1190           <ref table="Bridge"/> table applies to primary controllers.
1191         </p>
1192
1193         <p>
1194           Open vSwitch permits a bridge to have any number of primary
1195           controllers.  When multiple controllers are configured, Open
1196           vSwitch connects to all of them simultaneously.  Because
1197           OpenFlow 1.0 does not specify how multiple controllers
1198           coordinate in interacting with a single switch, more than
1199           one primary controller should be specified only if the
1200           controllers are themselves designed to coordinate with each
1201           other.  (The Nicira-defined <code>NXT_ROLE</code> OpenFlow
1202           vendor extension may be useful for this.)
1203         </p>
1204       </dd>
1205       <dt>Service controllers</dt>
1206       <dd>
1207         <p>
1208           These kinds of OpenFlow controller connections are intended for
1209           occasional support and maintenance use, e.g. with
1210           <code>ovs-ofctl</code>.  Usually a service controller connects only
1211           briefly to inspect or modify some of a switch's state.
1212         </p>
1213
1214         <p>
1215           Open vSwitch listens for incoming connections from service
1216           controllers.  The service controllers initiate and, if necessary,
1217           maintain the connections from their end.  The <ref table="Bridge"
1218           column="fail_mode"/> column in the <ref table="Bridge"/> table does
1219           not apply to service controllers.
1220         </p>
1221
1222         <p>
1223           Open vSwitch supports configuring any number of service controllers.
1224         </p>
1225       </dd>
1226     </dl>
1227
1228     <p>
1229       The <ref column="target"/> determines the type of controller.
1230     </p>
1231
1232     <group title="Core Features">
1233       <column name="target">
1234         <p>Connection method for controller.</p>
1235         <p>
1236           The following connection methods are currently supported for primary
1237           controllers:
1238         </p>
1239         <dl>
1240           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
1241           <dd>
1242             <p>The specified SSL <var>port</var> (default: 6633) on the host at
1243             the given <var>ip</var>, which must be expressed as an IP address
1244             (not a DNS name).  The <ref table="Open_vSwitch" column="ssl"/>
1245             column in the <ref table="Open_vSwitch"/> table must point to a
1246             valid SSL configuration when this form is used.</p>
1247             <p>SSL support is an optional feature that is not always built as
1248               part of Open vSwitch.</p>
1249           </dd>
1250           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
1251           <dd>The specified TCP <var>port</var> (default: 6633) on the host at
1252             the given <var>ip</var>, which must be expressed as an IP address
1253             (not a DNS name).</dd>
1254           <dt><code>discover</code></dt>
1255           <dd>
1256             <p>Enables controller discovery.</p>
1257             <p>In controller discovery mode, Open vSwitch broadcasts a DHCP
1258               request with vendor class identifier <code>OpenFlow</code> across
1259               all of the bridge's network devices.  It will accept any valid
1260               DHCP reply that has the same vendor class identifier and includes
1261               a vendor-specific option with code 1 whose contents are a string
1262               specifying the location of the controller in the same format as
1263               <ref column="target"/>.</p>
1264             <p>The DHCP reply may also, optionally, include a vendor-specific
1265               option with code 2 whose contents are a string specifying the URI
1266               to the base of the OpenFlow PKI
1267               (e.g. <code>http://192.168.0.1/openflow/pki</code>).  This URI is
1268               used only for bootstrapping the OpenFlow PKI at initial switch
1269               setup; <code>ovs-vswitchd</code> does not use it at all.</p>
1270           </dd>
1271         </dl>
1272         <p>
1273           The following connection methods are currently supported for service
1274           controllers:
1275         </p>
1276         <dl>
1277           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
1278           <dd>
1279             <p>
1280               Listens for SSL connections on the specified TCP <var>port</var>
1281               (default: 6633).  If <var>ip</var>, which must be expressed as an
1282               IP address (not a DNS name), is specified, then connections are
1283               restricted to the specified local IP address.
1284             </p>
1285             <p>
1286               The <ref table="Open_vSwitch" column="ssl"/> column in the <ref
1287               table="Open_vSwitch"/> table must point to a valid SSL
1288               configuration when this form is used.
1289             </p>
1290             <p>SSL support is an optional feature that is not always built as
1291               part of Open vSwitch.</p>
1292           </dd>
1293           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
1294           <dd>
1295             Listens for connections on the specified TCP <var>port</var>
1296             (default: 6633).  If <var>ip</var>, which must be expressed as an
1297             IP address (not a DNS name), is specified, then connections are
1298             restricted to the specified local IP address.
1299           </dd>
1300         </dl>
1301         <p>When multiple controllers are configured for a single bridge, the
1302           <ref column="target"/> values must be unique.  Duplicate
1303           <ref column="target"/> values yield unspecified results.</p>
1304       </column>
1305
1306       <column name="connection_mode">
1307         <p>If it is specified, this setting must be one of the following
1308         strings that describes how Open vSwitch contacts this OpenFlow
1309         controller over the network:</p>
1310
1311         <dl>
1312           <dt><code>in-band</code></dt>
1313           <dd>In this mode, this controller's OpenFlow traffic travels over the
1314             bridge associated with the controller.  With this setting, Open
1315             vSwitch allows traffic to and from the controller regardless of the
1316             contents of the OpenFlow flow table.  (Otherwise, Open vSwitch
1317             would never be able to connect to the controller, because it did
1318             not have a flow to enable it.)  This is the most common connection
1319             mode because it is not necessary to maintain two independent
1320             networks.</dd>
1321           <dt><code>out-of-band</code></dt>
1322           <dd>In this mode, OpenFlow traffic uses a control network separate
1323             from the bridge associated with this controller, that is, the
1324             bridge does not use any of its own network devices to communicate
1325             with the controller.  The control network must be configured
1326             separately, before or after <code>ovs-vswitchd</code> is started.
1327           </dd>
1328         </dl>
1329
1330         <p>If not specified, the default is implementation-specific.  If
1331           <ref column="target"/> is <code>discover</code>, the connection mode
1332           is always treated as <code>in-band</code> regardless of the actual
1333           setting.</p>
1334       </column>
1335     </group>
1336
1337     <group title="Controller Failure Detection and Handling">
1338       <column name="max_backoff">
1339         Maximum number of milliseconds to wait between connection attempts.
1340         Default is implementation-specific.
1341       </column>
1342
1343       <column name="inactivity_probe">
1344         Maximum number of milliseconds of idle time on connection to
1345         controller before sending an inactivity probe message.  If Open
1346         vSwitch does not communicate with the controller for the specified
1347         number of seconds, it will send a probe.  If a response is not
1348         received for the same additional amount of time, Open vSwitch
1349         assumes the connection has been broken and attempts to reconnect.
1350         Default is implementation-specific.
1351       </column>
1352     </group>
1353
1354     <group title="OpenFlow Rate Limiting">
1355         <column name="controller_rate_limit">
1356           <p>The maximum rate at which packets in unknown flows will be
1357             forwarded to the OpenFlow controller, in packets per second.  This
1358             feature prevents a single bridge from overwhelming the controller.
1359             If not specified, the default is implementation-specific.</p>
1360           <p>In addition, when a high rate triggers rate-limiting, Open
1361             vSwitch queues controller packets for each port and transmits
1362             them to the controller at the configured rate.  The number of
1363             queued packets is limited by
1364             the <ref column="controller_burst_limit"/> value.  The packet
1365             queue is shared fairly among the ports on a bridge.</p><p>Open
1366             vSwitch maintains two such packet rate-limiters per bridge.
1367             One of these applies to packets sent up to the controller
1368             because they do not correspond to any flow.  The other applies
1369             to packets sent up to the controller by request through flow
1370             actions. When both rate-limiters are filled with packets, the
1371             actual rate that packets are sent to the controller is up to
1372             twice the specified rate.</p>
1373         </column>
1374
1375         <column name="controller_burst_limit">
1376           In conjunction with <ref column="controller_rate_limit"/>,
1377           the maximum number of unused packet credits that the bridge will
1378           allow to accumulate, in packets.  If not specified, the default
1379           is implementation-specific.
1380         </column>
1381     </group>
1382
1383     <group title="Additional Discovery Configuration">
1384       <p>These values are considered only when <ref column="target"/>
1385         is <code>discover</code>.</p>
1386
1387       <column name="discover_accept_regex">
1388         A POSIX
1389         extended regular expression against which the discovered controller
1390         location is validated.  The regular expression is implicitly
1391         anchored at the beginning of the controller location string, as
1392         if it begins with <code>^</code>.  If not specified, the default
1393         is implementation-specific.
1394       </column>
1395
1396       <column name="discover_update_resolv_conf">
1397         Whether to update <code>/etc/resolv.conf</code> when the
1398         controller is discovered.  If not specified, the default
1399         is implementation-specific.  Open vSwitch will only modify
1400         <code>/etc/resolv.conf</code> if the DHCP response that it receives
1401         specifies one or more DNS servers.
1402       </column>
1403     </group>
1404
1405     <group title="Additional In-Band Configuration">
1406       <p>These values are considered only in in-band control mode (see
1407         <ref column="connection_mode"/>) and only when <ref column="target"/>
1408         is not <code>discover</code>.  (For controller discovery, the network
1409         configuration obtained via DHCP is used instead.)</p>
1410
1411       <p>When multiple controllers are configured on a single bridge, there
1412         should be only one set of unique values in these columns.  If different
1413         values are set for these columns in different controllers, the effect
1414         is unspecified.</p>
1415
1416       <column name="local_ip">
1417         The IP address to configure on the local port,
1418         e.g. <code>192.168.0.123</code>.  If this value is unset, then
1419         <ref column="local_netmask"/> and <ref column="local_gateway"/> are
1420         ignored.
1421       </column>
1422
1423       <column name="local_netmask">
1424         The IP netmask to configure on the local port,
1425         e.g. <code>255.255.255.0</code>.  If <ref column="local_ip"/> is set
1426         but this value is unset, then the default is chosen based on whether
1427         the IP address is class A, B, or C.
1428       </column>
1429
1430       <column name="local_gateway">
1431         The IP address of the gateway to configure on the local port, as a
1432         string, e.g. <code>192.168.0.1</code>.  Leave this column unset if
1433         this network has no gateway.
1434       </column>
1435     </group>
1436
1437     <group title="Other Features">
1438       <column name="external_ids">
1439         Key-value pairs for use by external frameworks that integrate with Open
1440         vSwitch, rather than by Open vSwitch itself.  System integrators should
1441         either use the Open vSwitch development mailing list to coordinate on
1442         common key-value definitions, or choose key names that are likely to be
1443         unique.  No common key-value pairs are currently defined.
1444       </column>
1445     </group>
1446   </table>
1447
1448   <table name="NetFlow">
1449     A NetFlow target.  NetFlow is a protocol that exports a number of
1450     details about terminating IP flows, such as the principals involved
1451     and duration.
1452
1453     <column name="targets">
1454       NetFlow targets in the form
1455       <code><var>ip</var>:<var>port</var></code>.  The <var>ip</var>
1456       must be specified numerically, not as a DNS name.
1457     </column>
1458
1459     <column name="engine_id">
1460       Engine ID to use in NetFlow messages.  Defaults to datapath index
1461       if not specified.
1462     </column>
1463
1464     <column name="engine_type">
1465       Engine type to use in NetFlow messages.  Defaults to datapath
1466       index if not specified.
1467     </column>
1468
1469     <column name="active_timeout">
1470       The interval at which NetFlow records are sent for flows that are
1471       still active, in seconds.  A value of <code>0</code> requests the
1472       default timeout (currently 600 seconds); a value of <code>-1</code>
1473       disables active timeouts.
1474     </column>
1475
1476     <column name="add_id_to_interface">
1477       <p>If this column's value is <code>false</code>, the ingress and egress
1478         interface fields of NetFlow flow records are derived from OpenFlow port
1479         numbers.  When it is <code>true</code>, the 7 most significant bits of
1480         these fields will be replaced by the least significant 7 bits of the
1481         engine id.  This is useful because many NetFlow collectors do not
1482         expect multiple switches to be sending messages from the same host, so
1483         they do not store the engine information which could be used to
1484         disambiguate the traffic.</p>
1485       <p>When this option is enabled, a maximum of 508 ports are supported.</p>
1486     </column>
1487
1488     <column name="external_ids">
1489       Key-value pairs for use by external frameworks that integrate with Open
1490       vSwitch, rather than by Open vSwitch itself.  System integrators should
1491       either use the Open vSwitch development mailing list to coordinate on
1492       common key-value definitions, or choose key names that are likely to be
1493       unique.  No common key-value pairs are currently defined.
1494     </column>
1495   </table>
1496
1497   <table name="SSL">
1498     SSL configuration for an Open_vSwitch.
1499
1500     <column name="private_key">
1501       Name of a PEM file containing the private key used as the switch's
1502       identity for SSL connections to the controller.
1503     </column>
1504
1505     <column name="certificate">
1506       Name of a PEM file containing a certificate, signed by the
1507       certificate authority (CA) used by the controller and manager,
1508       that certifies the switch's private key, identifying a trustworthy
1509       switch.
1510     </column>
1511
1512     <column name="ca_cert">
1513       Name of a PEM file containing the CA certificate used to verify
1514       that the switch is connected to a trustworthy controller.
1515     </column>
1516
1517     <column name="bootstrap_ca_cert">
1518       If set to <code>true</code>, then Open vSwitch will attempt to
1519       obtain the CA certificate from the controller on its first SSL
1520       connection and save it to the named PEM file. If it is successful,
1521       it will immediately drop the connection and reconnect, and from then
1522       on all SSL connections must be authenticated by a certificate signed
1523       by the CA certificate thus obtained.  <em>This option exposes the
1524         SSL connection to a man-in-the-middle attack obtaining the initial
1525         CA certificate.</em>  It may still be useful for bootstrapping.
1526     </column>
1527
1528     <column name="external_ids">
1529       Key-value pairs for use by external frameworks that integrate with Open
1530       vSwitch, rather than by Open vSwitch itself.  System integrators should
1531       either use the Open vSwitch development mailing list to coordinate on
1532       common key-value definitions, or choose key names that are likely to be
1533       unique.  No common key-value pairs are currently defined.
1534     </column>
1535   </table>
1536
1537   <table name="sFlow">
1538     <p>An sFlow(R) target.  sFlow is a protocol for remote monitoring
1539       of switches.</p>
1540
1541     <column name="agent">
1542       Name of the network device whose IP address should be reported as the
1543       ``agent address'' to collectors.  If not specified, the IP address
1544       defaults to the <ref table="Controller" column="local_ip"/> in the
1545       collector's <ref table="Controller"/>.  If an agent IP address cannot be
1546       determined either way, sFlow is disabled.
1547     </column>
1548
1549     <column name="header">
1550       Number of bytes of a sampled packet to send to the collector.
1551       If not specified, the default is 128 bytes.
1552     </column>
1553
1554     <column name="polling">
1555       Polling rate in seconds to send port statistics to the collector.
1556       If not specified, defaults to 30 seconds.
1557     </column>
1558
1559     <column name="sampling">
1560       Rate at which packets should be sampled and sent to the collector.
1561       If not specified, defaults to 400, which means one out of 400
1562       packets, on average, will be sent to the collector.
1563     </column>
1564
1565     <column name="targets">
1566       sFlow targets in the form
1567       <code><var>ip</var>:<var>port</var></code>.
1568     </column>
1569
1570     <column name="external_ids">
1571       Key-value pairs for use by external frameworks that integrate with Open
1572       vSwitch, rather than by Open vSwitch itself.  System integrators should
1573       either use the Open vSwitch development mailing list to coordinate on
1574       common key-value definitions, or choose key names that are likely to be
1575       unique.  No common key-value pairs are currently defined.
1576     </column>
1577   </table>
1578
1579   <table name="Capability">
1580     <p>Records in this table describe functionality supported by the hardware
1581       and software platform on which this Open vSwitch is based.  Clients
1582       should not modify this table.</p>
1583
1584     <p>A record in this table is meaningful only if it is referenced by the
1585       <ref table="Open_vSwitch" column="capabilities"/> column in the
1586       <ref table="Open_vSwitch"/> table.  The key used to reference it, called
1587       the record's ``category,'' determines the meanings of the
1588       <ref column="details"/> column.  The following general forms of
1589       categories are currently defined:</p>
1590
1591     <dl>
1592       <dt><code>qos-<var>type</var></code></dt>
1593       <dd><var>type</var> is supported as the value for
1594         <ref column="type" table="QoS"/> in the <ref table="QoS"/> table.
1595       </dd>
1596     </dl>
1597
1598     <column name="details">
1599       <p>Key-value pairs that describe capabilities.  The meaning of the pairs
1600       depends on the category key that the <ref table="Open_vSwitch"
1601       column="capabilities"/> column in the <ref table="Open_vSwitch"/> table
1602       uses to reference this record, as described above.</p>
1603
1604       <p>The presence of a record for category <code>qos-<var>type</var></code>
1605           indicates that the switch supports <var>type</var> as the value of
1606           the <ref table="QoS" column="type"/> column in the <ref table="QoS"/>
1607           table.  The following key-value pairs are defined to further describe
1608           QoS capabilities:</p>
1609
1610       <dl>
1611         <dt><code>n-queues</code></dt>
1612         <dd>Number of supported queues, as a positive integer.  Keys in the
1613           <ref table="QoS" column="queues"/> column for <ref table="QoS"/>
1614           records whose <ref table="QoS" column="type"/> value
1615           equals <var>type</var> must range between 0 and this value minus one,
1616           inclusive.</dd>
1617       </dl>
1618     </column>
1619   </table>
1620 </database>