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