Merge remote branch 'origin/master' into wdp-merge
[sliver-openvswitch.git] / vswitchd / vswitch.xml
1 <database title="Open vSwitch Configuration Database">
2   <p>A database with this schema holds the configuration for one Open
3     vSwitch daemon.  The root of the configuration for the daemon is
4     the <ref table="Open_vSwitch"/> table, which must have exactly one
5     record.  Records in other tables are significant only when they
6     can be reached directly or indirectly from the
7     <ref table="Open_vSwitch"/> table.</p>
8
9   <table name="Open_vSwitch" title="Open vSwitch configuration.">
10     Configuration for an Open vSwitch daemon.  There must be exactly one record
11     in the <ref table="Open_vSwitch"/> table.
12
13     <group title="Configuration">
14       <column name="bridges">
15         Set of bridges managed by the daemon.
16       </column>
17
18       <column name="controller">
19         Default OpenFlow <ref table="Controller"/> set used by bridges.  May be
20         overridden on a per-bridge basis by the <ref table="Bridge"
21         column="controller"/> column in <ref table="Bridge"/>.
22       </column>
23
24       <column name="managers">
25         Remote database clients to which the Open vSwitch's database server
26         should connect or to which it should listen.
27       </column>
28
29       <column name="ssl">
30         SSL used globally by the daemon.
31       </column>
32
33       <column name="external_ids">
34         Key-value pairs that identify this Open vSwitch's role in
35         external systems.  The currently defined key-value pairs are:
36         <dl>
37           <dt><code>system-uuid</code></dt>
38           <dd>A universally unique identifier for the Open vSwitch's
39             physical host.  The form of the identifier depends on the
40             type of the host.  On a Citrix XenServer, this is the host
41             UUID displayed by, e.g., <code>xe host-list</code>.</dd>
42         </dl>
43       </column>
44     </group>
45
46     <group title="Status">
47       <column name="next_cfg">
48         Sequence number for client to increment.  When a client modifies
49         any part of the database configuration and wishes to wait for
50         Open vSwitch to finish applying the changes, it may increment
51         this sequence number.
52       </column>
53
54       <column name="cur_cfg">
55         Sequence number that Open vSwitch sets to the current value of
56         <ref column="next_cfg"/> after it finishes applying a set of
57         configuration changes.
58       </column>
59
60       <column name="capabilities">
61         Describes functionality supported by the hardware and software platform
62         on which this Open vSwitch is based.  Clients should not modify this
63         column.  See the <ref table="Capability"/> description for defined
64         capability categories and the meaning of associated
65         <ref table="Capability"/> records.
66       </column>
67     </group>
68   </table>
69
70   <table name="Bridge">
71     <p>
72       Configuration for a bridge within an
73       <ref table="Open_vSwitch"/>.
74     </p>
75     <p>
76       A <ref table="Bridge"/> record represents an Ethernet switch with one or
77       more ``ports,'' which are the <ref table="Port"/> records pointed to by
78       the <ref table="Bridge"/>'s <ref column="ports"/> column.
79     </p>
80
81     <group title="Core Features">
82       <column name="name">
83         Bridge identifier.  Should be alphanumeric and no more than about 8
84         bytes long.  Must be unique among the names of ports, interfaces, and
85         bridges on a host.
86       </column>
87
88       <column name="ports">
89         Ports included in the bridge.
90       </column>
91
92       <column name="mirrors">
93         Port mirroring configuration.
94       </column>
95
96       <column name="netflow">
97         NetFlow configuration.
98       </column>
99
100       <column name="sflow">
101         sFlow configuration.
102       </column>
103
104       <column name="flood_vlans">
105         VLAN IDs of VLANs on which MAC address learning should be disabled, so
106         that packets are flooded instead of being sent to specific ports that
107         are believed to contain packets' destination MACs.  This should
108         ordinarily be used to disable MAC learning on VLANs used for mirroring
109         (RSPAN VLANs).  It may also be useful for debugging.
110       </column>
111     </group>
112
113     <group title="OpenFlow Configuration">
114       <column name="controller">
115         OpenFlow controller set.  If unset, defaults to the set of
116         controllers specified by <ref column="controller"
117         table="Open_vSwitch"/> in the <ref table="Open_vSwitch"/>
118         table.  If the default is also unset, then no OpenFlow
119         controllers will be used.
120       </column>
121
122       <column name="datapath_id">
123         Reports the OpenFlow datapath ID in use.  Exactly 16 hex
124         digits.  (Setting this column will have no useful effect.  Set
125         <ref column="other_config"/>:<code>other-config</code>
126         instead.)
127       </column>
128     </group>
129
130     <group title="Other Features">
131       <column name="datapath_type">
132         Name of datapath provider.  The kernel datapath has
133         type <code>system</code>.  The userspace datapath has
134         type <code>netdev</code>.
135       </column>
136
137       <column name="external_ids">
138         Key-value pairs that identify this bridge's role in external systems.
139         The currently defined key-value pairs are:
140         <dl>
141           <dt><code>network-uuids</code></dt>
142           <dd>Semicolon-delimited set of universally unique identifier(s) for
143             the network with which this bridge is associated.  The form of the
144             identifier(s) depends on the type of the host.  On a Citrix
145             XenServer host, the network identifiers are RFC 4122 UUIDs as
146             displayed by, e.g., <code>xe network-list</code>.</dd>
147         </dl>
148       </column>
149
150       <column name="other_config">
151         Key-value pairs for configuring rarely used bridge
152         features.  The currently defined key-value pairs are:
153         <dl>
154           <dt><code>datapath-id</code></dt>
155           <dd>Exactly 16 hex
156             digits to set the OpenFlow datapath ID to a specific
157             value.</dd>
158           <dt><code>hwaddr</code></dt>
159           <dd>An Ethernet address in the form
160             <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
161             to set the hardware address of the local port and influence the
162             datapath ID.</dd>
163         </dl>
164       </column>
165     </group>
166   </table>
167
168   <table name="Port" table="Port or bond configuration.">
169     <p>A port within a <ref table="Bridge"/>.</p>
170     <p>Most commonly, a port has exactly one ``interface,'' pointed to by its
171       <ref column="interfaces"/> column.  Such a port logically
172       corresponds to a port on a physical Ethernet switch.  A port
173       with more than one interface is a ``bonded port'' (see
174       <ref group="Bonding Configuration"/>).</p>
175     <p>Some properties that one might think as belonging to a port are actually
176       part of the port's <ref table="Interface"/> members.</p>
177
178     <column name="name">
179       Port name.  Should be alphanumeric and no more than about 8
180       bytes long.  May be the same as the interface name, for
181       non-bonded ports.  Must otherwise be unique among the names of
182       ports, interfaces, and bridges on a host.
183     </column>
184
185     <column name="interfaces">
186       The port's interfaces.  If there is more than one, this is a
187       bonded Port.
188     </column>
189
190     <group title="VLAN Configuration">
191       <p>A bridge port must be configured for VLANs in one of two
192         mutually exclusive ways:
193         <ul>
194           <li>A ``trunk port'' has an empty value for <ref
195             column="tag"/>.  Its <ref column="trunks"/> value may be
196             empty or non-empty.</li>
197           <li>An ``implicitly tagged VLAN port'' or ``access port''
198             has an nonempty value for <ref column="tag"/>.  Its
199             <ref column="trunks"/> value must be empty.</li>
200         </ul>
201         If <ref column="trunks"/> and <ref column="tag"/> are both
202         nonempty, the configuration is ill-formed.
203       </p>
204
205       <column name="tag">
206         <p>
207           If this is an access port (see above), the port's implicitly
208           tagged VLAN.  Must be empty if this is a trunk port.
209         </p>
210         <p>
211           Frames arriving on trunk ports will be forwarded to this
212           port only if they are tagged with the given VLAN (or, if
213           <ref column="tag"/> is 0, then if they lack a VLAN header).
214           Frames arriving on other access ports will be forwarded to
215           this port only if they have the same <ref column="tag"/>
216           value.  Frames forwarded to this port will not have an
217           802.1Q header.
218         </p>
219         <p>
220           When a frame with a 802.1Q header that indicates a nonzero
221           VLAN is received on an access port, it is discarded.
222         </p>
223       </column>
224
225       <column name="trunks">
226         <p>
227           If this is a trunk port (see above), the 802.1Q VLAN(s) that
228           this port trunks; if it is empty, then the port trunks all
229           VLANs.  Must be empty if this is an access port.
230         </p>
231         <p>
232           Frames arriving on trunk ports are dropped if they are not
233           in one of the specified VLANs.  For this purpose, packets
234           that have no VLAN header are treated as part of VLAN 0.
235         </p>
236       </column>
237     </group>
238
239     <group title="Bonding Configuration">
240       <p>A port that has more than one interface is a ``bonded port.''
241         Bonding allows for load balancing and fail-over.  Open vSwitch
242         supports ``source load balancing'' (SLB) bonding, which
243         assigns flows to slaves based on source MAC address, with
244         periodic rebalancing as traffic patterns change.  This form of
245         bonding does not require 802.3ad or other special support from
246         the upstream switch to which the slave devices are
247         connected.</p>
248
249       <p>These columns apply only to bonded ports.  Their values are
250         otherwise ignored.</p>
251
252       <column name="bond_updelay">
253         <p>For a bonded port, the number of milliseconds for which carrier must
254           stay up on an interface before the interface is considered to be up.
255           Specify <code>0</code> to enable the interface immediately.</p>
256         <p>This setting is honored only when at least one bonded interface is
257           already enabled.  When no interfaces are enabled, then the first bond
258           interface to come up is enabled immediately.</p>
259       </column>
260
261       <column name="bond_downdelay">
262         For a bonded port, the number of milliseconds for which carrier must
263         stay down on an interface before the interface is considered to be
264         down.  Specify <code>0</code> to disable the interface immediately.
265       </column>
266
267       <column name="bond_fake_iface">
268         For a bonded port, whether to create a fake internal interface with the
269         name of the port.  Use only for compatibility with legacy software that
270         requires this.
271       </column>
272     </group>
273
274     <group title="Other Features">
275       <column name="qos">
276         Quality of Service configuration for this port.
277       </column>
278       
279       <column name="mac">
280         The MAC address to use for this port for the purpose of choosing the
281         bridge's MAC address.  This column does not necessarily reflect the
282         port's actual MAC address, nor will setting it change the port's actual
283         MAC address.
284       </column>
285
286       <column name="fake_bridge">
287         Does this port represent a sub-bridge for its tagged VLAN within the
288         Bridge?  See ovs-vsctl(8) for more information.
289       </column>
290
291       <column name="external_ids">
292         Key-value pairs that identify this port's role in external systems.  No
293         key-value pairs native to <ref table="Port"/> are currently defined.
294         For fake bridges (see the <ref column="fake_bridge"/> column), external
295         IDs for the fake bridge are defined here by prefixing a
296         <ref table="Bridge"/> <ref table="Bridge" column="external_ids"/> key
297         with <code>fake-bridge-</code>,
298         e.g. <code>fake-bridge-network-uuids</code>.
299       </column>
300
301       <column name="other_config">
302         Key-value pairs for configuring rarely used port features.  The
303         currently defined key-value pairs are:
304         <dl>
305           <dt><code>hwaddr</code></dt>
306           <dd>An Ethernet address in the form
307             <code><var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var></code>.</dd>
308           <dt><code>bond-rebalance-interval</code></dt>
309           <dd>For a bonded port, the number of milliseconds between
310             successive attempts to rebalance the bond, that is, to
311             move source MACs and their flows from one interface on
312             the bond to another in an attempt to keep usage of each
313             interface roughly equal.  The default is 10000 (10
314             seconds), and the minimum is 1000 (1 second).</dd>
315         </dl>
316       </column>
317     </group>
318   </table>
319
320   <table name="Interface" title="One physical network device in a Port.">
321     An interface within a <ref table="Port"/>.
322
323     <group title="Core Features">
324       <column name="name">
325         Interface name.  Should be alphanumeric and no more than about 8 bytes
326         long.  May be the same as the port name, for non-bonded ports.  Must
327         otherwise be unique among the names of ports, interfaces, and bridges
328         on a host.
329       </column>
330
331       <column name="mac">
332         <p>Ethernet address to set for this interface.  If unset then the
333           default MAC address is used:</p>
334         <ul>
335           <li>For the local interface, the default is the lowest-numbered MAC
336             address among the other bridge ports, either the value of the
337             <ref table="Port" column="mac"/> in its <ref table="Port"/> record,
338             if set, or its actual MAC (for bonded ports, the MAC of its slave
339             whose name is first in alphabetical order).  Internal ports and
340             bridge ports that are used as port mirroring destinations (see the
341             <ref table="Mirror"/> table) are ignored.</li>
342           <li>For other internal interfaces, the default MAC is randomly
343             generated.</li>
344           <li>External interfaces typically have a MAC address associated with
345             their hardware.</li>
346         </ul>
347         <p>Some interfaces may not have a software-controllable MAC
348         address.</p>
349       </column>
350
351       <column name="ofport">
352         <p>OpenFlow port number for this interface.  Unlike most columns, this
353           column's value should be set only by Open vSwitch itself.  Other
354           clients should set this column to an empty set (the default) when
355           creating an <ref table="Interface"/>.</p>
356         <p>Open vSwitch populates this column when the port number becomes
357           known.  If the interface is successfully added,
358           <ref column="ofport"/> will be set to a number between 1 and 65535
359           (generally either in the range 1 to 65280, exclusive, or 65534, the
360           port number for the OpenFlow ``local port'').  If the interface
361           cannot be added then Open vSwitch sets this column
362           to -1.</p>
363       </column>
364     </group>
365
366     <group title="System-Specific Details">
367       <column name="type">
368         The interface type, one of:
369         <dl>
370           <dt><code>system</code></dt>
371           <dd>An ordinary network device, e.g. <code>eth0</code> on Linux.
372             Sometimes referred to as ``external interfaces'' since they are
373             generally connected to hardware external to that on which the Open
374             vSwitch is running.  The empty string is a synonym for
375             <code>system</code>.</dd>
376           <dt><code>internal</code></dt>
377           <dd>A simulated network device that sends and receives traffic.  An
378             internal interface whose <ref column="name"/> is the same as its
379             bridge's <ref table="Open_vSwitch" column="name"/> is called the
380             ``local interface.''  It does not make sense to bond an internal
381             interface, so the terms ``port'' and ``interface'' are often used
382             imprecisely for internal interfaces.</dd>
383           <dt><code>tap</code></dt>
384           <dd>A TUN/TAP device managed by Open vSwitch.</dd>
385           <dt><code>gre</code></dt>
386           <dd>An Ethernet over RFC 1702 Generic Routing Encapsulation over IPv4
387              tunnel.  Each tunnel must be uniquely identified by the
388              combination of <code>remote_ip</code>, <code>local_ip</code>, and
389              <code>in_key</code>.  Note that if two ports are defined that are
390              the same except one has an optional identifier and the other does
391              not, the more specific one is matched first.  <code>in_key</code>
392              is considered more specific than <code>local_ip</code> if a port
393              defines one and another port defines the other.  The arguments
394              are:
395             <dl>
396               <dt><code>remote_ip</code></dt>
397               <dd>Required.  The tunnel endpoint.</dd>
398             </dl>
399             <dl>
400               <dt><code>local_ip</code></dt>
401               <dd>Optional.  The destination IP that received packets must
402                 match.  Default is to match all addresses.</dd>
403             </dl>
404             <dl>
405               <dt><code>in_key</code></dt>
406               <dd>Optional.  The GRE key that received packets must contain.
407                 It may either be a 32-bit number (no key and a key of 0 are
408                 treated as equivalent) or the word <code>flow</code>.  If
409                 <code>flow</code> is specified then any key will be accepted
410                 and the key will be placed in the <code>tun_id</code> field
411                 for matching in the flow table.  The ovs-ofctl manual page
412                 contains additional information about matching fields in
413                 OpenFlow flows.  Default is no key.</dd>
414             </dl>
415             <dl>
416               <dt><code>out_key</code></dt>
417               <dd>Optional.  The GRE key to be set on outgoing packets.  It may
418                 either be a 32-bit number or the word <code>flow</code>.  If
419                 <code>flow</code> is specified then the key may be set using
420                 the <code>set_tunnel</code> Nicira OpenFlow vendor extension (0
421                 is used in the absense of an action).  The ovs-ofctl manual
422                 page contains additional information about the Nicira OpenFlow
423                 vendor extensions.  Default is no key.</dd>
424             </dl>
425             <dl>
426               <dt><code>key</code></dt>
427               <dd>Optional.  Shorthand to set <code>in_key</code> and
428                 <code>out_key</code> at the same time.</dd>
429             </dl>
430             <dl>
431               <dt><code>tos</code></dt>
432               <dd>Optional.  The value of the ToS bits to be set on the
433                 encapsulating packet.  It may also be the word
434                 <code>inherit</code>, in which case the ToS will be copied from
435                 the inner packet if it is IPv4 or IPv6 (otherwise it will be
436                 0).  Note that the ECN fields are always inherited.  Default is
437                 0.</dd>
438             </dl>
439             <dl>
440               <dt><code>ttl</code></dt>
441               <dd>Optional.  The TTL to be set on the encapsulating packet.
442                 It may also be the word <code>inherit</code>, in which case the
443                 TTL will be copied from the inner packet if it is IPv4 or IPv6
444                 (otherwise it will be the system default, typically 64).
445                 Default is the system default TTL.</dd>
446             </dl>
447             <dl>
448               <dt><code>csum</code></dt>
449               <dd>Optional.  Compute GRE checksums for outgoing packets and
450                 require checksums for incoming packets.  Default is enabled,
451                 set to <code>false</code> to disable.</dd>
452             </dl>
453             <dl>
454               <dt><code>pmtud</code></dt>
455               <dd>Optional.  Enable tunnel path MTU discovery.  If enabled
456                 ``ICMP destination unreachable - fragmentation'' needed
457                 messages will be generated for IPv4 packets with the DF bit set
458                 and IPv6 packets above the minimum MTU if the packet size
459                 exceeds the path MTU minus the size of the tunnel headers.  It
460                 also forces the encapsulating packet DF bit to be set (it is
461                 always set if the inner packet implies path MTU discovery).
462                 Note that this option causes behavior that is typically
463                 reserved for routers and therefore is not entirely in
464                 compliance with the IEEE 802.1D specification for bridges.
465                 Default is enabled, set to <code>false</code> to disable.</dd>
466             </dl>
467           </dd>
468           <dt><code>patch</code></dt>
469           <dd>A pair of virtual devices that act as a patch cable.  A 
470             <code>peer</code> argument is required that indicates the name
471             of the other side of the patch.  Since a patch must work in
472             pairs, a second patch interface must be declared with the
473             <code>name</code> and <code>peer</code> arguments reversed.</dd>
474         </dl>
475       </column>
476
477       <column name="options">
478         Configuration options whose interpretation varies based on
479         <ref column="type"/>.
480       </column>
481     </group>
482
483     <group title="Ingress Policing">
484       <column name="ingress_policing_burst">
485         <p>Maximum burst size for data received on this interface, in kb.  The
486           default burst size if set to <code>0</code> is 1000 kb.  This value
487           has no effect if <ref column="ingress_policing_rate"/>
488           is <code>0</code>.</p>
489         <p>The burst size should be at least the size of the interface's
490           MTU.</p>
491       </column>
492
493       <column name="ingress_policing_rate">
494         <p>Maximum rate for data received on this interface, in kbps.  Data
495           received faster than this rate is dropped.  Set to <code>0</code> to
496           disable policing.</p>
497         <p>The meaning of ``ingress'' is from Open vSwitch's perspective.  If
498           configured on a physical interface, then it limits the rate at which
499           traffic is allowed into the system from the outside.  If configured
500           on a virtual interface that is connected to a virtual machine, then
501           it limits the rate at which the guest is able to transmit.</p>
502       </column>
503     </group>
504
505     <group title="Other Features">
506       <column name="external_ids">
507         <p>Key-value pairs that identify this interface's role in external
508           systems.  All of the currently defined key-value pairs specifically
509           apply to an interface that represents a virtual Ethernet interface
510           connected to a virtual machine.  These key-value pairs should not be
511           present for other types of interfaces.  Keys whose names end
512           in <code>-uuid</code> have values that uniquely identify the entity
513           in question.  For a Citrix XenServer hypervisor, these values are
514           UUIDs in RFC 4122 format.  Other hypervisors may use other
515           formats.</p>
516         <p>The currently defined key-value pairs are:</p>
517         <dl>
518           <dt><code>vif-uuid</code></dt>
519           <dd>The virtual interface associated with this interface.</dd>
520           <dt><code>network-uuid</code></dt>
521           <dd>The virtual network to which this interface is attached.</dd>
522           <dt><code>vm-uuid</code></dt>
523           <dd>The VM to which this interface belongs.</dd>
524           <dt><code>vif-mac</code></dt>
525           <dd>The MAC address programmed into the "virtual hardware" for this
526               interface, in the
527               form <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
528               For Citrix XenServer, this is the value of the <code>MAC</code>
529               field in the VIF record for this interface.</dd>
530         </dl>
531       </column>
532     </group>
533   </table>
534
535   <table name="QoS" title="Quality of Service configuration">
536     <p>Quality of Service (QoS) configuration for each Port that
537       references it.</p>
538
539     <column name="type">
540       <p>The type of QoS to implement.  The <ref table="Open_vSwitch"
541         column="capabilities"/> column in the <ref table="Open_vSwitch"/> table
542         identifies the types that a switch actually supports.  The currently
543         defined types are listed below:</p>
544       <dl>
545         <dt><code>linux-htb</code></dt>
546         <dd>Linux ``hierarchy token bucket'' classifier.</dd>
547       </dl>
548     </column>
549
550     <column name="queues">
551       <p>A map from queue numbers to <ref table="Queue"/> records.  The
552         supported range of queue numbers depend on <ref column="type"/>.  The
553         queue numbers are the same as the <code>queue_id</code> used in
554         OpenFlow in <code>struct ofp_action_enqueue</code> and other
555         structures.  Queue 0 is used by OpenFlow output actions that do not
556         specify a specific queue.</p>
557     </column>
558
559     <column name="other_config">
560       <p>Key-value pairs for configuring QoS features that depend on
561         <ref column="type"/>.</p>
562       <p>The <code>linux-htb</code> class supports the following key-value
563         pairs:</p>
564       <dl>
565         <dt><code>max-rate</code></dt>
566         <dd>Maximum rate shared by all queued traffic, in bit/s.
567           Optional.  If not specified, for physical interfaces, the
568           default is the link rate.  For other interfaces or if the
569           link rate cannot be determined, the default is currently 100
570           Mbps.</dd>
571       </dl>
572     </column>
573   </table>
574
575   <table name="Queue" title="QoS output queue.">
576     <p>A configuration for a port output queue, used in configuring Quality of
577       Service (QoS) features.  May be referenced by <ref column="queues"
578       table="QoS"/> column in <ref table="QoS"/> table.</p>
579
580     <column name="other_config">
581       <p>Key-value pairs for configuring the output queue.  The supported
582         key-value pairs and their meanings depend on the <ref column="type"/>
583         of the <ref column="QoS"/> records that reference this row.</p>
584       <p>The key-value pairs defined for <ref table="QoS"/> <ref table="QoS"
585         column="type"/> of <code>min-rate</code> are:</p>
586       <dl>
587         <dt><code>min-rate</code></dt>
588         <dd>Minimum guaranteed bandwidth, in bit/s.  Required.</dd>
589       </dl>
590       <p>The key-value pairs defined for <ref table="QoS"/> <ref table="QoS"
591         column="type"/> of <code>linux-htb</code> are:</p>
592       <dl>
593         <dt><code>min-rate</code></dt>
594         <dd>Minimum guaranteed bandwidth, in bit/s.  Required.</dd>
595         <dt><code>max-rate</code></dt>
596         <dd>Maximum allowed bandwidth, in bit/s.  Optional.  If specified, the
597           queue's rate will not be allowed to exceed the specified value, even
598           if excess bandwidth is available.  If unspecified, defaults to no
599           limit.</dd>
600         <dt><code>burst</code></dt>
601         <dd>Burst size, in bits.  This is the maximum amount of ``credits''
602           that a queue can accumulate while it is idle.  Optional.  Details of
603           the <code>linux-htb</code> implementation require a minimum burst
604           size, so a too-small <code>burst</code> will be silently
605           ignored.</dd>
606         <dt><code>priority</code></dt>
607         <dd>A nonnegative 32-bit integer.  Defaults to 0 if
608           unspecified.  A queue with a smaller <code>priority</code>
609           will receive all the excess bandwidth that it can use before
610           a queue with a larger value receives any.  Specific priority
611           values are unimportant; only relative ordering matters.</dd>
612       </dl>
613     </column>
614   </table>
615
616   <table name="Mirror" title="Port mirroring (SPAN/RSPAN).">
617     <p>A port mirror within a <ref table="Bridge"/>.</p>
618     <p>A port mirror configures a bridge to send selected frames to special
619       ``mirrored'' ports, in addition to their normal destinations.  Mirroring
620       traffic may also be referred to as SPAN or RSPAN, depending on the
621       mechanism used for delivery.</p>
622
623     <column name="name">
624       Arbitrary identifier for the <ref table="Mirror"/>.
625     </column>
626
627     <group title="Selecting Packets for Mirroring">
628       <column name="select_all">
629         If true, every packet arriving or departing on any port is
630         selected for mirroring.
631       </column>
632
633       <column name="select_dst_port">
634         Ports on which departing packets are selected for mirroring.
635       </column>
636
637       <column name="select_src_port">
638         Ports on which arriving packets are selected for mirroring.
639       </column>
640
641       <column name="select_vlan">
642         VLANs on which packets are selected for mirroring.  An empty set
643         selects packets on all VLANs.
644       </column>
645     </group>
646
647     <group title="Mirroring Destination Configuration">
648       <column name="output_port">
649         <p>Output port for selected packets, if nonempty.  Mutually exclusive
650           with <ref column="output_vlan"/>.</p>
651         <p>Specifying a port for mirror output reserves that port exclusively
652           for mirroring.  No frames other than those selected for mirroring
653           will be forwarded to the port, and any frames received on the port
654           will be discarded.</p>
655         <p>This type of mirroring is sometimes called SPAN.</p>
656       </column>
657
658       <column name="output_vlan">
659         <p>Output VLAN for selected packets, if nonempty.  Mutually exclusive
660           with <ref column="output_port"/>.</p>
661         <p>The frames will be sent out all ports that trunk
662           <ref column="output_vlan"/>, as well as any ports with implicit VLAN
663           <ref column="output_vlan"/>.  When a mirrored frame is sent out a
664           trunk port, the frame's VLAN tag will be set to
665           <ref column="output_vlan"/>, replacing any existing tag; when it is
666           sent out an implicit VLAN port, the frame will not be tagged.  This
667           type of mirroring is sometimes called RSPAN.</p>
668         <p><em>Please note:</em> Mirroring to a VLAN can disrupt a network that
669           contains unmanaged switches.  Consider an unmanaged physical switch
670           with two ports: port 1, connected to an end host, and port 2,
671           connected to an Open vSwitch configured to mirror received packets
672           into VLAN 123 on port 2.  Suppose that the end host sends a packet on
673           port 1 that the physical switch forwards to port 2.  The Open vSwitch
674           forwards this packet to its destination and then reflects it back on
675           port 2 in VLAN 123.  This reflected packet causes the unmanaged
676           physical switch to replace the MAC learning table entry, which
677           correctly pointed to port 1, with one that incorrectly points to port
678           2.  Afterward, the physical switch will direct packets destined for
679           the end host to the Open vSwitch on port 2, instead of to the end
680           host on port 1, disrupting connectivity.  If mirroring to a VLAN is
681           desired in this scenario, then the physical switch must be replaced
682           by one that learns Ethernet addresses on a per-VLAN basis.  In
683           addition, learning should be disabled on the VLAN containing mirrored
684           traffic. If this is not done then intermediate switches will learn
685           the MAC address of each end host from the mirrored traffic.  If
686           packets being sent to that end host are also mirrored, then they will
687           be dropped since the switch will attempt to send them out the input
688           port. Disabling learning for the VLAN will cause the switch to
689           correctly send the packet out all ports configured for that VLAN.  If
690           Open vSwitch is being used as an intermediate switch, learning can be
691           disabled by adding the mirrored VLAN to <ref column="flood_vlans"/>
692           in the appropriate <ref table="Bridge"/> table or tables.</p>
693       </column>
694     </group>
695   </table>
696
697   <table name="Controller" title="OpenFlow controller configuration.">
698     <p>An OpenFlow controller.</p>
699
700     <p>Open vSwitch permits a bridge to have any number of OpenFlow
701        controllers.  When multiple controllers are configured, Open vSwitch
702        connects to all of them simultaneously.  OpenFlow 1.0 does not specify
703        how multiple controllers coordinate in interacting with a single switch,
704        so more than one controller should be specified only if the controllers
705        are themselves designed to coordinate with each other.</p>
706
707     <group title="Core Features">
708       <column name="target">
709         <p>Connection method for controller.
710           The following connection methods are currently
711           supported:</p>
712         <dl>
713           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
714           <dd>
715             <p>The specified SSL <var>port</var> (default: 6633) on the host at
716               the given <var>ip</var>, which must be expressed as an IP address
717               (not a DNS name).  The <ref table="Open_vSwitch" column="ssl"/>
718               column in the <ref table="Open_vSwitch"/> must point to a valid
719               SSL configuration when this form is used.</p>
720             <p>SSL support is an optional feature that is not always built as
721               part of Open vSwitch.</p>
722           </dd>
723           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
724           <dd>The specified TCP <var>port</var> (default: 6633) on the host at
725             the given <var>ip</var>, which must be expressed as an IP address
726             (not a DNS name).</dd>
727           <dt><code>discover</code></dt>
728           <dd>
729             <p>Enables controller discovery.</p>
730             <p>In controller discovery mode, Open vSwitch broadcasts a DHCP
731               request with vendor class identifier <code>OpenFlow</code> across
732               all of the bridge's network devices.  It will accept any valid
733               DHCP reply that has the same vendor class identifier and includes
734               a vendor-specific option with code 1 whose contents are a string
735               specifying the location of the controller in the same format as
736               <ref column="target"/>.</p>
737             <p>The DHCP reply may also, optionally, include a vendor-specific
738               option with code 2 whose contents are a string specifying the URI
739               to the base of the OpenFlow PKI
740               (e.g. <code>http://192.168.0.1/openflow/pki</code>).  This URI is
741               used only for bootstrapping the OpenFlow PKI at initial switch
742               setup; <code>ovs-vswitchd</code> does not use it at all.</p>
743           </dd>
744           <dt><code>none</code></dt>
745           <dd>Disables the controller.</dd>
746         </dl>
747         <p>When multiple controllers are configured for a single bridge, the
748           <ref column="target"/> values must be unique.  Duplicate
749           <ref column="target"/> values yield unspecified results.</p>
750       </column>
751
752       <column name="connection_mode">
753         <p>If it is specified, this setting must be one of the following
754         strings that describes how Open vSwitch contacts this OpenFlow
755         controller over the network:</p>
756
757         <dl>
758           <dt><code>in-band</code></dt>
759           <dd>In this mode, this controller's OpenFlow traffic travels over the
760             bridge associated with the controller.  With this setting, Open
761             vSwitch allows traffic to and from the controller regardless of the
762             contents of the OpenFlow flow table.  (Otherwise, Open vSwitch
763             would never be able to connect to the controller, because it did
764             not have a flow to enable it.)  This is the most common connection
765             mode because it is not necessary to maintain two independent
766             networks.</dd>
767           <dt><code>out-of-band</code></dt>
768           <dd>In this mode, OpenFlow traffic uses a control network separate
769             from the bridge associated with this controller, that is, the
770             bridge does not use any of its own network devices to communicate
771             with the controller.  The control network must be configured
772             separately, before or after <code>ovs-vswitchd</code> is started.
773           </dd>
774         </dl>
775
776         <p>If not specified, the default is implementation-specific.  If
777           <ref column="target"/> is <code>discover</code>, the connection mode
778           is always treated as <code>in-band</code> regardless of the actual
779           setting.</p>
780       </column>
781     </group>
782
783     <group title="Controller Failure Detection and Handling">
784       <column name="max_backoff">
785         Maximum number of milliseconds to wait between connection attempts.
786         Default is implementation-specific.
787       </column>
788
789       <column name="inactivity_probe">
790         Maximum number of milliseconds of idle time on connection to
791         controller before sending an inactivity probe message.  If Open
792         vSwitch does not communicate with the controller for the specified
793         number of seconds, it will send a probe.  If a response is not
794         received for the same additional amount of time, Open vSwitch
795         assumes the connection has been broken and attempts to reconnect.
796         Default is implementation-specific.
797       </column>
798
799       <column name="fail_mode">
800         <p>When a controller is configured, it is, ordinarily, responsible
801           for setting up all flows on the switch.  Thus, if the connection to
802           the controller fails, no new network connections can be set up.
803           If the connection to the controller stays down long enough,
804           no packets can pass through the switch at all.  This setting
805           determines the switch's response to such a situation.  It may be set
806           to one of the following:
807           <dl>
808             <dt><code>standalone</code></dt>
809             <dd>If no message is received from the controller for three
810               times the inactivity probe interval
811               (see <ref column="inactivity_probe"/>), then Open vSwitch
812               will take over responsibility for setting up flows.  In
813               this mode, Open vSwitch causes the bridge to act like an
814               ordinary MAC-learning switch.  Open vSwitch will continue
815               to retry connecting to the controller in the background
816               and, when the connection succeeds, it will discontinue its
817               standalone behavior.</dd>
818             <dt><code>secure</code></dt>
819             <dd>Open vSwitch will not set up flows on its own when the
820               controller connection fails.  It will continue retry
821               connecting to the controller forever.</dd>
822           </dl>
823         </p>
824         <p>If this value is unset, the default is implementation-specific.</p>
825         <p>When more than one controller is configured,
826           <ref column="fail_mode"/> is considered only when none of the
827           configured controllers can be contacted.  At that point, the bridge
828           enters secure mode if any of the controllers'
829           <ref column="fail_mode"/> is set to <code>secure</code>.  Otherwise,
830           it enters standalone mode if at least one <ref column="fail_mode"/>
831           is set to <code>standalone</code>.  If none of the
832           <ref column="fail_mode"/> values are set, the default is
833           implementation-defined.</p>
834       </column>
835     </group>
836
837     <group title="OpenFlow Rate Limiting">
838         <column name="controller_rate_limit">
839           <p>The maximum rate at which packets in unknown flows will be
840             forwarded to the OpenFlow controller, in packets per second.  This
841             feature prevents a single bridge from overwhelming the controller.
842             If not specified, the default is implementation-specific.</p>
843           <p>In addition, when a high rate triggers rate-limiting, Open
844             vSwitch queues controller packets for each port and transmits
845             them to the controller at the configured rate.  The number of
846             queued packets is limited by
847             the <ref column="controller_burst_limit"/> value.  The packet
848             queue is shared fairly among the ports on a bridge.</p><p>Open
849             vSwitch maintains two such packet rate-limiters per bridge.
850             One of these applies to packets sent up to the controller
851             because they do not correspond to any flow.  The other applies
852             to packets sent up to the controller by request through flow
853             actions. When both rate-limiters are filled with packets, the
854             actual rate that packets are sent to the controller is up to
855             twice the specified rate.</p>
856         </column>
857
858         <column name="controller_burst_limit">
859           In conjunction with <ref column="controller_rate_limit"/>,
860           the maximum number of unused packet credits that the bridge will
861           allow to accumulate, in packets.  If not specified, the default
862           is implementation-specific.
863         </column>
864     </group>
865
866     <group title="Additional Discovery Configuration">
867       <p>These values are considered only when <ref column="target"/>
868         is <code>discover</code>.</p>
869
870       <column name="discover_accept_regex">
871         A POSIX
872         extended regular expression against which the discovered controller
873         location is validated.  The regular expression is implicitly
874         anchored at the beginning of the controller location string, as
875         if it begins with <code>^</code>.  If not specified, the default
876         is implementation-specific.
877       </column>
878
879       <column name="discover_update_resolv_conf">
880         Whether to update <code>/etc/resolv.conf</code> when the
881         controller is discovered.  If not specified, the default
882         is implementation-specific.  Open vSwitch will only modify
883         <code>/etc/resolv.conf</code> if the DHCP response that it receives
884         specifies one or more DNS servers.
885       </column>
886     </group>
887
888     <group title="Additional In-Band Configuration">
889       <p>These values are considered only in in-band control mode (see
890         <ref column="connection_mode"/>) and only when <ref column="target"/>
891         is not <code>discover</code>.  (For controller discovery, the network
892         configuration obtained via DHCP is used instead.)</p>
893
894       <p>When multiple controllers are configured on a single bridge, there
895         should be only one set of unique values in these columns.  If different
896         values are set for these columns in different controllers, the effect
897         is unspecified.</p>
898
899       <column name="local_ip">
900         The IP address to configure on the local port,
901         e.g. <code>192.168.0.123</code>.  If this value is unset, then
902         <ref column="local_netmask"/> and <ref column="local_gateway"/> are
903         ignored.
904       </column>
905
906       <column name="local_netmask">
907         The IP netmask to configure on the local port,
908         e.g. <code>255.255.255.0</code>.  If <ref column="local_ip"/> is set
909         but this value is unset, then the default is chosen based on whether
910         the IP address is class A, B, or C.
911       </column>
912
913       <column name="local_gateway">
914         The IP address of the gateway to configure on the local port, as a
915         string, e.g. <code>192.168.0.1</code>.  Leave this column unset if
916         this network has no gateway.
917       </column>
918     </group>
919   </table>
920
921   <table name="NetFlow">
922     A NetFlow target.  NetFlow is a protocol that exports a number of
923     details about terminating IP flows, such as the principals involved
924     and duration.
925
926     <column name="targets">
927       NetFlow targets in the form
928       <code><var>ip</var>:<var>port</var></code>.  The <var>ip</var>
929       must be specified numerically, not as a DNS name.
930     </column>
931
932     <column name="engine_id">
933       Engine ID to use in NetFlow messages.  Defaults to datapath index
934       if not specified.
935     </column>
936
937     <column name="engine_type">
938       Engine type to use in NetFlow messages.  Defaults to datapath
939       index if not specified.
940     </column>
941
942     <column name="active_timeout">
943       The interval at which NetFlow records are sent for flows that are
944       still active, in seconds.  A value of <code>0</code> requests the
945       default timeout (currently 600 seconds); a value of <code>-1</code>
946       disables active timeouts.
947     </column>
948
949     <column name="add_id_to_interface">
950       <p>If this column's value is <code>false</code>, the ingress and egress
951         interface fields of NetFlow flow records are derived from OpenFlow port
952         numbers.  When it is <code>true</code>, the 7 most significant bits of
953         these fields will be replaced by the least significant 7 bits of the
954         engine id.  This is useful because many NetFlow collectors do not
955         expect multiple switches to be sending messages from the same host, so
956         they do not store the engine information which could be used to
957         disambiguate the traffic.</p>
958       <p>When this option is enabled, a maximum of 508 ports are supported.</p>
959     </column>
960   </table>
961
962   <table name="SSL">
963     SSL configuration for an Open_vSwitch.
964
965     <column name="private_key">
966       Name of a PEM file containing the private key used as the switch's
967       identity for SSL connections to the controller.
968     </column>
969
970     <column name="certificate">
971       Name of a PEM file containing a certificate, signed by the
972       certificate authority (CA) used by the controller and manager,
973       that certifies the switch's private key, identifying a trustworthy
974       switch.
975     </column>
976
977     <column name="ca_cert">
978       Name of a PEM file containing the CA certificate used to verify
979       that the switch is connected to a trustworthy controller.
980     </column>
981
982     <column name="bootstrap_ca_cert">
983       If set to <code>true</code>, then Open vSwitch will attempt to
984       obtain the CA certificate from the controller on its first SSL
985       connection and save it to the named PEM file. If it is successful,
986       it will immediately drop the connection and reconnect, and from then
987       on all SSL connections must be authenticated by a certificate signed
988       by the CA certificate thus obtained.  <em>This option exposes the
989         SSL connection to a man-in-the-middle attack obtaining the initial
990         CA certificate.</em>  It may still be useful for bootstrapping.
991     </column>
992   </table>
993
994   <table name="sFlow">
995     <p>An sFlow(R) target.  sFlow is a protocol for remote monitoring
996       of switches.</p>
997
998     <column name="agent">
999       Name of the network device whose IP address should be reported as the
1000       ``agent address'' to collectors.  If not specified, the IP address
1001       defaults to the <ref table="Controller" column="local_ip"/> in the
1002       collector's <ref table="Controller"/>.  If an agent IP address cannot be
1003       determined either way, sFlow is disabled.
1004     </column>
1005
1006     <column name="header">
1007       Number of bytes of a sampled packet to send to the collector.
1008       If not specified, the default is 128 bytes.
1009     </column>
1010
1011     <column name="polling">
1012       Polling rate in seconds to send port statistics to the collector.
1013       If not specified, defaults to 30 seconds.
1014     </column>
1015
1016     <column name="sampling">
1017       Rate at which packets should be sampled and sent to the collector.
1018       If not specified, defaults to 400, which means one out of 400
1019       packets, on average, will be sent to the collector.
1020     </column>
1021
1022     <column name="targets">
1023       sFlow targets in the form
1024       <code><var>ip</var>:<var>port</var></code>.
1025     </column>
1026   </table>
1027
1028   <table name="Capability">
1029     <p>Records in this table describe functionality supported by the hardware
1030       and software platform on which this Open vSwitch is based.  Clients
1031       should not modify this table.</p>
1032
1033     <p>A record in this table is meaningful only if it is referenced by the
1034       <ref table="Open_vSwitch" column="capabilities"/> column in the
1035       <ref table="Open_vSwitch"/> table.  The key used to reference it, called
1036       the record's ``category,'' determines the meanings of the
1037       <ref column="details"/> column.  The following general forms of
1038       categories are currently defined:</p>
1039
1040     <dl>
1041       <dt><code>qos-<var>type</var></code></dt>
1042       <dd><var>type</var> is supported as the value for
1043         <ref column="type" table="QoS"/> in the <ref table="QoS"/> table.
1044       </dd>
1045     </dl>
1046
1047     <column name="details">
1048       <p>Key-value pairs that describe capabilities.  The meaning of the pairs
1049       depends on the category key that the <ref table="Open_vSwitch"
1050       column="capabilities"/> column in the <ref table="Open_vSwitch"/> table
1051       uses to reference this record, as described above.</p>
1052
1053       <p>The presence of a record for category <code>qos-<var>type</var></code>
1054           indicates that the switch supports <var>type</var> as the value of
1055           the <ref table="QoS" column="type"/> column in the <ref table="QoS"/>
1056           table.  The following key-value pairs are defined to further describe
1057           QoS capabilities:</p>
1058
1059       <dl>
1060         <dt><code>n-queues</code></dt>
1061         <dd>Number of supported queues, as a positive integer.  Keys in the
1062           <ref table="QoS" column="queues"/> column for <ref table="QoS"/>
1063           records whose <ref table="QoS" column="type"/> value
1064           equals <var>type</var> must range between 0 and this value minus one,
1065           inclusive.</dd>
1066       </dl>
1067     </column>
1068   </table>
1069 </database>