netdev: Enforce a floor "linux-htb" min-rate
[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.  If IPsec is enabled through the
665                 <ref column="other_config"/> parameters, header caching will be
666                 automatically disabled.</dd>
667             </dl>
668           </dd>
669           <dt><code>capwap</code></dt>
670           <dd>Ethernet tunneling over the UDP transport portion of CAPWAP
671              (RFC 5415).  This allows interoperability with certain switches
672              where GRE is not available.  Note that only the tunneling component
673              of the protocol is implemented.  Due to the non-standard use of
674              CAPWAP, UDP ports 58881 and 58882 are used as the source and
675              destinations ports respectivedly.  Each tunnel must be uniquely
676              identified by the combination of <code>remote_ip</code> and
677              <code>local_ip</code>.  If two ports are defined that are the same
678              except one includes <code>local_ip</code> and the other does not,
679              the more specific one is matched first.  CAPWAP support is not
680              available on all platforms.  Currently it is only supported in the
681              Linux kernel module with kernel versions >= 2.6.25.  The following
682              options may be specified in the <ref column="options"/> column:
683             <dl>
684               <dt><code>remote_ip</code></dt>
685               <dd>Required.  The tunnel endpoint.</dd>
686             </dl>
687             <dl>
688               <dt><code>local_ip</code></dt>
689               <dd>Optional.  The destination IP that received packets must
690                 match.  Default is to match all addresses.</dd>
691             </dl>
692             <dl>
693               <dt><code>tos</code></dt>
694               <dd>Optional.  The value of the ToS bits to be set on the
695                 encapsulating packet.  It may also be the word
696                 <code>inherit</code>, in which case the ToS will be copied from
697                 the inner packet if it is IPv4 or IPv6 (otherwise it will be
698                 0).  Note that the ECN fields are always inherited.  Default is
699                 0.</dd>
700             </dl>
701             <dl>
702               <dt><code>ttl</code></dt>
703               <dd>Optional.  The TTL to be set on the encapsulating packet.
704                 It may also be the word <code>inherit</code>, in which case the
705                 TTL will be copied from the inner packet if it is IPv4 or IPv6
706                 (otherwise it will be the system default, typically 64).
707                 Default is the system default TTL.</dd>
708             </dl>
709             <dl>
710               <dt><code>pmtud</code></dt>
711               <dd>Optional.  Enable tunnel path MTU discovery.  If enabled
712                 ``ICMP destination unreachable - fragmentation'' needed
713                 messages will be generated for IPv4 packets with the DF bit set
714                 and IPv6 packets above the minimum MTU if the packet size
715                 exceeds the path MTU minus the size of the tunnel headers.  It
716                 also forces the encapsulating packet DF bit to be set (it is
717                 always set if the inner packet implies path MTU discovery).
718                 Note that this option causes behavior that is typically
719                 reserved for routers and therefore is not entirely in
720                 compliance with the IEEE 802.1D specification for bridges.
721                 Default is enabled, set to <code>false</code> to disable.</dd>
722             </dl>
723             <dl>
724               <dt><code>header_cache</code></dt>
725               <dd>Optional.  Enable caching of tunnel headers and the output
726                 path.  This can lead to a significant performance increase
727                 without changing behavior.  In general it should not be
728                 necessary to adjust this setting.  However, the caching can
729                 bypass certain components of the IP stack (such as IP tables)
730                 and it may be useful to disable it if these features are
731                 required or as a debugging measure.  Default is enabled, set to
732                 <code>false</code> to disable.</dd>
733             </dl>
734           </dd>
735           <dt><code>patch</code></dt>
736           <dd>
737             <p>
738               A pair of virtual devices that act as a patch cable.  The <ref
739               column="options"/> column must have the following key-value pair:
740             </p>
741             <dl>
742               <dt><code>peer</code></dt>
743               <dd>
744                 The <ref column="name"/> of the <ref table="Interface"/> for
745                 the other side of the patch.  The named <ref
746                 table="Interface"/>'s own <code>peer</code> option must specify
747                 this <ref table="Interface"/>'s name.  That is, the two patch
748                 interfaces must have reversed <ref column="name"/> and
749                 <code>peer</code> values.
750               </dd>
751             </dl>
752           </dd>
753         </dl>
754       </column>
755
756       <column name="options">
757         Configuration options whose interpretation varies based on
758         <ref column="type"/>.
759       </column>
760
761       <column name="status">
762         <p>
763           Key-value pairs that report port status.  Supported status
764           values are <code>type</code>-dependent.
765         </p>
766         <p>The only currently defined key-value pair is:</p>
767         <dl>
768           <dt><code>source_ip</code></dt>
769           <dd>The source IP address used for an IPv4 tunnel end-point,
770             such as <code>gre</code> or <code>capwap</code>.  Not
771             supported by all implementations.</dd>
772         </dl>
773       </column>
774     </group>
775
776     <group title="Ingress Policing">
777       <p>
778         These settings control ingress policing for packets received on this
779         interface.  On a physical interface, this limits the rate at which
780         traffic is allowed into the system from the outside; on a virtual
781         interface (one connected to a virtual machine), this limits the rate at
782         which the VM is able to transmit.
783       </p>
784       <p>
785         Policing is a simple form of quality-of-service that simply drops
786         packets received in excess of the configured rate.  Due to its
787         simplicity, policing is usually less accurate and less effective than
788         egress QoS (which is configured using the <ref table="QoS"/> and <ref
789         table="Queue"/> tables).
790       </p>
791       <p>
792         Policing is currently implemented only on Linux.  The Linux
793         implementation uses a simple ``token bucket'' approach:
794       </p>
795       <ul>
796         <li>
797           The size of the bucket corresponds to <ref
798           column="ingress_policing_burst"/>.  Initially the bucket is full.
799         </li>
800         <li>
801           Whenever a packet is received, its size (converted to tokens) is
802           compared to the number of tokens currently in the bucket.  If the
803           required number of tokens are available, they are removed and the
804           packet is forwarded.  Otherwise, the packet is dropped.
805         </li>
806         <li>
807           Whenever it is not full, the bucket is refilled with tokens at the
808           rate specified by <ref column="ingress_policing_rate"/>.
809         </li>
810       </ul>
811       <p>
812         Policing interacts badly with some network protocols, and especially
813         with fragmented IP packets.  Suppose that there is enough network
814         activity to keep the bucket nearly empty all the time.  Then this token
815         bucket algorithm will forward a single packet every so often, with the
816         period depending on packet size and on the configured rate.  All of the
817         fragments of an IP packets are normally transmitted back-to-back, as a
818         group.  In such a situation, therefore, only one of these fragments
819         will be forwarded and the rest will be dropped.  IP does not provide
820         any way for the intended recipient to ask for only the remaining
821         fragments.  In such a case there are two likely possibilities for what
822         will happen next: either all of the fragments will eventually be
823         retransmitted (as TCP will do), in which case the same problem will
824         recur, or the sender will not realize that its packet has been dropped
825         and data will simply be lost (as some UDP-based protocols will do).
826         Either way, it is possible that no forward progress will ever occur.
827       </p>
828       <column name="ingress_policing_rate">
829         <p>
830           Maximum rate for data received on this interface, in kbps.  Data
831           received faster than this rate is dropped.  Set to <code>0</code>
832           (the default) to disable policing.
833         </p>
834       </column>
835
836       <column name="ingress_policing_burst">
837         <p>Maximum burst size for data received on this interface, in kb.  The
838           default burst size if set to <code>0</code> is 1000 kb.  This value
839           has no effect if <ref column="ingress_policing_rate"/>
840           is <code>0</code>.</p>
841         <p>
842           Specifying a larger burst size lets the algorithm be more forgiving,
843           which is important for protocols like TCP that react severely to
844           dropped packets.  The burst size should be at least the size of the
845           interface's MTU.  Specifying a value that is numerically at least as
846           large as 10% of <ref column="ingress_policing_rate"/> helps TCP come
847           closer to achieving the full rate.
848         </p>
849       </column>
850     </group>
851
852     <group title="Other Features">
853       <column name="external_ids">
854         Key-value pairs for use by external frameworks that integrate
855         with Open vSwitch, rather than by Open vSwitch itself.  System
856         integrators should either use the Open vSwitch development
857         mailing list to coordinate on common key-value definitions, or
858         choose key names that are likely to be unique.  The currently
859         defined common key-value pairs are:
860         <dl>
861           <dt><code>attached-mac</code></dt>
862           <dd>
863             The MAC address programmed into the ``virtual hardware'' for this
864             interface, in the form
865             <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
866             For Citrix XenServer, this is the value of the <code>MAC</code>
867             field in the VIF record for this interface.</dd>
868           <dt><code>iface-id</code></dt>
869           <dd>A system-unique identifier for the interface.  On XenServer, 
870             this will commonly be the same as <code>xs-vif-uuid</code>.</dd>
871         </dl>
872         <p>
873           Additionally the following key-value pairs specifically
874           apply to an interface that represents a virtual Ethernet interface
875           connected to a virtual machine.  These key-value pairs should not be
876           present for other types of interfaces.  Keys whose names end
877           in <code>-uuid</code> have values that uniquely identify the entity
878           in question.  For a Citrix XenServer hypervisor, these values are
879           UUIDs in RFC 4122 format.  Other hypervisors may use other
880           formats.
881         </p>
882         <p>The currently defined key-value pairs for XenServer are:</p>
883         <dl>
884           <dt><code>xs-vif-uuid</code></dt>
885           <dd>The virtual interface associated with this interface.</dd>
886           <dt><code>xs-network-uuid</code></dt>
887           <dd>The virtual network to which this interface is attached.</dd>
888           <dt><code>xs-vm-uuid</code></dt>
889           <dd>The VM to which this interface belongs.</dd>
890         </dl>
891       </column>
892
893       <column name="other_config">
894         Key-value pairs for rarely used interface features.  Currently,
895         the only keys are for configuring GRE-over-IPsec, which is only
896         available through the <code>openvswitch-ipsec</code> package for
897         Debian.  The currently defined key-value pairs are:
898         <dl>
899           <dt><code>ipsec_local_ip</code></dt>
900           <dd>Required key for GRE-over-IPsec interfaces.  Additionally,
901             the <ref column="type"/> must be <code>gre</code> and the
902             <code>ipsec_psk</code> <ref column="other_config"/> key must
903             be set.  The <code>in_key</code>, <code>out_key</code>, and
904             <code>key</code> <ref column="options"/> must not be
905             set.</dd>
906           <dt><code>ipsec_psk</code></dt>
907           <dd>Required key for GRE-over-IPsec interfaces.  Specifies a
908             pre-shared key for authentication that must be identical on 
909             both sides of the tunnel.  Additionally, the
910             <code>ipsec_local_ip</code> key must also be set.</dd>
911         </dl>
912       </column>
913
914       <column name="statistics">
915         <p>
916           Key-value pairs that report interface statistics.  The current
917           implementation updates these counters periodically.  In the future,
918           we plan to, instead, update them when an interface is created, when
919           they are queried (e.g. using an OVSDB <code>select</code> operation),
920           and just before an interface is deleted due to virtual interface
921           hot-unplug or VM shutdown, and perhaps at other times, but not on any
922           regular periodic basis.</p>
923         <p>
924           The currently defined key-value pairs are listed below.  These are
925           the same statistics reported by OpenFlow in its <code>struct
926           ofp_port_stats</code> structure.  If an interface does not support a
927           given statistic, then that pair is omitted.</p>
928         <ul>
929           <li>
930             Successful transmit and receive counters:
931             <dl>
932               <dt><code>rx_packets</code></dt>
933               <dd>Number of received packets.</dd>
934               <dt><code>rx_bytes</code></dt>
935               <dd>Number of received bytes.</dd>
936               <dt><code>tx_packets</code></dt>
937               <dd>Number of transmitted packets.</dd>
938               <dt><code>tx_bytes</code></dt>
939               <dd>Number of transmitted bytes.</dd>
940             </dl>
941           </li>
942           <li>
943             Receive errors:
944             <dl>
945               <dt><code>rx_dropped</code></dt>
946               <dd>Number of packets dropped by RX.</dd>
947               <dt><code>rx_frame_err</code></dt>
948               <dd>Number of frame alignment errors.</dd>
949               <dt><code>rx_over_err</code></dt>
950               <dd>Number of packets with RX overrun.</dd>
951               <dt><code>rx_crc_err</code></dt>
952               <dd>Number of CRC errors.</dd>
953               <dt><code>rx_errors</code></dt>
954               <dd>
955                 Total number of receive errors, greater than or equal
956                 to the sum of the above.
957               </dd>
958             </dl>
959           </li>
960           <li>
961             Transmit errors:
962             <dl>
963               <dt><code>tx_dropped</code></dt>
964               <dd>Number of packets dropped by TX.</dd>
965               <dt><code>collisions</code></dt>
966               <dd>Number of collisions.</dd>
967               <dt><code>tx_errors</code></dt>
968               <dd>
969                 Total number of transmit errors, greater
970                 than or equal to the sum of the above.
971               </dd>
972             </dl>
973           </li>
974         </ul>
975       </column>
976     </group>
977   </table>
978
979   <table name="QoS" title="Quality of Service configuration">
980     <p>Quality of Service (QoS) configuration for each Port that
981       references it.</p>
982
983     <column name="type">
984       <p>The type of QoS to implement.  The <ref table="Open_vSwitch"
985         column="capabilities"/> column in the <ref table="Open_vSwitch"/> table
986         identifies the types that a switch actually supports.  The currently
987         defined types are listed below:</p>
988       <dl>
989         <dt><code>linux-htb</code></dt>
990         <dd>
991           Linux ``hierarchy token bucket'' classifier.  See tc-htb(8) (also at
992           <code>http://linux.die.net/man/8/tc-htb</code>) and the HTB manual
993           (<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
994           for information on how this classifier works and how to configure it.
995         </dd>
996       </dl>
997     </column>
998
999     <column name="queues">
1000       <p>A map from queue numbers to <ref table="Queue"/> records.  The
1001         supported range of queue numbers depend on <ref column="type"/>.  The
1002         queue numbers are the same as the <code>queue_id</code> used in
1003         OpenFlow in <code>struct ofp_action_enqueue</code> and other
1004         structures.  Queue 0 is used by OpenFlow output actions that do not
1005         specify a specific queue.</p>
1006     </column>
1007
1008     <column name="other_config">
1009       <p>Key-value pairs for configuring QoS features that depend on
1010         <ref column="type"/>.</p>
1011       <p>The <code>linux-htb</code> class supports the following key-value
1012         pairs:</p>
1013       <dl>
1014         <dt><code>max-rate</code></dt>
1015         <dd>Maximum rate shared by all queued traffic, in bit/s.
1016           Optional.  If not specified, for physical interfaces, the
1017           default is the link rate.  For other interfaces or if the
1018           link rate cannot be determined, the default is currently 100
1019           Mbps.</dd>
1020       </dl>
1021     </column>
1022
1023     <column name="external_ids">
1024       Key-value pairs for use by external frameworks that integrate with Open
1025       vSwitch, rather than by Open vSwitch itself.  System integrators should
1026       either use the Open vSwitch development mailing list to coordinate on
1027       common key-value definitions, or choose key names that are likely to be
1028       unique.  No common key-value pairs are currently defined.
1029     </column>
1030   </table>
1031
1032   <table name="Queue" title="QoS output queue.">
1033     <p>A configuration for a port output queue, used in configuring Quality of
1034       Service (QoS) features.  May be referenced by <ref column="queues"
1035       table="QoS"/> column in <ref table="QoS"/> table.</p>
1036
1037     <column name="other_config">
1038       <p>Key-value pairs for configuring the output queue.  The supported
1039         key-value pairs and their meanings depend on the <ref column="type"/>
1040         of the <ref column="QoS"/> records that reference this row.</p>
1041       <p>The key-value pairs defined for <ref table="QoS"/> <ref table="QoS"
1042         column="type"/> of <code>min-rate</code> are:</p>
1043       <dl>
1044         <dt><code>min-rate</code></dt>
1045         <dd>Minimum guaranteed bandwidth, in bit/s.  Required.  The
1046           floor value is 1500 bytes/s (12,000 bit/s).</dd>
1047       </dl>
1048       <p>The key-value pairs defined for <ref table="QoS"/> <ref table="QoS"
1049         column="type"/> of <code>linux-htb</code> are:</p>
1050       <dl>
1051         <dt><code>min-rate</code></dt>
1052         <dd>Minimum guaranteed bandwidth, in bit/s.  Required.</dd>
1053         <dt><code>max-rate</code></dt>
1054         <dd>Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
1055           queue's rate will not be allowed to exceed the specified value, even
1056           if excess bandwidth is available.  If unspecified, defaults to no
1057           limit.</dd>
1058         <dt><code>burst</code></dt>
1059         <dd>Burst size, in bits.  This is the maximum amount of ``credits''
1060           that a queue can accumulate while it is idle.  Optional.  Details of
1061           the <code>linux-htb</code> implementation require a minimum burst
1062           size, so a too-small <code>burst</code> will be silently
1063           ignored.</dd>
1064         <dt><code>priority</code></dt>
1065         <dd>A nonnegative 32-bit integer.  Defaults to 0 if
1066           unspecified.  A queue with a smaller <code>priority</code>
1067           will receive all the excess bandwidth that it can use before
1068           a queue with a larger value receives any.  Specific priority
1069           values are unimportant; only relative ordering matters.</dd>
1070       </dl>
1071     </column>
1072
1073     <column name="external_ids">
1074       Key-value pairs for use by external frameworks that integrate with Open
1075       vSwitch, rather than by Open vSwitch itself.  System integrators should
1076       either use the Open vSwitch development mailing list to coordinate on
1077       common key-value definitions, or choose key names that are likely to be
1078       unique.  No common key-value pairs are currently defined.
1079     </column>
1080   </table>
1081
1082   <table name="Mirror" title="Port mirroring (SPAN/RSPAN).">
1083     <p>A port mirror within a <ref table="Bridge"/>.</p>
1084     <p>A port mirror configures a bridge to send selected frames to special
1085       ``mirrored'' ports, in addition to their normal destinations.  Mirroring
1086       traffic may also be referred to as SPAN or RSPAN, depending on the
1087       mechanism used for delivery.</p>
1088
1089     <column name="name">
1090       Arbitrary identifier for the <ref table="Mirror"/>.
1091     </column>
1092
1093     <group title="Selecting Packets for Mirroring">
1094       <column name="select_all">
1095         If true, every packet arriving or departing on any port is
1096         selected for mirroring.
1097       </column>
1098
1099       <column name="select_dst_port">
1100         Ports on which departing packets are selected for mirroring.
1101       </column>
1102
1103       <column name="select_src_port">
1104         Ports on which arriving packets are selected for mirroring.
1105       </column>
1106
1107       <column name="select_vlan">
1108         VLANs on which packets are selected for mirroring.  An empty set
1109         selects packets on all VLANs.
1110       </column>
1111     </group>
1112
1113     <group title="Mirroring Destination Configuration">
1114       <column name="output_port">
1115         <p>Output port for selected packets, if nonempty.  Mutually exclusive
1116           with <ref column="output_vlan"/>.</p>
1117         <p>Specifying a port for mirror output reserves that port exclusively
1118           for mirroring.  No frames other than those selected for mirroring
1119           will be forwarded to the port, and any frames received on the port
1120           will be discarded.</p>
1121         <p>This type of mirroring is sometimes called SPAN.</p>
1122       </column>
1123
1124       <column name="output_vlan">
1125         <p>Output VLAN for selected packets, if nonempty.  Mutually exclusive
1126           with <ref column="output_port"/>.</p>
1127         <p>The frames will be sent out all ports that trunk
1128           <ref column="output_vlan"/>, as well as any ports with implicit VLAN
1129           <ref column="output_vlan"/>.  When a mirrored frame is sent out a
1130           trunk port, the frame's VLAN tag will be set to
1131           <ref column="output_vlan"/>, replacing any existing tag; when it is
1132           sent out an implicit VLAN port, the frame will not be tagged.  This
1133           type of mirroring is sometimes called RSPAN.</p>
1134         <p><em>Please note:</em> Mirroring to a VLAN can disrupt a network that
1135           contains unmanaged switches.  Consider an unmanaged physical switch
1136           with two ports: port 1, connected to an end host, and port 2,
1137           connected to an Open vSwitch configured to mirror received packets
1138           into VLAN 123 on port 2.  Suppose that the end host sends a packet on
1139           port 1 that the physical switch forwards to port 2.  The Open vSwitch
1140           forwards this packet to its destination and then reflects it back on
1141           port 2 in VLAN 123.  This reflected packet causes the unmanaged
1142           physical switch to replace the MAC learning table entry, which
1143           correctly pointed to port 1, with one that incorrectly points to port
1144           2.  Afterward, the physical switch will direct packets destined for
1145           the end host to the Open vSwitch on port 2, instead of to the end
1146           host on port 1, disrupting connectivity.  If mirroring to a VLAN is
1147           desired in this scenario, then the physical switch must be replaced
1148           by one that learns Ethernet addresses on a per-VLAN basis.  In
1149           addition, learning should be disabled on the VLAN containing mirrored
1150           traffic. If this is not done then intermediate switches will learn
1151           the MAC address of each end host from the mirrored traffic.  If
1152           packets being sent to that end host are also mirrored, then they will
1153           be dropped since the switch will attempt to send them out the input
1154           port. Disabling learning for the VLAN will cause the switch to
1155           correctly send the packet out all ports configured for that VLAN.  If
1156           Open vSwitch is being used as an intermediate switch, learning can be
1157           disabled by adding the mirrored VLAN to <ref column="flood_vlans"/>
1158           in the appropriate <ref table="Bridge"/> table or tables.</p>
1159       </column>
1160     </group>
1161
1162     <group title="Other Features">
1163       <column name="external_ids">
1164         Key-value pairs for use by external frameworks that integrate with Open
1165         vSwitch, rather than by Open vSwitch itself.  System integrators should
1166         either use the Open vSwitch development mailing list to coordinate on
1167         common key-value definitions, or choose key names that are likely to be
1168         unique.  No common key-value pairs are currently defined.
1169       </column>
1170     </group>
1171   </table>
1172
1173   <table name="Controller" title="OpenFlow controller configuration.">
1174     <p>An OpenFlow controller.</p>
1175
1176     <p>
1177       Open vSwitch supports two kinds of OpenFlow controllers:
1178     </p>
1179     
1180     <dl>
1181       <dt>Primary controllers</dt>
1182       <dd>
1183         <p>
1184           This is the kind of controller envisioned by the OpenFlow 1.0
1185           specification.  Usually, a primary controller implements a network
1186           policy by taking charge of the switch's flow table.
1187         </p>
1188
1189         <p>
1190           Open vSwitch initiates and maintains persistent connections to
1191           primary controllers, retrying the connection each time it fails or
1192           drops.  The <ref table="Bridge" column="fail_mode"/> column in the
1193           <ref table="Bridge"/> table applies to primary controllers.
1194         </p>
1195
1196         <p>
1197           Open vSwitch permits a bridge to have any number of primary
1198           controllers.  When multiple controllers are configured, Open
1199           vSwitch connects to all of them simultaneously.  Because
1200           OpenFlow 1.0 does not specify how multiple controllers
1201           coordinate in interacting with a single switch, more than
1202           one primary controller should be specified only if the
1203           controllers are themselves designed to coordinate with each
1204           other.  (The Nicira-defined <code>NXT_ROLE</code> OpenFlow
1205           vendor extension may be useful for this.)
1206         </p>
1207       </dd>
1208       <dt>Service controllers</dt>
1209       <dd>
1210         <p>
1211           These kinds of OpenFlow controller connections are intended for
1212           occasional support and maintenance use, e.g. with
1213           <code>ovs-ofctl</code>.  Usually a service controller connects only
1214           briefly to inspect or modify some of a switch's state.
1215         </p>
1216
1217         <p>
1218           Open vSwitch listens for incoming connections from service
1219           controllers.  The service controllers initiate and, if necessary,
1220           maintain the connections from their end.  The <ref table="Bridge"
1221           column="fail_mode"/> column in the <ref table="Bridge"/> table does
1222           not apply to service controllers.
1223         </p>
1224
1225         <p>
1226           Open vSwitch supports configuring any number of service controllers.
1227         </p>
1228       </dd>
1229     </dl>
1230
1231     <p>
1232       The <ref column="target"/> determines the type of controller.
1233     </p>
1234
1235     <group title="Core Features">
1236       <column name="target">
1237         <p>Connection method for controller.</p>
1238         <p>
1239           The following connection methods are currently supported for primary
1240           controllers:
1241         </p>
1242         <dl>
1243           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
1244           <dd>
1245             <p>The specified SSL <var>port</var> (default: 6633) on the host at
1246             the given <var>ip</var>, which must be expressed as an IP address
1247             (not a DNS name).  The <ref table="Open_vSwitch" column="ssl"/>
1248             column in the <ref table="Open_vSwitch"/> table must point to a
1249             valid SSL configuration when this form is used.</p>
1250             <p>SSL support is an optional feature that is not always built as
1251               part of Open vSwitch.</p>
1252           </dd>
1253           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
1254           <dd>The specified TCP <var>port</var> (default: 6633) on the host at
1255             the given <var>ip</var>, which must be expressed as an IP address
1256             (not a DNS name).</dd>
1257           <dt><code>discover</code></dt>
1258           <dd>
1259             <p>Enables controller discovery.</p>
1260             <p>In controller discovery mode, Open vSwitch broadcasts a DHCP
1261               request with vendor class identifier <code>OpenFlow</code> across
1262               all of the bridge's network devices.  It will accept any valid
1263               DHCP reply that has the same vendor class identifier and includes
1264               a vendor-specific option with code 1 whose contents are a string
1265               specifying the location of the controller in the same format as
1266               <ref column="target"/>.</p>
1267             <p>The DHCP reply may also, optionally, include a vendor-specific
1268               option with code 2 whose contents are a string specifying the URI
1269               to the base of the OpenFlow PKI
1270               (e.g. <code>http://192.168.0.1/openflow/pki</code>).  This URI is
1271               used only for bootstrapping the OpenFlow PKI at initial switch
1272               setup; <code>ovs-vswitchd</code> does not use it at all.</p>
1273           </dd>
1274         </dl>
1275         <p>
1276           The following connection methods are currently supported for service
1277           controllers:
1278         </p>
1279         <dl>
1280           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
1281           <dd>
1282             <p>
1283               Listens for SSL connections on the specified TCP <var>port</var>
1284               (default: 6633).  If <var>ip</var>, which must be expressed as an
1285               IP address (not a DNS name), is specified, then connections are
1286               restricted to the specified local IP address.
1287             </p>
1288             <p>
1289               The <ref table="Open_vSwitch" column="ssl"/> column in the <ref
1290               table="Open_vSwitch"/> table must point to a valid SSL
1291               configuration when this form is used.
1292             </p>
1293             <p>SSL support is an optional feature that is not always built as
1294               part of Open vSwitch.</p>
1295           </dd>
1296           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
1297           <dd>
1298             Listens for connections on the specified TCP <var>port</var>
1299             (default: 6633).  If <var>ip</var>, which must be expressed as an
1300             IP address (not a DNS name), is specified, then connections are
1301             restricted to the specified local IP address.
1302           </dd>
1303         </dl>
1304         <p>When multiple controllers are configured for a single bridge, the
1305           <ref column="target"/> values must be unique.  Duplicate
1306           <ref column="target"/> values yield unspecified results.</p>
1307       </column>
1308
1309       <column name="connection_mode">
1310         <p>If it is specified, this setting must be one of the following
1311         strings that describes how Open vSwitch contacts this OpenFlow
1312         controller over the network:</p>
1313
1314         <dl>
1315           <dt><code>in-band</code></dt>
1316           <dd>In this mode, this controller's OpenFlow traffic travels over the
1317             bridge associated with the controller.  With this setting, Open
1318             vSwitch allows traffic to and from the controller regardless of the
1319             contents of the OpenFlow flow table.  (Otherwise, Open vSwitch
1320             would never be able to connect to the controller, because it did
1321             not have a flow to enable it.)  This is the most common connection
1322             mode because it is not necessary to maintain two independent
1323             networks.</dd>
1324           <dt><code>out-of-band</code></dt>
1325           <dd>In this mode, OpenFlow traffic uses a control network separate
1326             from the bridge associated with this controller, that is, the
1327             bridge does not use any of its own network devices to communicate
1328             with the controller.  The control network must be configured
1329             separately, before or after <code>ovs-vswitchd</code> is started.
1330           </dd>
1331         </dl>
1332
1333         <p>If not specified, the default is implementation-specific.  If
1334           <ref column="target"/> is <code>discover</code>, the connection mode
1335           is always treated as <code>in-band</code> regardless of the actual
1336           setting.</p>
1337       </column>
1338     </group>
1339
1340     <group title="Controller Failure Detection and Handling">
1341       <column name="max_backoff">
1342         Maximum number of milliseconds to wait between connection attempts.
1343         Default is implementation-specific.
1344       </column>
1345
1346       <column name="inactivity_probe">
1347         Maximum number of milliseconds of idle time on connection to
1348         controller before sending an inactivity probe message.  If Open
1349         vSwitch does not communicate with the controller for the specified
1350         number of seconds, it will send a probe.  If a response is not
1351         received for the same additional amount of time, Open vSwitch
1352         assumes the connection has been broken and attempts to reconnect.
1353         Default is implementation-specific.
1354       </column>
1355     </group>
1356
1357     <group title="OpenFlow Rate Limiting">
1358         <column name="controller_rate_limit">
1359           <p>The maximum rate at which packets in unknown flows will be
1360             forwarded to the OpenFlow controller, in packets per second.  This
1361             feature prevents a single bridge from overwhelming the controller.
1362             If not specified, the default is implementation-specific.</p>
1363           <p>In addition, when a high rate triggers rate-limiting, Open
1364             vSwitch queues controller packets for each port and transmits
1365             them to the controller at the configured rate.  The number of
1366             queued packets is limited by
1367             the <ref column="controller_burst_limit"/> value.  The packet
1368             queue is shared fairly among the ports on a bridge.</p><p>Open
1369             vSwitch maintains two such packet rate-limiters per bridge.
1370             One of these applies to packets sent up to the controller
1371             because they do not correspond to any flow.  The other applies
1372             to packets sent up to the controller by request through flow
1373             actions. When both rate-limiters are filled with packets, the
1374             actual rate that packets are sent to the controller is up to
1375             twice the specified rate.</p>
1376         </column>
1377
1378         <column name="controller_burst_limit">
1379           In conjunction with <ref column="controller_rate_limit"/>,
1380           the maximum number of unused packet credits that the bridge will
1381           allow to accumulate, in packets.  If not specified, the default
1382           is implementation-specific.
1383         </column>
1384     </group>
1385
1386     <group title="Additional Discovery Configuration">
1387       <p>These values are considered only when <ref column="target"/>
1388         is <code>discover</code>.</p>
1389
1390       <column name="discover_accept_regex">
1391         A POSIX
1392         extended regular expression against which the discovered controller
1393         location is validated.  The regular expression is implicitly
1394         anchored at the beginning of the controller location string, as
1395         if it begins with <code>^</code>.  If not specified, the default
1396         is implementation-specific.
1397       </column>
1398
1399       <column name="discover_update_resolv_conf">
1400         Whether to update <code>/etc/resolv.conf</code> when the
1401         controller is discovered.  If not specified, the default
1402         is implementation-specific.  Open vSwitch will only modify
1403         <code>/etc/resolv.conf</code> if the DHCP response that it receives
1404         specifies one or more DNS servers.
1405       </column>
1406     </group>
1407
1408     <group title="Additional In-Band Configuration">
1409       <p>These values are considered only in in-band control mode (see
1410         <ref column="connection_mode"/>) and only when <ref column="target"/>
1411         is not <code>discover</code>.  (For controller discovery, the network
1412         configuration obtained via DHCP is used instead.)</p>
1413
1414       <p>When multiple controllers are configured on a single bridge, there
1415         should be only one set of unique values in these columns.  If different
1416         values are set for these columns in different controllers, the effect
1417         is unspecified.</p>
1418
1419       <column name="local_ip">
1420         The IP address to configure on the local port,
1421         e.g. <code>192.168.0.123</code>.  If this value is unset, then
1422         <ref column="local_netmask"/> and <ref column="local_gateway"/> are
1423         ignored.
1424       </column>
1425
1426       <column name="local_netmask">
1427         The IP netmask to configure on the local port,
1428         e.g. <code>255.255.255.0</code>.  If <ref column="local_ip"/> is set
1429         but this value is unset, then the default is chosen based on whether
1430         the IP address is class A, B, or C.
1431       </column>
1432
1433       <column name="local_gateway">
1434         The IP address of the gateway to configure on the local port, as a
1435         string, e.g. <code>192.168.0.1</code>.  Leave this column unset if
1436         this network has no gateway.
1437       </column>
1438     </group>
1439
1440     <group title="Other Features">
1441       <column name="external_ids">
1442         Key-value pairs for use by external frameworks that integrate with Open
1443         vSwitch, rather than by Open vSwitch itself.  System integrators should
1444         either use the Open vSwitch development mailing list to coordinate on
1445         common key-value definitions, or choose key names that are likely to be
1446         unique.  No common key-value pairs are currently defined.
1447       </column>
1448     </group>
1449   </table>
1450
1451   <table name="NetFlow">
1452     A NetFlow target.  NetFlow is a protocol that exports a number of
1453     details about terminating IP flows, such as the principals involved
1454     and duration.
1455
1456     <column name="targets">
1457       NetFlow targets in the form
1458       <code><var>ip</var>:<var>port</var></code>.  The <var>ip</var>
1459       must be specified numerically, not as a DNS name.
1460     </column>
1461
1462     <column name="engine_id">
1463       Engine ID to use in NetFlow messages.  Defaults to datapath index
1464       if not specified.
1465     </column>
1466
1467     <column name="engine_type">
1468       Engine type to use in NetFlow messages.  Defaults to datapath
1469       index if not specified.
1470     </column>
1471
1472     <column name="active_timeout">
1473       The interval at which NetFlow records are sent for flows that are
1474       still active, in seconds.  A value of <code>0</code> requests the
1475       default timeout (currently 600 seconds); a value of <code>-1</code>
1476       disables active timeouts.
1477     </column>
1478
1479     <column name="add_id_to_interface">
1480       <p>If this column's value is <code>false</code>, the ingress and egress
1481         interface fields of NetFlow flow records are derived from OpenFlow port
1482         numbers.  When it is <code>true</code>, the 7 most significant bits of
1483         these fields will be replaced by the least significant 7 bits of the
1484         engine id.  This is useful because many NetFlow collectors do not
1485         expect multiple switches to be sending messages from the same host, so
1486         they do not store the engine information which could be used to
1487         disambiguate the traffic.</p>
1488       <p>When this option is enabled, a maximum of 508 ports are supported.</p>
1489     </column>
1490
1491     <column name="external_ids">
1492       Key-value pairs for use by external frameworks that integrate with Open
1493       vSwitch, rather than by Open vSwitch itself.  System integrators should
1494       either use the Open vSwitch development mailing list to coordinate on
1495       common key-value definitions, or choose key names that are likely to be
1496       unique.  No common key-value pairs are currently defined.
1497     </column>
1498   </table>
1499
1500   <table name="SSL">
1501     SSL configuration for an Open_vSwitch.
1502
1503     <column name="private_key">
1504       Name of a PEM file containing the private key used as the switch's
1505       identity for SSL connections to the controller.
1506     </column>
1507
1508     <column name="certificate">
1509       Name of a PEM file containing a certificate, signed by the
1510       certificate authority (CA) used by the controller and manager,
1511       that certifies the switch's private key, identifying a trustworthy
1512       switch.
1513     </column>
1514
1515     <column name="ca_cert">
1516       Name of a PEM file containing the CA certificate used to verify
1517       that the switch is connected to a trustworthy controller.
1518     </column>
1519
1520     <column name="bootstrap_ca_cert">
1521       If set to <code>true</code>, then Open vSwitch will attempt to
1522       obtain the CA certificate from the controller on its first SSL
1523       connection and save it to the named PEM file. If it is successful,
1524       it will immediately drop the connection and reconnect, and from then
1525       on all SSL connections must be authenticated by a certificate signed
1526       by the CA certificate thus obtained.  <em>This option exposes the
1527         SSL connection to a man-in-the-middle attack obtaining the initial
1528         CA certificate.</em>  It may still be useful for bootstrapping.
1529     </column>
1530
1531     <column name="external_ids">
1532       Key-value pairs for use by external frameworks that integrate with Open
1533       vSwitch, rather than by Open vSwitch itself.  System integrators should
1534       either use the Open vSwitch development mailing list to coordinate on
1535       common key-value definitions, or choose key names that are likely to be
1536       unique.  No common key-value pairs are currently defined.
1537     </column>
1538   </table>
1539
1540   <table name="sFlow">
1541     <p>An sFlow(R) target.  sFlow is a protocol for remote monitoring
1542       of switches.</p>
1543
1544     <column name="agent">
1545       Name of the network device whose IP address should be reported as the
1546       ``agent address'' to collectors.  If not specified, the IP address
1547       defaults to the <ref table="Controller" column="local_ip"/> in the
1548       collector's <ref table="Controller"/>.  If an agent IP address cannot be
1549       determined either way, sFlow is disabled.
1550     </column>
1551
1552     <column name="header">
1553       Number of bytes of a sampled packet to send to the collector.
1554       If not specified, the default is 128 bytes.
1555     </column>
1556
1557     <column name="polling">
1558       Polling rate in seconds to send port statistics to the collector.
1559       If not specified, defaults to 30 seconds.
1560     </column>
1561
1562     <column name="sampling">
1563       Rate at which packets should be sampled and sent to the collector.
1564       If not specified, defaults to 400, which means one out of 400
1565       packets, on average, will be sent to the collector.
1566     </column>
1567
1568     <column name="targets">
1569       sFlow targets in the form
1570       <code><var>ip</var>:<var>port</var></code>.
1571     </column>
1572
1573     <column name="external_ids">
1574       Key-value pairs for use by external frameworks that integrate with Open
1575       vSwitch, rather than by Open vSwitch itself.  System integrators should
1576       either use the Open vSwitch development mailing list to coordinate on
1577       common key-value definitions, or choose key names that are likely to be
1578       unique.  No common key-value pairs are currently defined.
1579     </column>
1580   </table>
1581
1582   <table name="Capability">
1583     <p>Records in this table describe functionality supported by the hardware
1584       and software platform on which this Open vSwitch is based.  Clients
1585       should not modify this table.</p>
1586
1587     <p>A record in this table is meaningful only if it is referenced by the
1588       <ref table="Open_vSwitch" column="capabilities"/> column in the
1589       <ref table="Open_vSwitch"/> table.  The key used to reference it, called
1590       the record's ``category,'' determines the meanings of the
1591       <ref column="details"/> column.  The following general forms of
1592       categories are currently defined:</p>
1593
1594     <dl>
1595       <dt><code>qos-<var>type</var></code></dt>
1596       <dd><var>type</var> is supported as the value for
1597         <ref column="type" table="QoS"/> in the <ref table="QoS"/> table.
1598       </dd>
1599     </dl>
1600
1601     <column name="details">
1602       <p>Key-value pairs that describe capabilities.  The meaning of the pairs
1603       depends on the category key that the <ref table="Open_vSwitch"
1604       column="capabilities"/> column in the <ref table="Open_vSwitch"/> table
1605       uses to reference this record, as described above.</p>
1606
1607       <p>The presence of a record for category <code>qos-<var>type</var></code>
1608           indicates that the switch supports <var>type</var> as the value of
1609           the <ref table="QoS" column="type"/> column in the <ref table="QoS"/>
1610           table.  The following key-value pairs are defined to further describe
1611           QoS capabilities:</p>
1612
1613       <dl>
1614         <dt><code>n-queues</code></dt>
1615         <dd>Number of supported queues, as a positive integer.  Keys in the
1616           <ref table="QoS" column="queues"/> column for <ref table="QoS"/>
1617           records whose <ref table="QoS" column="type"/> value
1618           equals <var>type</var> must range between 0 and this value minus one,
1619           inclusive.</dd>
1620       </dl>
1621     </column>
1622   </table>
1623 </database>