]> git.proxmox.com Git - ovs.git/blob - vswitchd/vswitch.xml
bridge: Fix custom stats' counters leak.
[ovs.git] / vswitchd / vswitch.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <database name="ovs-vswitchd.conf.db" title="Open vSwitch Configuration Database">
3 <p>
4 A database with this schema holds the configuration for one Open
5 vSwitch daemon. The top-level configuration for the daemon is the
6 <ref table="Open_vSwitch"/> table, which must have exactly one
7 record. Records in other tables are significant only when they
8 can be reached directly or indirectly from the <ref
9 table="Open_vSwitch"/> table. Records that are not reachable from
10 the <ref table="Open_vSwitch"/> table are automatically deleted
11 from the database, except for records in a few distinguished
12 ``root set'' tables.
13 </p>
14
15 <h2>Common Columns</h2>
16
17 <p>
18 Most tables contain two special columns, named <code>other_config</code>
19 and <code>external_ids</code>. These columns have the same form and
20 purpose each place that they appear, so we describe them here to save space
21 later.
22 </p>
23
24 <dl>
25 <dt><code>other_config</code>: map of string-string pairs</dt>
26 <dd>
27 <p>
28 Key-value pairs for configuring rarely used features. Supported keys,
29 along with the forms taken by their values, are documented individually
30 for each table.
31 </p>
32 <p>
33 A few tables do not have <code>other_config</code> columns because no
34 key-value pairs have yet been defined for them.
35 </p>
36 </dd>
37
38 <dt><code>external_ids</code>: map of string-string pairs</dt>
39 <dd>
40 Key-value pairs for use by external frameworks that integrate with Open
41 vSwitch, rather than by Open vSwitch itself. System integrators should
42 either use the Open vSwitch development mailing list to coordinate on
43 common key-value definitions, or choose key names that are likely to be
44 unique. In some cases, where key-value pairs have been defined that are
45 likely to be widely useful, they are documented individually for each
46 table.
47 </dd>
48 </dl>
49
50 <table name="Open_vSwitch" title="Open vSwitch configuration.">
51 Configuration for an Open vSwitch daemon. There must be exactly
52 one record in the <ref table="Open_vSwitch"/> table.
53
54 <group title="Configuration">
55 <column name="bridges">
56 Set of bridges managed by the daemon.
57 </column>
58
59 <column name="ssl">
60 SSL used globally by the daemon.
61 </column>
62
63 <column name="external_ids" key="system-id">
64 A unique identifier for the Open vSwitch's physical host.
65 The form of the identifier depends on the type of the host.
66 On a Citrix XenServer, this will likely be the same as
67 <ref column="external_ids" key="xs-system-uuid"/>.
68 </column>
69
70 <column name="external_ids" key="xs-system-uuid">
71 The Citrix XenServer universally unique identifier for the physical
72 host as displayed by <code>xe host-list</code>.
73 </column>
74
75 <column name="external_ids" key="hostname">
76 The hostname for the host running Open vSwitch. This is a fully
77 qualified domain name since version 2.6.2.
78 </column>
79
80 <column name="external_ids" key="rundir">
81 In Open vSwitch 2.8 and later, the run directory of the running Open
82 vSwitch daemon. This directory is used for runtime state such as
83 control and management sockets. The value of <ref
84 column="other_config" key="vhost-sock-dir"/> is relative to this
85 directory.
86 </column>
87
88 <column name="other_config" key="stats-update-interval"
89 type='{"type": "integer", "minInteger": 5000}'>
90 <p>
91 Interval for updating statistics to the database, in milliseconds.
92 This option will affect the update of the <code>statistics</code>
93 column in the following tables: <code>Port</code>, <code>Interface
94 </code>, <code>Mirror</code>.
95 </p>
96 <p>
97 Default value is 5000 ms.
98 </p>
99 <p>
100 Getting statistics more frequently can be achieved via OpenFlow.
101 </p>
102 </column>
103
104 <column name="other_config" key="flow-restore-wait"
105 type='{"type": "boolean"}'>
106 <p>
107 When <code>ovs-vswitchd</code> starts up, it has an empty flow table
108 and therefore it handles all arriving packets in its default fashion
109 according to its configuration, by dropping them or sending them to
110 an OpenFlow controller or switching them as a standalone switch.
111 This behavior is ordinarily desirable. However, if
112 <code>ovs-vswitchd</code> is restarting as part of a ``hot-upgrade,''
113 then this leads to a relatively long period during which packets are
114 mishandled.
115 </p>
116 <p>
117 This option allows for improvement. When <code>ovs-vswitchd</code>
118 starts with this value set as <code>true</code>, it will neither
119 flush or expire previously set datapath flows nor will it send and
120 receive any packets to or from the datapath. When this value is
121 later set to <code>false</code>, <code>ovs-vswitchd</code> will
122 start receiving packets from the datapath and re-setup the flows.
123 </p>
124 <p>
125 Thus, with this option, the procedure for a hot-upgrade of
126 <code>ovs-vswitchd</code> becomes roughly the following:
127 </p>
128 <ol>
129 <li>
130 Stop <code>ovs-vswitchd</code>.
131 </li>
132 <li>
133 Set <ref column="other_config" key="flow-restore-wait"/>
134 to <code>true</code>.
135 </li>
136 <li>
137 Start <code>ovs-vswitchd</code>.
138 </li>
139 <li>
140 Use <code>ovs-ofctl</code> (or some other program, such as an
141 OpenFlow controller) to restore the OpenFlow flow table
142 to the desired state.
143 </li>
144 <li>
145 Set <ref column="other_config" key="flow-restore-wait"/>
146 to <code>false</code> (or remove it entirely from the database).
147 </li>
148 </ol>
149 <p>
150 The <code>ovs-ctl</code>'s ``restart'' and ``force-reload-kmod''
151 functions use the above config option during hot upgrades.
152 </p>
153 </column>
154
155 <column name="other_config" key="flow-limit"
156 type='{"type": "integer", "minInteger": 0}'>
157 <p>
158 The maximum
159 number of flows allowed in the datapath flow table. Internally OVS
160 will choose a flow limit which will likely be lower than this number,
161 based on real time network conditions. Tweaking this value is
162 discouraged unless you know exactly what you're doing.
163 </p>
164 <p>
165 The default is 200000.
166 </p>
167 </column>
168
169 <column name="other_config" key="max-idle"
170 type='{"type": "integer", "minInteger": 500}'>
171 <p>
172 The maximum time (in ms) that idle flows will remain cached in the
173 datapath. Internally OVS will check the validity and activity for
174 datapath flows regularly and may expire flows quicker than this
175 number, based on real time network conditions. Tweaking this
176 value is discouraged unless you know exactly what you're doing.
177 </p>
178 <p>
179 The default is 10000.
180 </p>
181 </column>
182
183 <column name="other_config" key="hw-offload"
184 type='{"type": "boolean"}'>
185 <p>
186 Set this value to <code>true</code> to enable netdev flow offload.
187 </p>
188 <p>
189 The default value is <code>false</code>. Changing this value requires
190 restarting the daemon
191 </p>
192 <p>
193 Currently Open vSwitch supports hardware offloading on
194 Linux systems. On other systems, this value is ignored.
195 This functionality is considered 'experimental'. Depending
196 on which OpenFlow matches and actions are configured,
197 which kernel version is used, and what hardware is
198 available, Open vSwitch may not be able to offload
199 functionality to hardware.
200 </p>
201 </column>
202
203 <column name="other_config" key="tc-policy"
204 type='{"type": "string"}'>
205 <p>
206 Specified the policy used with HW offloading.
207 Options:
208 <code>none</code> - Add software rule and offload rule to HW.
209 <code>skip_sw</code> - Offload rule to HW only.
210 <code>skip_hw</code> - Add software rule without offloading rule to HW.
211 </p>
212 <p>
213 This is only relevant if HW offloading is enabled (hw-offload).
214 </p>
215 <p>
216 The default value is <code>none</code>.
217 </p>
218 </column>
219
220 <column name="other_config" key="dpdk-init"
221 type='{"type": "boolean"}'>
222 <p>
223 Set this value to <code>true</code> to enable runtime support for
224 DPDK ports. The vswitch must have compile-time support for DPDK as
225 well.
226 </p>
227 <p>
228 The default value is <code>false</code>. Changing this value requires
229 restarting the daemon
230 </p>
231 <p>
232 If this value is <code>false</code> at startup, any dpdk ports which
233 are configured in the bridge will fail due to memory errors.
234 </p>
235 </column>
236
237 <column name="other_config" key="dpdk-lcore-mask"
238 type='{"type": "integer", "minInteger": 1}'>
239 <p>
240 Specifies the CPU cores where dpdk lcore threads should be spawned.
241 The DPDK lcore threads are used for DPDK library tasks, such as
242 library internal message processing, logging, etc. Value should be in
243 the form of a hex string (so '0x123') similar to the 'taskset' mask
244 input.
245 </p>
246 <p>
247 The lowest order bit corresponds to the first CPU core. A set bit
248 means the corresponding core is available and an lcore thread will be
249 created and pinned to it. If the input does not cover all cores,
250 those uncovered cores are considered not set.
251 </p>
252 <p>
253 For performance reasons, it is best to set this to a single core on
254 the system, rather than allow lcore threads to float.
255 </p>
256 <p>
257 If not specified, the value will be determined by choosing the lowest
258 CPU core from initial cpu affinity list. Otherwise, the value will be
259 passed directly to the DPDK library.
260 </p>
261 </column>
262
263 <column name="other_config" key="pmd-cpu-mask">
264 <p>
265 Specifies CPU mask for setting the cpu affinity of PMD (Poll
266 Mode Driver) threads. Value should be in the form of hex string,
267 similar to the dpdk EAL '-c COREMASK' option input or the 'taskset'
268 mask input.
269 </p>
270 <p>
271 The lowest order bit corresponds to the first CPU core. A set bit
272 means the corresponding core is available and a pmd thread will be
273 created and pinned to it. If the input does not cover all cores,
274 those uncovered cores are considered not set.
275 </p>
276 <p>
277 If not specified, one pmd thread will be created for each numa node
278 and pinned to any available core on the numa node by default.
279 </p>
280 </column>
281
282 <column name="other_config" key="dpdk-alloc-mem"
283 type='{"type": "integer", "minInteger": 0}'>
284 <p>
285 Specifies the amount of memory to preallocate from the hugepage pool,
286 regardless of socket. It is recommended that dpdk-socket-mem is used
287 instead.
288 </p>
289 </column>
290
291 <column name="other_config" key="dpdk-socket-mem"
292 type='{"type": "string"}'>
293 <p>
294 Specifies the amount of memory to preallocate from the hugepage pool,
295 on a per-socket basis.
296 </p>
297 <p>
298 The specifier is a comma-separated string, in ascending order of CPU
299 socket. E.g. On a four socket system 1024,0,2048 would set socket 0
300 to preallocate 1024MB, socket 1 to preallocate 0MB, socket 2 to
301 preallocate 2048MB and socket 3 (no value given) to preallocate 0MB.
302 </p>
303 <p>
304 If dpdk-socket-mem and dpdk-alloc-mem are not specified, dpdk-socket-mem
305 will be used and the default value is 1024,0. If dpdk-socket-mem and
306 dpdk-alloc-mem are specified at same time, dpdk-socket-mem will be
307 used as default. Changing this value requires restarting the daemon.
308 </p>
309 </column>
310
311 <column name="other_config" key="dpdk-hugepage-dir"
312 type='{"type": "string"}'>
313 <p>
314 Specifies the path to the hugetlbfs mount point.
315 </p>
316 <p>
317 If not specified, this will be guessed by the DPDK library (default
318 is /dev/hugepages). Changing this value requires restarting the
319 daemon.
320 </p>
321 </column>
322
323 <column name="other_config" key="dpdk-extra"
324 type='{"type": "string"}'>
325 <p>
326 Specifies additional eal command line arguments for DPDK.
327 </p>
328 <p>
329 The default is empty. Changing this value requires restarting the
330 daemon
331 </p>
332 </column>
333
334 <column name="other_config" key="vhost-sock-dir"
335 type='{"type": "string"}'>
336 <p>
337 Specifies a relative path from <ref column="external_ids"
338 key="rundir"/> to the vhost-user unix domain socket files. If this
339 value is unset, the sockets are put directly in <ref
340 column="external_ids" key="rundir"/>.
341 </p>
342 <p>
343 Changing this value requires restarting the daemon.
344 </p>
345 </column>
346
347 <column name="other_config" key="vhost-iommu-support"
348 type='{"type": "boolean"}'>
349 <p>
350 vHost IOMMU is a security feature, which restricts the vhost memory
351 that a virtio device may access. vHost IOMMU support is disabled by
352 default, due to a bug in QEMU implementations of the vhost REPLY_ACK
353 protocol, (on which vHost IOMMU relies) prior to v2.9.1. Setting this
354 value to <code>true</code> enables vHost IOMMU support for vHost User
355 Client ports in OvS-DPDK, starting from DPDK v17.11.
356 </p>
357 <p>
358 Changing this value requires restarting the daemon.
359 </p>
360 </column>
361
362 <column name="other_config" key="tx-flush-interval"
363 type='{"type": "integer",
364 "minInteger": 0, "maxInteger": 1000000}'>
365 <p>
366 Specifies the time in microseconds that a packet can wait in output
367 batch for sending i.e. amount of time that packet can spend in an
368 intermediate output queue before sending to netdev.
369 This option can be used to configure balance between throughput
370 and latency. Lower values decreases latency while higher values
371 may be useful to achieve higher performance.
372 </p>
373 <p>
374 Defaults to 0 i.e. instant packet sending (latency optimized).
375 </p>
376 </column>
377
378 <column name="other_config" key="n-handler-threads"
379 type='{"type": "integer", "minInteger": 1}'>
380 <p>
381 Specifies the number of threads for software datapaths to use for
382 handling new flows. The default the number of online CPU cores minus
383 the number of revalidators.
384 </p>
385 <p>
386 This configuration is per datapath. If you have more than one
387 software datapath (e.g. some <code>system</code> bridges and some
388 <code>netdev</code> bridges), then the total number of threads is
389 <code>n-handler-threads</code> times the number of software
390 datapaths.
391 </p>
392 </column>
393
394 <column name="other_config" key="n-revalidator-threads"
395 type='{"type": "integer", "minInteger": 1}'>
396 <p>
397 Specifies the number of threads for software datapaths to use for
398 revalidating flows in the datapath. Typically, there is a direct
399 correlation between the number of revalidator threads, and the number
400 of flows allowed in the datapath. The default is the number of cpu
401 cores divided by four plus one. If <code>n-handler-threads</code> is
402 set, the default changes to the number of cpu cores minus the number
403 of handler threads.
404 </p>
405 <p>
406 This configuration is per datapath. If you have more than one
407 software datapath (e.g. some <code>system</code> bridges and some
408 <code>netdev</code> bridges), then the total number of threads is
409 <code>n-handler-threads</code> times the number of software
410 datapaths.
411 </p>
412 </column>
413
414 <column name="other_config" key="emc-insert-inv-prob"
415 type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
416 <p>
417 Specifies the inverse probability (1/emc-insert-inv-prob) of a flow
418 being inserted into the Exact Match Cache (EMC). On average one in
419 every <code>emc-insert-inv-prob</code> packets that generate a unique
420 flow will cause an insertion into the EMC.
421
422 A value of 1 will result in an insertion for every flow (1/1 = 100%)
423 whereas a value of zero will result in no insertions and essentially
424 disable the EMC.
425 </p>
426 <p>
427 Defaults to 100 ie. there is (1/100 =) 1% chance of EMC insertion.
428 </p>
429 </column>
430
431 <column name="other_config" key="vlan-limit"
432 type='{"type": "integer", "minInteger": 0}'>
433 <p>
434 Limits the number of VLAN headers that can be matched to the
435 specified number. Further VLAN headers will be treated as payload,
436 e.g. a packet with more 802.1q headers will match Ethernet type
437 0x8100.
438 </p>
439 <p>
440 Value <code>0</code> means unlimited. The actual number of supported
441 VLAN headers is the smallest of <code>vlan-limit</code>, the number
442 of VLANs supported by Open vSwitch userspace (currently 2), and the
443 number supported by the datapath.
444 </p>
445
446 <p>
447 If this value is absent, the default is currently 1. This maintains
448 backward compatibility with controllers that were designed for use
449 with Open vSwitch versions earlier than 2.8, which only supported one
450 VLAN.
451 </p>
452 </column>
453 </group>
454
455 <group title="Status">
456 <column name="next_cfg">
457 Sequence number for client to increment. When a client modifies
458 any part of the database configuration and wishes to wait for
459 Open vSwitch to finish applying the changes, it may increment
460 this sequence number.
461 </column>
462
463 <column name="cur_cfg">
464 Sequence number that Open vSwitch sets to the current value of
465 <ref column="next_cfg"/> after it finishes applying a set of
466 configuration changes.
467 </column>
468
469 <group title="Statistics">
470 <p>
471 The <code>statistics</code> column contains key-value pairs that
472 report statistics about a system running an Open vSwitch. These are
473 updated periodically (currently, every 5 seconds). Key-value pairs
474 that cannot be determined or that do not apply to a platform are
475 omitted.
476 </p>
477
478 <column name="other_config" key="enable-statistics"
479 type='{"type": "boolean"}'>
480 Statistics are disabled by default to avoid overhead in the common
481 case when statistics gathering is not useful. Set this value to
482 <code>true</code> to enable populating the <ref column="statistics"/>
483 column or to <code>false</code> to explicitly disable it.
484 </column>
485
486 <column name="statistics" key="cpu"
487 type='{"type": "integer", "minInteger": 1}'>
488 <p>
489 Number of CPU processors, threads, or cores currently online and
490 available to the operating system on which Open vSwitch is running,
491 as an integer. This may be less than the number installed, if some
492 are not online or if they are not available to the operating
493 system.
494 </p>
495 <p>
496 Open vSwitch userspace processes are not multithreaded, but the
497 Linux kernel-based datapath is.
498 </p>
499 </column>
500
501 <column name="statistics" key="load_average">
502 A comma-separated list of three floating-point numbers,
503 representing the system load average over the last 1, 5, and 15
504 minutes, respectively.
505 </column>
506
507 <column name="statistics" key="memory">
508 <p>
509 A comma-separated list of integers, each of which represents a
510 quantity of memory in kilobytes that describes the operating
511 system on which Open vSwitch is running. In respective order,
512 these values are:
513 </p>
514
515 <ol>
516 <li>Total amount of RAM allocated to the OS.</li>
517 <li>RAM allocated to the OS that is in use.</li>
518 <li>RAM that can be flushed out to disk or otherwise discarded
519 if that space is needed for another purpose. This number is
520 necessarily less than or equal to the previous value.</li>
521 <li>Total disk space allocated for swap.</li>
522 <li>Swap space currently in use.</li>
523 </ol>
524
525 <p>
526 On Linux, all five values can be determined and are included. On
527 other operating systems, only the first two values can be
528 determined, so the list will only have two values.
529 </p>
530 </column>
531
532 <column name="statistics" key="process_NAME">
533 <p>
534 One such key-value pair, with <code>NAME</code> replaced by
535 a process name, will exist for each running Open vSwitch
536 daemon process, with <var>name</var> replaced by the
537 daemon's name (e.g. <code>process_ovs-vswitchd</code>). The
538 value is a comma-separated list of integers. The integers
539 represent the following, with memory measured in kilobytes
540 and durations in milliseconds:
541 </p>
542
543 <ol>
544 <li>The process's virtual memory size.</li>
545 <li>The process's resident set size.</li>
546 <li>The amount of user and system CPU time consumed by the
547 process.</li>
548 <li>The number of times that the process has crashed and been
549 automatically restarted by the monitor.</li>
550 <li>The duration since the process was started.</li>
551 <li>The duration for which the process has been running.</li>
552 </ol>
553
554 <p>
555 The interpretation of some of these values depends on whether the
556 process was started with the <option>--monitor</option>. If it
557 was not, then the crash count will always be 0 and the two
558 durations will always be the same. If <option>--monitor</option>
559 was given, then the crash count may be positive; if it is, the
560 latter duration is the amount of time since the most recent crash
561 and restart.
562 </p>
563
564 <p>
565 There will be one key-value pair for each file in Open vSwitch's
566 ``run directory'' (usually <code>/var/run/openvswitch</code>)
567 whose name ends in <code>.pid</code>, whose contents are a
568 process ID, and which is locked by a running process. The
569 <var>name</var> is taken from the pidfile's name.
570 </p>
571
572 <p>
573 Currently Open vSwitch is only able to obtain all of the above
574 detail on Linux systems. On other systems, the same key-value
575 pairs will be present but the values will always be the empty
576 string.
577 </p>
578 </column>
579
580 <column name="statistics" key="file_systems">
581 <p>
582 A space-separated list of information on local, writable file
583 systems. Each item in the list describes one file system and
584 consists in turn of a comma-separated list of the following:
585 </p>
586
587 <ol>
588 <li>Mount point, e.g. <code>/</code> or <code>/var/log</code>.
589 Any spaces or commas in the mount point are replaced by
590 underscores.</li>
591 <li>Total size, in kilobytes, as an integer.</li>
592 <li>Amount of storage in use, in kilobytes, as an integer.</li>
593 </ol>
594
595 <p>
596 This key-value pair is omitted if there are no local, writable
597 file systems or if Open vSwitch cannot obtain the needed
598 information.
599 </p>
600 </column>
601 </group>
602 </group>
603
604 <group title="Version Reporting">
605 <p>
606 These columns report the types and versions of the hardware and
607 software running Open vSwitch. We recommend in general that software
608 should test whether specific features are supported instead of relying
609 on version number checks. These values are primarily intended for
610 reporting to human administrators.
611 </p>
612
613 <column name="ovs_version">
614 The Open vSwitch version number, e.g. <code>1.1.0</code>.
615 </column>
616
617 <column name="db_version">
618 <p>
619 The database schema version number, e.g. <code>1.2.3</code>. See
620 ovsdb-tool(1) for an explanation of the numbering scheme.
621 </p>
622
623 <p>
624 The schema version is part of the database schema, so it can also be
625 retrieved by fetching the schema using the Open vSwitch database
626 protocol.
627 </p>
628 </column>
629
630 <column name="system_type">
631 <p>
632 An identifier for the type of system on top of which Open vSwitch
633 runs, e.g. <code>XenServer</code> or <code>KVM</code>.
634 </p>
635 <p>
636 System integrators are responsible for choosing and setting an
637 appropriate value for this column.
638 </p>
639 </column>
640
641 <column name="system_version">
642 <p>
643 The version of the system identified by <ref column="system_type"/>,
644 e.g. <code>5.6.100-39265p</code> on XenServer 5.6.100 build 39265.
645 </p>
646 <p>
647 System integrators are responsible for choosing and setting an
648 appropriate value for this column.
649 </p>
650 </column>
651
652 </group>
653
654 <group title="Capabilities">
655 <p>
656 These columns report capabilities of the Open vSwitch instance.
657 </p>
658 <column name="datapath_types">
659 <p>
660 This column reports the different dpifs registered with the system.
661 These are the values that this instance supports in the <ref
662 column="datapath_type" table="Bridge"/> column of the <ref
663 table="Bridge"/> table.
664 </p>
665 </column>
666 <column name="iface_types">
667 <p>
668 This column reports the different netdevs registered with the system.
669 These are the values that this instance supports in the <ref
670 column="type" table="Interface"/> column of the <ref
671 table="Interface"/> table.
672 </p>
673 </column>
674 </group>
675
676 <group title="Database Configuration">
677 <p>
678 These columns primarily configure the Open vSwitch database
679 (<code>ovsdb-server</code>), not the Open vSwitch switch
680 (<code>ovs-vswitchd</code>). The OVSDB database also uses the <ref
681 column="ssl"/> settings.
682 </p>
683
684 <p>
685 The Open vSwitch switch does read the database configuration to
686 determine remote IP addresses to which in-band control should apply.
687 </p>
688
689 <column name="manager_options">
690 Database clients to which the Open vSwitch database server should
691 connect or to which it should listen, along with options for how these
692 connection should be configured. See the <ref table="Manager"/> table
693 for more information.
694 </column>
695 </group>
696
697 <group title="Common Columns">
698 The overall purpose of these columns is described under <code>Common
699 Columns</code> at the beginning of this document.
700
701 <column name="other_config"/>
702 <column name="external_ids"/>
703 </group>
704 </table>
705
706 <table name="Bridge">
707 <p>
708 Configuration for a bridge within an
709 <ref table="Open_vSwitch"/>.
710 </p>
711 <p>
712 A <ref table="Bridge"/> record represents an Ethernet switch with one or
713 more ``ports,'' which are the <ref table="Port"/> records pointed to by
714 the <ref table="Bridge"/>'s <ref column="ports"/> column.
715 </p>
716
717 <group title="Core Features">
718 <column name="name">
719 <p>
720 Bridge identifier. Must be unique among the names of ports,
721 interfaces, and bridges on a host.
722 </p>
723
724 <p>
725 The name must be alphanumeric and must not contain forward or
726 backward slashes. The name of a bridge is also the name of an <ref
727 table="Interface"/> (and a <ref table="Port"/>) within the bridge, so
728 the restrictions on the <ref table="Interface" column="name"/> column
729 in the <ref table="Interface"/> table, particularly on length, also
730 apply to bridge names. Refer to the documentation for <ref
731 table="Interface"/> names for details.
732 </p>
733 </column>
734
735 <column name="ports">
736 Ports included in the bridge.
737 </column>
738
739 <column name="mirrors">
740 Port mirroring configuration.
741 </column>
742
743 <column name="netflow">
744 NetFlow configuration.
745 </column>
746
747 <column name="sflow">
748 sFlow(R) configuration.
749 </column>
750
751 <column name="ipfix">
752 IPFIX configuration.
753 </column>
754
755 <column name="flood_vlans">
756 <p>
757 VLAN IDs of VLANs on which MAC address learning should be disabled,
758 so that packets are flooded instead of being sent to specific ports
759 that are believed to contain packets' destination MACs. This should
760 ordinarily be used to disable MAC learning on VLANs used for
761 mirroring (RSPAN VLANs). It may also be useful for debugging.
762 </p>
763 <p>
764 SLB bonding (see the <ref table="Port" column="bond_mode"/> column in
765 the <ref table="Port"/> table) is incompatible with
766 <code>flood_vlans</code>. Consider using another bonding mode or
767 a different type of mirror instead.
768 </p>
769 </column>
770
771 <column name="auto_attach">
772 Auto Attach configuration.
773 </column>
774 </group>
775
776 <group title="OpenFlow Configuration">
777 <column name="controller">
778 <p>
779 OpenFlow controller set. If unset, then no OpenFlow controllers
780 will be used.
781 </p>
782
783 <p>
784 If there are primary controllers, removing all of them clears the
785 OpenFlow flow tables, group table, and meter table. If there are no
786 primary controllers, adding one also clears these tables. Other
787 changes to the set of controllers, such as adding or removing a
788 service controller, adding another primary controller to supplement
789 an existing primary controller, or removing only one of two primary
790 controllers, have no effect on these tables.
791 </p>
792 </column>
793
794 <column name="flow_tables">
795 Configuration for OpenFlow tables. Each pair maps from an OpenFlow
796 table ID to configuration for that table.
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 or when no controllers are
821 defined. The bridge will continue to retry connecting to
822 any defined controllers forever.</dd>
823 </dl>
824 </p>
825 <p>
826 The default is <code>standalone</code> if the value is unset, but
827 future versions of Open vSwitch may change the default.
828 </p>
829 <p>
830 The <code>standalone</code> mode can create forwarding loops on a
831 bridge that has more than one uplink port unless STP is enabled. To
832 avoid loops on such a bridge, configure <code>secure</code> mode or
833 enable STP (see <ref column="stp_enable"/>).
834 </p>
835 <p>When more than one controller is configured,
836 <ref column="fail_mode"/> is considered only when none of the
837 configured controllers can be contacted.</p>
838 <p>
839 Changing <ref column="fail_mode"/> when no primary controllers are
840 configured clears the OpenFlow flow tables, group table, and meter
841 table.
842 </p>
843 </column>
844
845 <column name="datapath_id">
846 Reports the OpenFlow datapath ID in use. Exactly 16 hex digits.
847 (Setting this column has no useful effect. Set <ref
848 column="other-config" key="datapath-id"/> instead.)
849 </column>
850
851 <column name="datapath_version">
852 <p>
853 Reports the version number of the Open vSwitch datapath in use.
854 This allows management software to detect and report discrepancies
855 between Open vSwitch userspace and datapath versions. (The <ref
856 column="ovs_version" table="Open_vSwitch"/> column in the <ref
857 table="Open_vSwitch"/> reports the Open vSwitch userspace version.)
858 The version reported depends on the datapath in use:
859 </p>
860
861 <ul>
862 <li>
863 When the kernel module included in the Open vSwitch source tree is
864 used, this column reports the Open vSwitch version from which the
865 module was taken.
866 </li>
867
868 <li>
869 When the kernel module that is part of the upstream Linux kernel is
870 used, this column reports <code>&lt;unknown&gt;</code>.
871 </li>
872
873 <li>
874 When the datapath is built into the <code>ovs-vswitchd</code>
875 binary, this column reports <code>&lt;built-in&gt;</code>. A
876 built-in datapath is by definition the same version as the rest of
877 the Open VSwitch userspace.
878 </li>
879
880 <li>
881 Other datapaths (such as the Hyper-V kernel datapath) currently
882 report <code>&lt;unknown&gt;</code>.
883 </li>
884 </ul>
885
886 <p>
887 A version discrepancy between <code>ovs-vswitchd</code> and the
888 datapath in use is not normally cause for alarm. The Open vSwitch
889 kernel datapaths for Linux and Hyper-V, in particular, are designed
890 for maximum inter-version compatibility: any userspace version works
891 with with any kernel version. Some reasons do exist to insist on
892 particular user/kernel pairings. First, newer kernel versions add
893 new features, that can only be used by new-enough userspace, e.g.
894 VXLAN tunneling requires certain minimal userspace and kernel
895 versions. Second, as an extension to the first reason, some newer
896 kernel versions add new features for enhancing performance that only
897 new-enough userspace versions can take advantage of.
898 </p>
899 </column>
900
901 <column name="other_config" key="datapath-id">
902 Overrides the default OpenFlow datapath ID, setting it to the specified
903 value specified in hex. The value must either have a <code>0x</code>
904 prefix or be exactly 16 hex digits long. May not be all-zero.
905 </column>
906
907 <column name="other_config" key="dp-desc">
908 Human readable description of datapath. It is a maximum 256
909 byte-long free-form string to describe the datapath for
910 debugging purposes, e.g. <code>switch3 in room 3120</code>.
911 </column>
912
913 <column name="other_config" key="disable-in-band"
914 type='{"type": "boolean"}'>
915 If set to <code>true</code>, disable in-band control on the bridge
916 regardless of controller and manager settings.
917 </column>
918
919 <column name="other_config" key="in-band-queue"
920 type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
921 A queue ID as a nonnegative integer. This sets the OpenFlow queue ID
922 that will be used by flows set up by in-band control on this bridge.
923 If unset, or if the port used by an in-band control flow does not have
924 QoS configured, or if the port does not have a queue with the specified
925 ID, the default queue is used instead.
926 </column>
927
928 <column name="protocols">
929 <p>
930 List of OpenFlow protocols that may be used when negotiating
931 a connection with a controller. OpenFlow 1.0, 1.1, 1.2, 1.3, and
932 1.4 are enabled by default if this column is empty.
933 </p>
934
935 <p>
936 OpenFlow 1.5 and 1.6 are not enabled by default because their
937 implementations are missing features. In addition, the OpenFlow 1.6
938 specification is still under development and thus subject to change.
939 </p>
940 </column>
941 </group>
942
943 <group title="Spanning Tree Configuration">
944 <p>
945 The IEEE 802.1D Spanning Tree Protocol (STP) is a network protocol
946 that ensures loop-free topologies. It allows redundant links to
947 be included in the network to provide automatic backup paths if
948 the active links fails.
949 </p>
950
951 <p>
952 These settings configure the slower-to-converge but still widely
953 supported version of Spanning Tree Protocol, sometimes known as
954 802.1D-1998. Open vSwitch also supports the newer Rapid Spanning Tree
955 Protocol (RSTP), documented later in the section titled <code>Rapid
956 Spanning Tree Configuration</code>.
957 </p>
958
959 <group title="STP Configuration">
960 <column name="stp_enable" type='{"type": "boolean"}'>
961 <p>
962 Enable spanning tree on the bridge. By default, STP is disabled
963 on bridges. Bond, internal, and mirror ports are not supported
964 and will not participate in the spanning tree.
965 </p>
966
967 <p>
968 STP and RSTP are mutually exclusive. If both are enabled, RSTP
969 will be used.
970 </p>
971 </column>
972
973 <column name="other_config" key="stp-system-id">
974 The bridge's STP identifier (the lower 48 bits of the bridge-id)
975 in the form
976 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
977 By default, the identifier is the MAC address of the bridge.
978 </column>
979
980 <column name="other_config" key="stp-priority"
981 type='{"type": "integer", "minInteger": 0, "maxInteger": 65535}'>
982 The bridge's relative priority value for determining the root
983 bridge (the upper 16 bits of the bridge-id). A bridge with the
984 lowest bridge-id is elected the root. By default, the priority
985 is 0x8000.
986 </column>
987
988 <column name="other_config" key="stp-hello-time"
989 type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
990 The interval between transmissions of hello messages by
991 designated ports, in seconds. By default the hello interval is
992 2 seconds.
993 </column>
994
995 <column name="other_config" key="stp-max-age"
996 type='{"type": "integer", "minInteger": 6, "maxInteger": 40}'>
997 The maximum age of the information transmitted by the bridge
998 when it is the root bridge, in seconds. By default, the maximum
999 age is 20 seconds.
1000 </column>
1001
1002 <column name="other_config" key="stp-forward-delay"
1003 type='{"type": "integer", "minInteger": 4, "maxInteger": 30}'>
1004 The delay to wait between transitioning root and designated
1005 ports to <code>forwarding</code>, in seconds. By default, the
1006 forwarding delay is 15 seconds.
1007 </column>
1008
1009 <column name="other_config" key="mcast-snooping-aging-time"
1010 type='{"type": "integer", "minInteger": 1}'>
1011 <p>
1012 The maximum number of seconds to retain a multicast snooping entry for
1013 which no packets have been seen. The default is currently 300
1014 seconds (5 minutes). The value, if specified, is forced into a
1015 reasonable range, currently 15 to 3600 seconds.
1016 </p>
1017 </column>
1018
1019 <column name="other_config" key="mcast-snooping-table-size"
1020 type='{"type": "integer", "minInteger": 1}'>
1021 <p>
1022 The maximum number of multicast snooping addresses to learn. The
1023 default is currently 2048. The value, if specified, is forced into
1024 a reasonable range, currently 10 to 1,000,000.
1025 </p>
1026 </column>
1027 <column name="other_config" key="mcast-snooping-disable-flood-unregistered"
1028 type='{"type": "boolean"}'>
1029 <p>
1030 If set to <code>false</code>, unregistered multicast packets are forwarded
1031 to all ports.
1032 If set to <code>true</code>, unregistered multicast packets are forwarded
1033 to ports connected to multicast routers.
1034 </p>
1035 </column>
1036 </group>
1037
1038 <group title="STP Status">
1039 <p>
1040 These key-value pairs report the status of 802.1D-1998. They are
1041 present only if STP is enabled (via the <ref column="stp_enable"/>
1042 column).
1043 </p>
1044 <column name="status" key="stp_bridge_id">
1045 The bridge ID used in spanning tree advertisements, in the form
1046 <var>xxxx</var>.<var>yyyyyyyyyyyy</var> where the <var>x</var>s are
1047 the STP priority, the <var>y</var>s are the STP system ID, and each
1048 <var>x</var> and <var>y</var> is a hex digit.
1049 </column>
1050 <column name="status" key="stp_designated_root">
1051 The designated root for this spanning tree, in the same form as <ref
1052 column="status" key="stp_bridge_id"/>. If this bridge is the root,
1053 this will have the same value as <ref column="status"
1054 key="stp_bridge_id"/>, otherwise it will differ.
1055 </column>
1056 <column name="status" key="stp_root_path_cost">
1057 The path cost of reaching the designated bridge. A lower number is
1058 better. The value is 0 if this bridge is the root, otherwise it is
1059 higher.
1060 </column>
1061 </group>
1062 </group>
1063
1064 <group title="Rapid Spanning Tree">
1065 <p>
1066 Rapid Spanning Tree Protocol (RSTP), like STP, is a network protocol
1067 that ensures loop-free topologies. RSTP superseded STP with the
1068 publication of 802.1D-2004. Compared to STP, RSTP converges more
1069 quickly and recovers more quickly from failures.
1070 </p>
1071
1072 <group title="RSTP Configuration">
1073 <column name="rstp_enable" type='{"type": "boolean"}'>
1074 <p>
1075 Enable Rapid Spanning Tree on the bridge. By default, RSTP is disabled
1076 on bridges. Bond, internal, and mirror ports are not supported
1077 and will not participate in the spanning tree.
1078 </p>
1079
1080 <p>
1081 STP and RSTP are mutually exclusive. If both are enabled, RSTP
1082 will be used.
1083 </p>
1084 </column>
1085
1086 <column name="other_config" key="rstp-address">
1087 The bridge's RSTP address (the lower 48 bits of the bridge-id)
1088 in the form
1089 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
1090 By default, the address is the MAC address of the bridge.
1091 </column>
1092
1093 <column name="other_config" key="rstp-priority"
1094 type='{"type": "integer", "minInteger": 0, "maxInteger": 61440}'>
1095 The bridge's relative priority value for determining the root
1096 bridge (the upper 16 bits of the bridge-id). A bridge with the
1097 lowest bridge-id is elected the root. By default, the priority
1098 is 0x8000 (32768). This value needs to be a multiple of 4096,
1099 otherwise it's rounded to the nearest inferior one.
1100 </column>
1101
1102 <column name="other_config" key="rstp-ageing-time"
1103 type='{"type": "integer", "minInteger": 10, "maxInteger": 1000000}'>
1104 The Ageing Time parameter for the Bridge. The default value
1105 is 300 seconds.
1106 </column>
1107
1108 <column name="other_config" key="rstp-force-protocol-version"
1109 type='{"type": "integer"}'>
1110 The Force Protocol Version parameter for the Bridge. This
1111 can take the value 0 (STP Compatibility mode) or 2
1112 (the default, normal operation).
1113 </column>
1114
1115 <column name="other_config" key="rstp-max-age"
1116 type='{"type": "integer", "minInteger": 6, "maxInteger": 40}'>
1117 The maximum age of the information transmitted by the Bridge
1118 when it is the Root Bridge. The default value is 20.
1119 </column>
1120
1121 <column name="other_config" key="rstp-forward-delay"
1122 type='{"type": "integer", "minInteger": 4, "maxInteger": 30}'>
1123 The delay used by STP Bridges to transition Root and Designated
1124 Ports to Forwarding. The default value is 15.
1125 </column>
1126
1127 <column name="other_config" key="rstp-transmit-hold-count"
1128 type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
1129 The Transmit Hold Count used by the Port Transmit state machine
1130 to limit transmission rate. The default value is 6.
1131 </column>
1132 </group>
1133
1134 <group title="RSTP Status">
1135 <p>
1136 These key-value pairs report the status of 802.1D-2004. They are
1137 present only if RSTP is enabled (via the <ref column="rstp_enable"/>
1138 column).
1139 </p>
1140 <column name="rstp_status" key="rstp_bridge_id">
1141 The bridge ID used in rapid spanning tree advertisements, in the form
1142 <var>x</var>.<var>yyy</var>.<var>zzzzzzzzzzzz</var> where
1143 <var>x</var> is the RSTP priority, the <var>y</var>s are a locally
1144 assigned system ID extension, the <var>z</var>s are the STP system
1145 ID, and each <var>x</var>, <var>y</var>, or <var>z</var> is a hex
1146 digit.
1147 </column>
1148 <column name="rstp_status" key="rstp_root_id">
1149 The root of this spanning tree, in the same form as <ref
1150 column="rstp_status" key="rstp_bridge_id"/>. If this bridge is the
1151 root, this will have the same value as <ref column="rstp_status"
1152 key="rstp_bridge_id"/>, otherwise it will differ.
1153 </column>
1154 <column name="rstp_status" key="rstp_root_path_cost"
1155 type='{"type": "integer", "minInteger": 0}'>
1156 The path cost of reaching the root. A lower number is better. The
1157 value is 0 if this bridge is the root, otherwise it is higher.
1158 </column>
1159 <column name="rstp_status" key="rstp_designated_id">
1160 The RSTP designated ID, in the same form as <ref column="rstp_status"
1161 key="rstp_bridge_id"/>.
1162 </column>
1163 <column name="rstp_status" key="rstp_designated_port_id">
1164 The RSTP designated port ID, as a 4-digit hex number.
1165 </column>
1166 <column name="rstp_status" key="rstp_bridge_port_id">
1167 The RSTP bridge port ID, as a 4-digit hex number.
1168 </column>
1169 </group>
1170 </group>
1171
1172 <group title="Multicast Snooping Configuration">
1173 Multicast snooping (RFC 4541) monitors the Internet Group Management
1174 Protocol (IGMP) and Multicast Listener Discovery traffic between hosts
1175 and multicast routers. The switch uses what IGMP and MLD snooping
1176 learns to forward multicast traffic only to interfaces that are connected
1177 to interested receivers. Currently it supports IGMPv1, IGMPv2, IGMPv3,
1178 MLDv1 and MLDv2 protocols.
1179
1180 <column name="mcast_snooping_enable">
1181 Enable multicast snooping on the bridge. For now, the default
1182 is disabled.
1183 </column>
1184 </group>
1185
1186 <group title="Other Features">
1187 <column name="datapath_type">
1188 Name of datapath provider. The kernel datapath has type
1189 <code>system</code>. The userspace datapath has type
1190 <code>netdev</code>. A manager may refer to the <ref
1191 table="Open_vSwitch" column="datapath_types"/> column of the <ref
1192 table="Open_vSwitch"/> table for a list of the types accepted by this
1193 Open vSwitch instance.
1194 </column>
1195
1196 <column name="external_ids" key="bridge-id">
1197 A unique identifier of the bridge. On Citrix XenServer this will
1198 commonly be the same as
1199 <ref column="external_ids" key="xs-network-uuids"/>.
1200 </column>
1201
1202 <column name="external_ids" key="xs-network-uuids">
1203 Semicolon-delimited set of universally unique identifier(s) for the
1204 network with which this bridge is associated on a Citrix XenServer
1205 host. The network identifiers are RFC 4122 UUIDs as displayed by,
1206 e.g., <code>xe network-list</code>.
1207 </column>
1208
1209 <column name="other_config" key="hwaddr">
1210 An Ethernet address in the form
1211 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
1212 to set the hardware address of the local port and influence the
1213 datapath ID.
1214 </column>
1215
1216 <column name="other_config" key="forward-bpdu"
1217 type='{"type": "boolean"}'>
1218
1219 <p>
1220 Controls forwarding of BPDUs and other network control frames when
1221 NORMAL action is invoked. When this option is <code>false</code> or
1222 unset, frames with reserved Ethernet addresses (see table below) will
1223 not be forwarded. When this option is <code>true</code>, such frames
1224 will not be treated specially.
1225 </p>
1226
1227 <p>
1228 The above general rule has the following exceptions:
1229 </p>
1230
1231 <ul>
1232 <li>
1233 If STP is enabled on the bridge (see the <ref column="stp_enable"
1234 table="Bridge"/> column in the <ref table="Bridge"/> table), the
1235 bridge processes all received STP packets and never passes them to
1236 OpenFlow or forwards them. This is true even if STP is disabled on
1237 an individual port.
1238 </li>
1239
1240 <li>
1241 If LLDP is enabled on an interface (see the <ref column="lldp"
1242 table="Interface"/> column in the <ref table="Interface"/> table),
1243 the interface processes received LLDP packets and never passes them
1244 to OpenFlow or forwards them.
1245 </li>
1246 </ul>
1247
1248 <p>
1249 Set this option to <code>true</code> if the Open vSwitch bridge
1250 connects different Ethernet networks and is not configured to
1251 participate in STP.
1252 </p>
1253
1254 <p>
1255 This option affects packets with the following destination MAC
1256 addresses:
1257 </p>
1258
1259 <dl>
1260 <dt><code>01:80:c2:00:00:00</code></dt>
1261 <dd>IEEE 802.1D Spanning Tree Protocol (STP).</dd>
1262
1263 <dt><code>01:80:c2:00:00:01</code></dt>
1264 <dd>IEEE Pause frame.</dd>
1265
1266 <dt><code>01:80:c2:00:00:0<var>x</var></code></dt>
1267 <dd>Other reserved protocols.</dd>
1268
1269 <dt><code>00:e0:2b:00:00:00</code></dt>
1270 <dd>Extreme Discovery Protocol (EDP).</dd>
1271
1272 <dt>
1273 <code>00:e0:2b:00:00:04</code> and <code>00:e0:2b:00:00:06</code>
1274 </dt>
1275 <dd>Ethernet Automatic Protection Switching (EAPS).</dd>
1276
1277 <dt><code>01:00:0c:cc:cc:cc</code></dt>
1278 <dd>
1279 Cisco Discovery Protocol (CDP), VLAN Trunking Protocol (VTP),
1280 Dynamic Trunking Protocol (DTP), Port Aggregation Protocol (PAgP),
1281 and others.
1282 </dd>
1283
1284 <dt><code>01:00:0c:cc:cc:cd</code></dt>
1285 <dd>Cisco Shared Spanning Tree Protocol PVSTP+.</dd>
1286
1287 <dt><code>01:00:0c:cd:cd:cd</code></dt>
1288 <dd>Cisco STP Uplink Fast.</dd>
1289
1290 <dt><code>01:00:0c:00:00:00</code></dt>
1291 <dd>Cisco Inter Switch Link.</dd>
1292
1293 <dt><code>01:00:0c:cc:cc:c<var>x</var></code></dt>
1294 <dd>Cisco CFM.</dd>
1295 </dl>
1296 </column>
1297
1298 <column name="other_config" key="mac-aging-time"
1299 type='{"type": "integer", "minInteger": 1}'>
1300 <p>
1301 The maximum number of seconds to retain a MAC learning entry for
1302 which no packets have been seen. The default is currently 300
1303 seconds (5 minutes). The value, if specified, is forced into a
1304 reasonable range, currently 15 to 3600 seconds.
1305 </p>
1306
1307 <p>
1308 A short MAC aging time allows a network to more quickly detect that a
1309 host is no longer connected to a switch port. However, it also makes
1310 it more likely that packets will be flooded unnecessarily, when they
1311 are addressed to a connected host that rarely transmits packets. To
1312 reduce the incidence of unnecessary flooding, use a MAC aging time
1313 longer than the maximum interval at which a host will ordinarily
1314 transmit packets.
1315 </p>
1316 </column>
1317
1318 <column name="other_config" key="mac-table-size"
1319 type='{"type": "integer", "minInteger": 1}'>
1320 <p>
1321 The maximum number of MAC addresses to learn. The default is
1322 currently 2048. The value, if specified, is forced into a reasonable
1323 range, currently 10 to 1,000,000.
1324 </p>
1325 </column>
1326 </group>
1327
1328 <group title="Common Columns">
1329 The overall purpose of these columns is described under <code>Common
1330 Columns</code> at the beginning of this document.
1331
1332 <column name="other_config"/>
1333 <column name="external_ids"/>
1334 </group>
1335 </table>
1336
1337 <table name="Port" table="Port or bond configuration.">
1338 <p>A port within a <ref table="Bridge"/>.</p>
1339 <p>Most commonly, a port has exactly one ``interface,'' pointed to by its
1340 <ref column="interfaces"/> column. Such a port logically
1341 corresponds to a port on a physical Ethernet switch. A port
1342 with more than one interface is a ``bonded port'' (see
1343 <ref group="Bonding Configuration"/>).</p>
1344 <p>Some properties that one might think as belonging to a port are actually
1345 part of the port's <ref table="Interface"/> members.</p>
1346
1347 <column name="name">
1348 Port name. For a non-bonded port, this should be the same as its
1349 interface's name. Port names must otherwise be unique among the names of
1350 ports, interfaces, and bridges on a host. Because port and interfaces
1351 names are usually the same, the restrictions on the <ref
1352 table="Interface" column="name"/> column in the <ref table="Interface"/>
1353 table, particularly on length, also apply to port names. Refer to the
1354 documentation for <ref table="Interface"/> names for details.
1355 </column>
1356
1357 <column name="interfaces">
1358 The port's interfaces. If there is more than one, this is a
1359 bonded Port.
1360 </column>
1361
1362 <group title="VLAN Configuration">
1363 <p>
1364 In short, a VLAN (short for ``virtual LAN'') is a way to partition a
1365 single switch into multiple switches. VLANs can be confusing, so for
1366 an introduction, please refer to the question ``What's a VLAN?'' in the
1367 Open vSwitch FAQ.
1368 </p>
1369
1370 <p>
1371 A VLAN is sometimes encoded into a packet using a 802.1Q or 802.1ad
1372 VLAN header, but every packet is part of some VLAN whether or not it is
1373 encoded in the packet. (A packet that appears to have no VLAN is part
1374 of VLAN 0, by default.) As a result, it's useful to think of a VLAN as
1375 a metadata property of a packet, separate from how the VLAN is encoded.
1376 For a given port, this column determines how the encoding of a packet
1377 that ingresses or egresses the port maps to the packet's VLAN. When a
1378 packet enters the switch, its VLAN is determined based on its setting
1379 in this column and its VLAN headers, if any, and then, conceptually,
1380 the VLAN headers are then stripped off. Conversely, when a packet
1381 exits the switch, its VLAN and the settings in this column determine
1382 what VLAN headers, if any, are pushed onto the packet before it
1383 egresses the port.
1384 </p>
1385
1386 <p>
1387 The VLAN configuration in this column affects Open vSwitch only when it
1388 is doing ``normal switching.'' It does not affect flows set up by an
1389 OpenFlow controller, outside of the OpenFlow ``normal action.''
1390 </p>
1391
1392 <p>
1393 Bridge ports support the following types of VLAN configuration:
1394 </p>
1395
1396 <dl>
1397 <dt>trunk</dt>
1398 <dd>
1399 <p>
1400 A trunk port carries packets on one or more specified VLANs
1401 specified in the <ref column="trunks"/> column (often, on every
1402 VLAN). A packet that ingresses on a trunk port is in the VLAN
1403 specified in its 802.1Q header, or VLAN 0 if the packet has no
1404 802.1Q header. A packet that egresses through a trunk port will
1405 have an 802.1Q header if it has a nonzero VLAN ID.
1406 </p>
1407
1408 <p>
1409 Any packet that ingresses on a trunk port tagged with a VLAN that
1410 the port does not trunk is dropped.
1411 </p>
1412 </dd>
1413
1414 <dt>access</dt>
1415 <dd>
1416 <p>
1417 An access port carries packets on exactly one VLAN specified in the
1418 <ref column="tag"/> column. Packets egressing on an access port
1419 have no 802.1Q header.
1420 </p>
1421
1422 <p>
1423 Any packet with an 802.1Q header with a nonzero VLAN ID that
1424 ingresses on an access port is dropped, regardless of whether the
1425 VLAN ID in the header is the access port's VLAN ID.
1426 </p>
1427 </dd>
1428
1429 <dt>native-tagged</dt>
1430 <dd>
1431 A native-tagged port resembles a trunk port, with the exception that
1432 a packet without an 802.1Q header that ingresses on a native-tagged
1433 port is in the ``native VLAN'' (specified in the <ref column="tag"/>
1434 column).
1435 </dd>
1436
1437 <dt>native-untagged</dt>
1438 <dd>
1439 A native-untagged port resembles a native-tagged port, with the
1440 exception that a packet that egresses on a native-untagged port in
1441 the native VLAN will not have an 802.1Q header.
1442 </dd>
1443
1444 <dt>dot1q-tunnel</dt>
1445 <dd>
1446 <p>
1447 A dot1q-tunnel port is somewhat like an access port. Like an
1448 access port, it carries packets on the single VLAN specified in the
1449 <ref column="tag"/> column and this VLAN, called the service VLAN,
1450 does not appear in an 802.1Q header for packets that ingress or
1451 egress on the port. The main difference lies in the behavior when
1452 packets that include a 802.1Q header ingress on the port. Whereas
1453 an access port drops such packets, a dot1q-tunnel port treats these
1454 as double-tagged with the outer service VLAN <ref column="tag"/>
1455 and the inner customer VLAN taken from the 802.1Q header.
1456 Correspondingly, to egress on the port, a packet outer VLAN (or
1457 only VLAN) must be <ref column="tag"/>, which is removed before
1458 egress, which exposes the inner (customer) VLAN if one is present.
1459 </p>
1460
1461 <p>
1462 If <ref column="cvlans"/> is set, only allows packets in the
1463 specified customer VLANs.
1464 </p>
1465 </dd>
1466 </dl>
1467 <p>
1468 A packet will only egress through bridge ports that carry the VLAN of
1469 the packet, as described by the rules above.
1470 </p>
1471
1472 <column name="vlan_mode">
1473 <p>
1474 The VLAN mode of the port, as described above. When this column is
1475 empty, a default mode is selected as follows:
1476 </p>
1477 <ul>
1478 <li>
1479 If <ref column="tag"/> contains a value, the port is an access
1480 port. The <ref column="trunks"/> column should be empty.
1481 </li>
1482 <li>
1483 Otherwise, the port is a trunk port. The <ref column="trunks"/>
1484 column value is honored if it is present.
1485 </li>
1486 </ul>
1487 </column>
1488
1489 <column name="tag">
1490 <p>
1491 For an access port, the port's implicitly tagged VLAN. For a
1492 native-tagged or native-untagged port, the port's native VLAN. Must
1493 be empty if this is a trunk port.
1494 </p>
1495 </column>
1496
1497 <column name="trunks">
1498 <p>
1499 For a trunk, native-tagged, or native-untagged port, the 802.1Q VLAN
1500 or VLANs that this port trunks; if it is empty, then the port trunks
1501 all VLANs. Must be empty if this is an access port.
1502 </p>
1503 <p>
1504 A native-tagged or native-untagged port always trunks its native
1505 VLAN, regardless of whether <ref column="trunks"/> includes that
1506 VLAN.
1507 </p>
1508 </column>
1509
1510 <column name="cvlans">
1511 <p>
1512 For a dot1q-tunnel port, the customer VLANs that this port includes.
1513 If this is empty, the port includes all customer VLANs.
1514 </p>
1515 <p>
1516 For other kinds of ports, this setting is ignored.
1517 </p>
1518 </column>
1519
1520 <column name="other_config" key="qinq-ethtype"
1521 type='{"type": "string", "enum": ["set", ["802.1ad", "802.1q"]]}'>
1522 <p>
1523 For a dot1q-tunnel port, this is the TPID for the service tag, that
1524 is, for the 802.1Q header that contains the service VLAN ID. Because
1525 packets that actually ingress and egress a dot1q-tunnel port do not
1526 include an 802.1Q header for the service VLAN, this does not affect
1527 packets on the dot1q-tunnel port itself. Rather, it determines the
1528 service VLAN for a packet that ingresses on a dot1q-tunnel port and
1529 egresses on a trunk port.
1530 </p>
1531 <p>
1532 The value <code>802.1ad</code> specifies TPID 0x88a8, which is also
1533 the default if the setting is omitted. The value <code>802.1q</code>
1534 specifies TPID 0x8100.
1535 </p>
1536 <p>
1537 For other kinds of ports, this setting is ignored.
1538 </p>
1539 </column>
1540
1541 <column name="other_config" key="priority-tags"
1542 type='{"type": "boolean"}'>
1543 <p>
1544 An 802.1Q header contains two important pieces of information: a VLAN
1545 ID and a priority. A frame with a zero VLAN ID, called a
1546 ``priority-tagged'' frame, is supposed to be treated the same way as
1547 a frame without an 802.1Q header at all (except for the priority).
1548 </p>
1549
1550 <p>
1551 However, some network elements ignore any frame that has 802.1Q
1552 header at all, even when the VLAN ID is zero. Therefore, by default
1553 Open vSwitch does not output priority-tagged frames, instead omitting
1554 the 802.1Q header entirely if the VLAN ID is zero. Set this key to
1555 <code>true</code> to enable priority-tagged frames on a port.
1556 </p>
1557
1558 <p>
1559 Regardless of this setting, Open vSwitch omits the 802.1Q header on
1560 output if both the VLAN ID and priority would be zero.
1561 </p>
1562
1563 <p>
1564 All frames output to native-tagged ports have a nonzero VLAN ID, so
1565 this setting is not meaningful on native-tagged ports.
1566 </p>
1567 </column>
1568 </group>
1569
1570 <group title="Bonding Configuration">
1571 <p>A port that has more than one interface is a ``bonded port.'' Bonding
1572 allows for load balancing and fail-over.</p>
1573
1574 <p>
1575 The following types of bonding will work with any kind of upstream
1576 switch. On the upstream switch, do not configure the interfaces as a
1577 bond:
1578 </p>
1579
1580 <dl>
1581 <dt><code>balance-slb</code></dt>
1582 <dd>
1583 Balances flows among slaves based on source MAC address and output
1584 VLAN, with periodic rebalancing as traffic patterns change.
1585 </dd>
1586
1587 <dt><code>active-backup</code></dt>
1588 <dd>
1589 Assigns all flows to one slave, failing over to a backup slave when
1590 the active slave is disabled. This is the only bonding mode in which
1591 interfaces may be plugged into different upstream switches.
1592 </dd>
1593 </dl>
1594
1595 <p>
1596 The following modes require the upstream switch to support 802.3ad with
1597 successful LACP negotiation. If LACP negotiation fails and
1598 other-config:lacp-fallback-ab is true, then <code>active-backup</code>
1599 mode is used:
1600 </p>
1601
1602 <dl>
1603 <dt><code>balance-tcp</code></dt>
1604 <dd>
1605 Balances flows among slaves based on L3 and L4 protocol information
1606 such as IP addresses and TCP/UDP ports.
1607 </dd>
1608 </dl>
1609
1610 <p>These columns apply only to bonded ports. Their values are
1611 otherwise ignored.</p>
1612
1613 <column name="bond_mode">
1614 <p>The type of bonding used for a bonded port. Defaults to
1615 <code>active-backup</code> if unset.
1616 </p>
1617 </column>
1618
1619 <column name="other_config" key="bond-hash-basis"
1620 type='{"type": "integer"}'>
1621 An integer hashed along with flows when choosing output slaves in load
1622 balanced bonds. When changed, all flows will be assigned different
1623 hash values possibly causing slave selection decisions to change. Does
1624 not affect bonding modes which do not employ load balancing such as
1625 <code>active-backup</code>.
1626 </column>
1627
1628 <group title="Link Failure Detection">
1629 <p>
1630 An important part of link bonding is detecting that links are down so
1631 that they may be disabled. These settings determine how Open vSwitch
1632 detects link failure.
1633 </p>
1634
1635 <column name="other_config" key="bond-detect-mode"
1636 type='{"type": "string", "enum": ["set", ["carrier", "miimon"]]}'>
1637 The means used to detect link failures. Defaults to
1638 <code>carrier</code> which uses each interface's carrier to detect
1639 failures. When set to <code>miimon</code>, will check for failures
1640 by polling each interface's MII.
1641 </column>
1642
1643 <column name="other_config" key="bond-miimon-interval"
1644 type='{"type": "integer"}'>
1645 The interval, in milliseconds, between successive attempts to poll
1646 each interface's MII. Relevant only when <ref column="other_config"
1647 key="bond-detect-mode"/> is <code>miimon</code>.
1648 </column>
1649
1650 <column name="bond_updelay">
1651 <p>
1652 The number of milliseconds for which the link must stay up on an
1653 interface before the interface is considered to be up. Specify
1654 <code>0</code> to enable the interface immediately.
1655 </p>
1656
1657 <p>
1658 This setting is honored only when at least one bonded interface is
1659 already enabled. When no interfaces are enabled, then the first
1660 bond interface to come up is enabled immediately.
1661 </p>
1662 </column>
1663
1664 <column name="bond_downdelay">
1665 The number of milliseconds for which the link must stay down on an
1666 interface before the interface is considered to be down. Specify
1667 <code>0</code> to disable the interface immediately.
1668 </column>
1669 </group>
1670
1671 <group title="LACP Configuration">
1672 <p>
1673 LACP, the Link Aggregation Control Protocol, is an IEEE standard that
1674 allows switches to automatically detect that they are connected by
1675 multiple links and aggregate across those links. These settings
1676 control LACP behavior.
1677 </p>
1678
1679 <column name="lacp">
1680 Configures LACP on this port. LACP allows directly connected
1681 switches to negotiate which links may be bonded. LACP may be enabled
1682 on non-bonded ports for the benefit of any switches they may be
1683 connected to. <code>active</code> ports are allowed to initiate LACP
1684 negotiations. <code>passive</code> ports are allowed to participate
1685 in LACP negotiations initiated by a remote switch, but not allowed to
1686 initiate such negotiations themselves. If LACP is enabled on a port
1687 whose partner switch does not support LACP, the bond will be
1688 disabled, unless other-config:lacp-fallback-ab is set to true.
1689 Defaults to <code>off</code> if unset.
1690 </column>
1691
1692 <column name="other_config" key="lacp-system-id">
1693 The LACP system ID of this <ref table="Port"/>. The system ID of a
1694 LACP bond is used to identify itself to its partners. Must be a
1695 nonzero MAC address. Defaults to the bridge Ethernet address if
1696 unset.
1697 </column>
1698
1699 <column name="other_config" key="lacp-system-priority"
1700 type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
1701 The LACP system priority of this <ref table="Port"/>. In LACP
1702 negotiations, link status decisions are made by the system with the
1703 numerically lower priority.
1704 </column>
1705
1706 <column name="other_config" key="lacp-time"
1707 type='{"type": "string", "enum": ["set", ["fast", "slow"]]}'>
1708 <p>
1709 The LACP timing which should be used on this <ref table="Port"/>.
1710 By default <code>slow</code> is used. When configured to be
1711 <code>fast</code> LACP heartbeats are requested at a rate of once
1712 per second causing connectivity problems to be detected more
1713 quickly. In <code>slow</code> mode, heartbeats are requested at a
1714 rate of once every 30 seconds.
1715 </p>
1716 </column>
1717
1718 <column name="other_config" key="lacp-fallback-ab"
1719 type='{"type": "boolean"}'>
1720 <p>
1721 Determines the behavior of openvswitch bond in LACP mode. If
1722 the partner switch does not support LACP, setting this option
1723 to <code>true</code> allows openvswitch to fallback to
1724 active-backup. If the option is set to <code>false</code>, the
1725 bond will be disabled. In both the cases, once the partner switch
1726 is configured to LACP mode, the bond will use LACP.
1727 </p>
1728 </column>
1729 </group>
1730
1731 <group title="Rebalancing Configuration">
1732 <p>
1733 These settings control behavior when a bond is in
1734 <code>balance-slb</code> or <code>balance-tcp</code> mode.
1735 </p>
1736
1737 <column name="other_config" key="bond-rebalance-interval"
1738 type='{"type": "integer", "minInteger": 0, "maxInteger": 10000}'>
1739 For a load balanced bonded port, the number of milliseconds between
1740 successive attempts to rebalance the bond, that is, to move flows
1741 from one interface on the bond to another in an attempt to keep usage
1742 of each interface roughly equal. If zero, load balancing is disabled
1743 on the bond (link failure still cause flows to move). If
1744 less than 1000ms, the rebalance interval will be 1000ms.
1745 </column>
1746 </group>
1747
1748 <column name="bond_fake_iface">
1749 For a bonded port, whether to create a fake internal interface with the
1750 name of the port. Use only for compatibility with legacy software that
1751 requires this.
1752 </column>
1753 </group>
1754
1755 <group title="Spanning Tree Protocol">
1756 <p>
1757 The configuration here is only meaningful, and the status is only
1758 populated, when 802.1D-1998 Spanning Tree Protocol is enabled on the
1759 port's <ref column="Bridge"/> with its <ref column="stp_enable"/>
1760 column.
1761 </p>
1762
1763 <group title="STP Configuration">
1764 <column name="other_config" key="stp-enable"
1765 type='{"type": "boolean"}'>
1766 When STP is enabled on a bridge, it is enabled by default on all of
1767 the bridge's ports except bond, internal, and mirror ports (which do
1768 not work with STP). If this column's value is <code>false</code>,
1769 STP is disabled on the port.
1770 </column>
1771
1772 <column name="other_config" key="stp-port-num"
1773 type='{"type": "integer", "minInteger": 1, "maxInteger": 255}'>
1774 The port number used for the lower 8 bits of the port-id. By
1775 default, the numbers will be assigned automatically. If any
1776 port's number is manually configured on a bridge, then they
1777 must all be.
1778 </column>
1779
1780 <column name="other_config" key="stp-port-priority"
1781 type='{"type": "integer", "minInteger": 0, "maxInteger": 255}'>
1782 The port's relative priority value for determining the root
1783 port (the upper 8 bits of the port-id). A port with a lower
1784 port-id will be chosen as the root port. By default, the
1785 priority is 0x80.
1786 </column>
1787
1788 <column name="other_config" key="stp-path-cost"
1789 type='{"type": "integer", "minInteger": 0, "maxInteger": 65535}'>
1790 Spanning tree path cost for the port. A lower number indicates
1791 a faster link. By default, the cost is based on the maximum
1792 speed of the link.
1793 </column>
1794 </group>
1795
1796 <group title="STP Status">
1797 <column name="status" key="stp_port_id">
1798 The port ID used in spanning tree advertisements for this port, as 4
1799 hex digits. Configuring the port ID is described in the
1800 <code>stp-port-num</code> and <code>stp-port-priority</code> keys of
1801 the <code>other_config</code> section earlier.
1802 </column>
1803 <column name="status" key="stp_state"
1804 type='{"type": "string", "enum": ["set",
1805 ["disabled", "listening", "learning",
1806 "forwarding", "blocking"]]}'>
1807 STP state of the port.
1808 </column>
1809 <column name="status" key="stp_sec_in_state"
1810 type='{"type": "integer", "minInteger": 0}'>
1811 The amount of time this port has been in the current STP state, in
1812 seconds.
1813 </column>
1814 <column name="status" key="stp_role"
1815 type='{"type": "string", "enum": ["set",
1816 ["root", "designated", "alternate"]]}'>
1817 STP role of the port.
1818 </column>
1819 </group>
1820 </group>
1821
1822 <group title="Rapid Spanning Tree Protocol">
1823 <p>
1824 The configuration here is only meaningful, and the status and
1825 statistics are only populated, when 802.1D-1998 Spanning Tree Protocol
1826 is enabled on the port's <ref column="Bridge"/> with its <ref
1827 column="stp_enable"/> column.
1828 </p>
1829
1830 <group title="RSTP Configuration">
1831 <column name="other_config" key="rstp-enable"
1832 type='{"type": "boolean"}'>
1833 When RSTP is enabled on a bridge, it is enabled by default on all of
1834 the bridge's ports except bond, internal, and mirror ports (which do
1835 not work with RSTP). If this column's value is <code>false</code>,
1836 RSTP is disabled on the port.
1837 </column>
1838
1839 <column name="other_config" key="rstp-port-priority"
1840 type='{"type": "integer", "minInteger": 0, "maxInteger": 240}'>
1841 The port's relative priority value for determining the root port, in
1842 multiples of 16. By default, the port priority is 0x80 (128). Any
1843 value in the lower 4 bits is rounded off. The significant upper 4
1844 bits become the upper 4 bits of the port-id. A port with the lowest
1845 port-id is elected as the root.
1846 </column>
1847
1848 <column name="other_config" key="rstp-port-num"
1849 type='{"type": "integer", "minInteger": 1, "maxInteger": 4095}'>
1850 The local RSTP port number, used as the lower 12 bits of the port-id.
1851 By default the port numbers are assigned automatically, and typically
1852 may not correspond to the OpenFlow port numbers. A port with the
1853 lowest port-id is elected as the root.
1854 </column>
1855
1856 <column name="other_config" key="rstp-port-path-cost"
1857 type='{"type": "integer"}'>
1858 The port path cost. The Port's contribution, when it is
1859 the Root Port, to the Root Path Cost for the Bridge. By default the
1860 cost is automatically calculated from the port's speed.
1861 </column>
1862
1863 <column name="other_config" key="rstp-port-admin-edge"
1864 type='{"type": "boolean"}'>
1865 The admin edge port parameter for the Port. Default is
1866 <code>false</code>.
1867 </column>
1868
1869 <column name="other_config" key="rstp-port-auto-edge"
1870 type='{"type": "boolean"}'>
1871 The auto edge port parameter for the Port. Default is
1872 <code>true</code>.
1873 </column>
1874
1875 <column name="other_config" key="rstp-port-mcheck"
1876 type='{"type": "boolean"}'>
1877 <p>
1878 The mcheck port parameter for the Port. Default is
1879 <code>false</code>. May be set to force the Port Protocol
1880 Migration state machine to transmit RST BPDUs for a
1881 MigrateTime period, to test whether all STP Bridges on the
1882 attached LAN have been removed and the Port can continue to
1883 transmit RSTP BPDUs. Setting mcheck has no effect if the
1884 Bridge is operating in STP Compatibility mode.
1885 </p>
1886 <p>
1887 Changing the value from <code>true</code> to
1888 <code>false</code> has no effect, but needs to be done if
1889 this behavior is to be triggered again by subsequently
1890 changing the value from <code>false</code> to
1891 <code>true</code>.
1892 </p>
1893 </column>
1894 </group>
1895
1896 <group title="RSTP Status">
1897 <column name="rstp_status" key="rstp_port_id">
1898 The port ID used in spanning tree advertisements for this port, as 4
1899 hex digits. Configuring the port ID is described in the
1900 <code>rstp-port-num</code> and <code>rstp-port-priority</code> keys
1901 of the <code>other_config</code> section earlier.
1902 </column>
1903 <column name="rstp_status" key="rstp_port_role"
1904 type='{"type": "string", "enum": ["set",
1905 ["Root", "Designated", "Alternate", "Backup", "Disabled"]]}'>
1906 RSTP role of the port.
1907 </column>
1908 <column name="rstp_status" key="rstp_port_state"
1909 type='{"type": "string", "enum": ["set",
1910 ["Disabled", "Learning", "Forwarding", "Discarding"]]}'>
1911 RSTP state of the port.
1912 </column>
1913 <column name="rstp_status" key="rstp_designated_bridge_id">
1914 The port's RSTP designated bridge ID, in the same form as <ref
1915 column="rstp_status" key="rstp_bridge_id"/> in the <ref
1916 table="Bridge"/> table.
1917 </column>
1918 <column name="rstp_status" key="rstp_designated_port_id">
1919 The port's RSTP designated port ID, as 4 hex digits.
1920 </column>
1921 <column name="rstp_status" key="rstp_designated_path_cost"
1922 type='{"type": "integer"}'>
1923 The port's RSTP designated path cost. Lower is better.
1924 </column>
1925 </group>
1926
1927 <group title="RSTP Statistics">
1928 <column name="rstp_statistics" key="rstp_tx_count">
1929 Number of RSTP BPDUs transmitted through this port.
1930 </column>
1931 <column name="rstp_statistics" key="rstp_rx_count">
1932 Number of valid RSTP BPDUs received by this port.
1933 </column>
1934 <column name="rstp_statistics" key="rstp_error_count">
1935 Number of invalid RSTP BPDUs received by this port.
1936 </column>
1937 <column name="rstp_statistics" key="rstp_uptime">
1938 The duration covered by the other RSTP statistics, in seconds.
1939 </column>
1940 </group>
1941 </group>
1942
1943 <group title="Multicast Snooping">
1944 <column name="other_config" key="mcast-snooping-flood"
1945 type='{"type": "boolean"}'>
1946 <p>
1947 If set to <code>true</code>, multicast packets (except Reports) are
1948 unconditionally forwarded to the specific port.
1949 </p>
1950 </column>
1951 <column name="other_config" key="mcast-snooping-flood-reports"
1952 type='{"type": "boolean"}'>
1953 <p>
1954 If set to <code>true</code>, multicast Reports are unconditionally
1955 forwarded to the specific port.
1956 </p>
1957 </column>
1958 </group>
1959
1960 <group title="Other Features">
1961 <column name="qos">
1962 Quality of Service configuration for this port.
1963 </column>
1964
1965 <column name="mac">
1966 The MAC address to use for this port for the purpose of choosing the
1967 bridge's MAC address. This column does not necessarily reflect the
1968 port's actual MAC address, nor will setting it change the port's actual
1969 MAC address.
1970 </column>
1971
1972 <column name="fake_bridge">
1973 Does this port represent a sub-bridge for its tagged VLAN within the
1974 Bridge? See ovs-vsctl(8) for more information.
1975 </column>
1976
1977 <column name="protected" type='{"type": "boolean"}'>
1978 The protected ports feature allows certain ports to be designated as
1979 protected. Traffic between protected ports is blocked. Protected
1980 ports can send traffic to unprotected ports. Unprotected ports can
1981 send traffic to any port.
1982 Default is false.
1983 </column>
1984
1985 <column name="external_ids" key="fake-bridge-id-*">
1986 External IDs for a fake bridge (see the <ref column="fake_bridge"/>
1987 column) are defined by prefixing a <ref table="Bridge"/> <ref
1988 table="Bridge" column="external_ids"/> key with
1989 <code>fake-bridge-</code>,
1990 e.g. <code>fake-bridge-xs-network-uuids</code>.
1991 </column>
1992
1993 <column name="other_config" key="transient"
1994 type='{"type": "boolean"}'>
1995 <p>
1996 If set to <code>true</code>, the port will be removed when
1997 <code>ovs-ctl start --delete-transient-ports</code> is used.
1998 </p>
1999 </column>
2000 </group>
2001
2002 <column name="bond_active_slave">
2003 For a bonded port, record the mac address of the current active slave.
2004 </column>
2005
2006 <group title="Port Statistics">
2007 <p>
2008 Key-value pairs that report port statistics. The update period
2009 is controlled by <ref column="other_config"
2010 key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
2011 </p>
2012 <group title="Statistics: STP transmit and receive counters">
2013 <column name="statistics" key="stp_tx_count">
2014 Number of STP BPDUs sent on this port by the spanning
2015 tree library.
2016 </column>
2017 <column name="statistics" key="stp_rx_count">
2018 Number of STP BPDUs received on this port and accepted by the
2019 spanning tree library.
2020 </column>
2021 <column name="statistics" key="stp_error_count">
2022 Number of bad STP BPDUs received on this port. Bad BPDUs
2023 include runt packets and those with an unexpected protocol ID.
2024 </column>
2025 </group>
2026 </group>
2027
2028 <group title="Common Columns">
2029 The overall purpose of these columns is described under <code>Common
2030 Columns</code> at the beginning of this document.
2031
2032 <column name="other_config"/>
2033 <column name="external_ids"/>
2034 </group>
2035 </table>
2036
2037 <table name="Interface" title="One physical network device in a Port.">
2038 An interface within a <ref table="Port"/>.
2039
2040 <group title="Core Features">
2041 <column name="name">
2042 <p>
2043 Interface name. Should be alphanumeric. For non-bonded port, this
2044 should be the same as the port name. It must otherwise be unique
2045 among the names of ports, interfaces, and bridges on a host.
2046 </p>
2047
2048 <p>
2049 The maximum length of an interface name depends on the underlying
2050 datapath:
2051 </p>
2052
2053 <ul>
2054 <li>
2055 The names of interfaces implemented as Linux and BSD network
2056 devices, including interfaces with type <code>internal</code>,
2057 <code>tap</code>, or <code>system</code> plus the different types
2058 of tunnel ports, are limited to 15 bytes. Windows limits these
2059 names to 255 bytes.
2060 </li>
2061
2062 <li>
2063 The names of patch ports are not used in the underlying datapath,
2064 so operating system restrictions do not apply. Thus, they may have
2065 arbitrary length.
2066 </li>
2067 </ul>
2068
2069 <p>
2070 Regardless of other restrictions, OpenFlow only supports 15-byte
2071 names, which means that <code>ovs-ofctl</code> and OpenFlow
2072 controllers will show names truncated to 15 bytes.
2073 </p>
2074 </column>
2075
2076 <column name="ifindex">
2077 A positive interface index as defined for SNMP MIB-II in RFCs 1213 and
2078 2863, if the interface has one, otherwise 0. The ifindex is useful for
2079 seamless integration with protocols such as SNMP and sFlow.
2080 </column>
2081
2082 <column name="mac_in_use">
2083 The MAC address in use by this interface.
2084 </column>
2085
2086 <column name="mac">
2087 <p>Ethernet address to set for this interface. If unset then the
2088 default MAC address is used:</p>
2089 <ul>
2090 <li>For the local interface, the default is the lowest-numbered MAC
2091 address among the other bridge ports, either the value of the
2092 <ref table="Port" column="mac"/> in its <ref table="Port"/> record,
2093 if set, or its actual MAC (for bonded ports, the MAC of its slave
2094 whose name is first in alphabetical order). Internal ports and
2095 bridge ports that are used as port mirroring destinations (see the
2096 <ref table="Mirror"/> table) are ignored.</li>
2097 <li>For other internal interfaces, the default MAC is randomly
2098 generated.</li>
2099 <li>External interfaces typically have a MAC address associated with
2100 their hardware.</li>
2101 </ul>
2102 <p>Some interfaces may not have a software-controllable MAC
2103 address.</p>
2104 </column>
2105
2106 <column name="error">
2107 If the configuration of the port failed, as indicated by -1 in <ref
2108 column="ofport"/>, Open vSwitch sets this column to an error
2109 description in human readable form. Otherwise, Open vSwitch clears
2110 this column.
2111 </column>
2112
2113 <group title="OpenFlow Port Number">
2114 <p>
2115 When a client adds a new interface, Open vSwitch chooses an OpenFlow
2116 port number for the new port. If the client that adds the port fills
2117 in <ref column="ofport_request"/>, then Open vSwitch tries to use its
2118 value as the OpenFlow port number. Otherwise, or if the requested
2119 port number is already in use or cannot be used for another reason,
2120 Open vSwitch automatically assigns a free port number. Regardless of
2121 how the port number was obtained, Open vSwitch then reports in <ref
2122 column="ofport"/> the port number actually assigned.
2123 </p>
2124
2125 <p>
2126 Open vSwitch limits the port numbers that it automatically assigns to
2127 the range 1 through 32,767, inclusive. Controllers therefore have
2128 free use of ports 32,768 and up.
2129 </p>
2130
2131 <column name="ofport">
2132 <p>
2133 OpenFlow port number for this interface. Open vSwitch sets this
2134 column's value, so other clients should treat it as read-only.
2135 </p>
2136 <p>
2137 The OpenFlow ``local'' port (<code>OFPP_LOCAL</code>) is 65,534.
2138 The other valid port numbers are in the range 1 to 65,279,
2139 inclusive. Value -1 indicates an error adding the interface.
2140 </p>
2141 </column>
2142
2143 <column name="ofport_request"
2144 type='{"type": "integer", "minInteger": 1, "maxInteger": 65279}'>
2145 <p>
2146 Requested OpenFlow port number for this interface.
2147 </p>
2148
2149 <p>
2150 A client should ideally set this column's value in the same
2151 database transaction that it uses to create the interface. Open
2152 vSwitch version 2.1 and later will honor a later request for a
2153 specific port number, althuogh it might confuse some controllers:
2154 OpenFlow does not have a way to announce a port number change, so
2155 Open vSwitch represents it over OpenFlow as a port deletion
2156 followed immediately by a port addition.
2157 </p>
2158
2159 <p>
2160 If <ref column="ofport_request"/> is set or changed to some other
2161 port's automatically assigned port number, Open vSwitch chooses a
2162 new port number for the latter port.
2163 </p>
2164 </column>
2165 </group>
2166 </group>
2167
2168 <group title="System-Specific Details">
2169 <column name="type">
2170 <p>
2171 The interface type. The types supported by a particular instance of
2172 Open vSwitch are listed in the <ref table="Open_vSwitch"
2173 column="iface_types"/> column in the <ref table="Open_vSwitch"/>
2174 table. The following types are defined:
2175 </p>
2176
2177 <dl>
2178 <dt><code>system</code></dt>
2179 <dd>An ordinary network device, e.g. <code>eth0</code> on Linux.
2180 Sometimes referred to as ``external interfaces'' since they are
2181 generally connected to hardware external to that on which the Open
2182 vSwitch is running. The empty string is a synonym for
2183 <code>system</code>.</dd>
2184
2185 <dt><code>internal</code></dt>
2186 <dd>A simulated network device that sends and receives traffic. An
2187 internal interface whose <ref column="name"/> is the same as its
2188 bridge's <ref table="Open_vSwitch" column="name"/> is called the
2189 ``local interface.'' It does not make sense to bond an internal
2190 interface, so the terms ``port'' and ``interface'' are often used
2191 imprecisely for internal interfaces.</dd>
2192
2193 <dt><code>tap</code></dt>
2194 <dd>A TUN/TAP device managed by Open vSwitch.</dd>
2195
2196 <dt><code>geneve</code></dt>
2197 <dd>
2198 An Ethernet over Geneve (<code>http://tools.ietf.org/html/draft-ietf-nvo3-geneve</code>)
2199 IPv4/IPv6 tunnel.
2200
2201 A description of how to match and set Geneve options can be found
2202 in the <code>ovs-ofctl</code> manual page.
2203 </dd>
2204
2205 <dt><code>gre</code></dt>
2206 <dd>
2207 Generic Routing Encapsulation (GRE) over IPv4/IPv6 tunnel,
2208 configurable to encapsulate layer 2 or layer 3 traffic.
2209 </dd>
2210
2211 <dt><code>vxlan</code></dt>
2212 <dd>
2213 <p>
2214 An Ethernet tunnel over the UDP-based VXLAN protocol described in
2215 RFC 7348.
2216 </p>
2217 <p>
2218 Open vSwitch uses IANA-assigned UDP destination port 4789. The
2219 source port used for VXLAN traffic varies on a per-flow basis
2220 and is in the ephemeral port range.
2221 </p>
2222 </dd>
2223
2224 <dt><code>lisp</code></dt>
2225 <dd>
2226 <p>
2227 A layer 3 tunnel over the experimental, UDP-based Locator/ID
2228 Separation Protocol (RFC 6830).
2229 </p>
2230 <p>
2231 Only IPv4 and IPv6 packets are supported by the protocol, and
2232 they are sent and received without an Ethernet header. Traffic
2233 to/from LISP ports is expected to be configured explicitly, and
2234 the ports are not intended to participate in learning based
2235 switching. As such, they are always excluded from packet
2236 flooding.
2237 </p>
2238 </dd>
2239
2240 <dt><code>stt</code></dt>
2241 <dd>
2242 The Stateless TCP Tunnel (STT) is particularly useful when tunnel
2243 endpoints are in end-systems, as it utilizes the capabilities of
2244 standard network interface cards to improve performance. STT utilizes
2245 a TCP-like header inside the IP header. It is stateless, i.e., there is
2246 no TCP connection state of any kind associated with the tunnel. The
2247 TCP-like header is used to leverage the capabilities of existing
2248 network interface cards, but should not be interpreted as implying
2249 any sort of connection state between endpoints.
2250 Since the STT protocol does not engage in the usual TCP 3-way handshake,
2251 so it will have difficulty traversing stateful firewalls.
2252 The protocol is documented at
2253 https://tools.ietf.org/html/draft-davie-stt
2254
2255 All traffic uses a default destination port of 7471.
2256 </dd>
2257
2258 <dt><code>patch</code></dt>
2259 <dd>
2260 A pair of virtual devices that act as a patch cable.
2261 </dd>
2262
2263 <dt><code>null</code></dt>
2264 <dd>An ignored interface. Deprecated and slated for removal in
2265 February 2013.</dd>
2266 </dl>
2267 </column>
2268 </group>
2269
2270 <group title="Tunnel Options">
2271 <p>
2272 These options apply to interfaces with <ref column="type"/> of
2273 <code>geneve</code>, <code>gre</code>, <code>vxlan</code>,
2274 <code>lisp</code> and <code>stt</code>.
2275 </p>
2276
2277 <p>
2278 Each tunnel must be uniquely identified by the combination of <ref
2279 column="type"/>, <ref column="options" key="remote_ip"/>, <ref
2280 column="options" key="local_ip"/>, and <ref column="options"
2281 key="in_key"/>. If two ports are defined that are the same except one
2282 has an optional identifier and the other does not, the more specific
2283 one is matched first. <ref column="options" key="in_key"/> is
2284 considered more specific than <ref column="options" key="local_ip"/> if
2285 a port defines one and another port defines the other.
2286 </p>
2287
2288 <column name="options" key="remote_ip">
2289 <p>Required. The remote tunnel endpoint, one of:</p>
2290
2291 <ul>
2292 <li>
2293 An IPv4 or IPv6 address (not a DNS name), e.g. <code>192.168.0.123</code>.
2294 Only unicast endpoints are supported.
2295 </li>
2296 <li>
2297 The word <code>flow</code>. The tunnel accepts packets from any
2298 remote tunnel endpoint. To process only packets from a specific
2299 remote tunnel endpoint, the flow entries may match on the
2300 <code>tun_src</code> or <code>tun_ipv6_src</code>field. When
2301 sending packets to a <code>remote_ip=flow</code> tunnel, the flow
2302 actions must explicitly set the <code>tun_dst</code> or
2303 <code>tun_ipv6_dst</code> field to the IP address of the desired
2304 remote tunnel endpoint, e.g. with a <code>set_field</code> action.
2305 </li>
2306 </ul>
2307
2308 <p>
2309 The remote tunnel endpoint for any packet received from a tunnel
2310 is available in the <code>tun_src</code> field for matching in the
2311 flow table.
2312 </p>
2313 </column>
2314
2315 <column name="options" key="local_ip">
2316 <p>
2317 Optional. The tunnel destination IP that received packets must
2318 match. Default is to match all addresses. If specified, may be one
2319 of:
2320 </p>
2321
2322 <ul>
2323 <li>
2324 An IPv4/IPv6 address (not a DNS name), e.g. <code>192.168.12.3</code>.
2325 </li>
2326 <li>
2327 The word <code>flow</code>. The tunnel accepts packets sent to any
2328 of the local IP addresses of the system running OVS. To process
2329 only packets sent to a specific IP address, the flow entries may
2330 match on the <code>tun_dst</code> or <code>tun_ipv6_dst</code> field.
2331 When sending packets to a <code>local_ip=flow</code> tunnel, the flow
2332 actions may explicitly set the <code>tun_src</code> or <code>tun_ipv6_src</code>
2333 field to the desired IP address, e.g. with a <code>set_field</code> action.
2334 However, while routing the tunneled packet out, the local system may
2335 override the specified address with the local IP address configured for the
2336 outgoing system interface.
2337
2338 <p>
2339 This option is valid only for tunnels also configured with the
2340 <code>remote_ip=flow</code> option.
2341 </p>
2342 </li>
2343 </ul>
2344
2345 <p>
2346 The tunnel destination IP address for any packet received from a
2347 tunnel is available in the <code>tun_dst</code> or <code>tun_ipv6_dst</code>
2348 field for matching in the flow table.
2349 </p>
2350 </column>
2351
2352 <column name="options" key="in_key">
2353 <p>Optional. The key that received packets must contain, one of:</p>
2354
2355 <ul>
2356 <li>
2357 <code>0</code>. The tunnel receives packets with no key or with a
2358 key of 0. This is equivalent to specifying no <ref column="options"
2359 key="in_key"/> at all.
2360 </li>
2361 <li>
2362 A positive 24-bit (for Geneve, VXLAN, and LISP), 32-bit (for GRE)
2363 or 64-bit (for STT) number. The tunnel receives only
2364 packets with the specified key.
2365 </li>
2366 <li>
2367 The word <code>flow</code>. The tunnel accepts packets with any
2368 key. The key will be placed in the <code>tun_id</code> field for
2369 matching in the flow table. The <code>ovs-ofctl</code> manual page
2370 contains additional information about matching fields in OpenFlow
2371 flows.
2372 </li>
2373 </ul>
2374
2375 <p>
2376 </p>
2377 </column>
2378
2379 <column name="options" key="out_key">
2380 <p>Optional. The key to be set on outgoing packets, one of:</p>
2381
2382 <ul>
2383 <li>
2384 <code>0</code>. Packets sent through the tunnel will have no key.
2385 This is equivalent to specifying no <ref column="options"
2386 key="out_key"/> at all.
2387 </li>
2388 <li>
2389 A positive 24-bit (for Geneve, VXLAN and LISP), 32-bit (for GRE) or
2390 64-bit (for STT) number. Packets sent through the tunnel
2391 will have the specified key.
2392 </li>
2393 <li>
2394 The word <code>flow</code>. Packets sent through the tunnel will
2395 have the key set using the <code>set_tunnel</code> Nicira OpenFlow
2396 vendor extension (0 is used in the absence of an action). The
2397 <code>ovs-ofctl</code> manual page contains additional information
2398 about the Nicira OpenFlow vendor extensions.
2399 </li>
2400 </ul>
2401 </column>
2402
2403 <column name="options" key="dst_port">
2404 Optional. The tunnel transport layer destination port, for UDP and TCP
2405 based tunnel protocols (Geneve, VXLAN, LISP, and STT).
2406 </column>
2407
2408 <column name="options" key="key">
2409 Optional. Shorthand to set <code>in_key</code> and
2410 <code>out_key</code> at the same time.
2411 </column>
2412
2413 <column name="options" key="tos">
2414 Optional. The value of the ToS bits to be set on the encapsulating
2415 packet. ToS is interpreted as DSCP and ECN bits, ECN part must be
2416 zero. It may also be the word <code>inherit</code>, in which case
2417 the ToS will be copied from the inner packet if it is IPv4 or IPv6
2418 (otherwise it will be 0). The ECN fields are always inherited.
2419 Default is 0.
2420 </column>
2421
2422 <column name="options" key="ttl">
2423 Optional. The TTL to be set on the encapsulating packet. It may also
2424 be the word <code>inherit</code>, in which case the TTL will be copied
2425 from the inner packet if it is IPv4 or IPv6 (otherwise it will be the
2426 system default, typically 64). Default is the system default TTL.
2427 </column>
2428
2429 <column name="options" key="df_default"
2430 type='{"type": "boolean"}'>
2431 Optional. If enabled, the Don't Fragment bit will be set on tunnel
2432 outer headers to allow path MTU discovery. Default is enabled; set
2433 to <code>false</code> to disable.
2434 </column>
2435
2436 <column name="options" key="egress_pkt_mark">
2437 Optional. The pkt_mark to be set on the encapsulating packet. This
2438 option sets packet mark for the tunnel endpoint for all tunnel packets
2439 including tunnel monitoring.
2440 </column>
2441
2442 <group title="Tunnel Options: lisp only">
2443 <column name="options" key="packet_type"
2444 type='{"type": "string", "enum": ["set",
2445 ["legacy_l3", "ptap"]]}'>
2446 <p>
2447 A LISP tunnel sends and receives only IPv4 and IPv6 packets. This
2448 option controls what how the tunnel represents the packets that it
2449 sends and receives:
2450 </p>
2451
2452 <ul>
2453 <li>
2454 By default, or if this option is <code>legacy_l3</code>, the
2455 tunnel represents packets as Ethernet frames for compatibility
2456 with legacy OpenFlow controllers that expect this behavior.
2457 </li>
2458 <li>
2459 If this option is <code>ptap</code>, the tunnel represents
2460 packets using the <code>packet_type</code> mechanism introduced
2461 in OpenFlow 1.5.
2462 </li>
2463 </ul>
2464 </column>
2465 </group>
2466
2467 <group title="Tunnel Options: vxlan only">
2468
2469 <column name="options" key="exts">
2470 <p>Optional. Comma separated list of optional VXLAN extensions to
2471 enable. The following extensions are supported:</p>
2472
2473 <ul>
2474 <li>
2475 <code>gbp</code>: VXLAN-GBP allows to transport the group policy
2476 context of a packet across the VXLAN tunnel to other network
2477 peers. See the description of <code>tun_gbp_id</code> and
2478 <code>tun_gbp_flags</code> in <code>ovs-fields</code>(7) for
2479 additional information.
2480 (<code>https://tools.ietf.org/html/draft-smith-vxlan-group-policy</code>)
2481 </li>
2482 <li>
2483 <code>gpe</code>: Support for Generic Protocol Encapsulation in
2484 accordance with IETF draft
2485 <code>https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe</code>.
2486 Without this option, a VXLAN packet always encapsulates an
2487 Ethernet frame. With this option, an VXLAN packet may also
2488 encapsulate an IPv4, IPv6, NSH, or MPLS packet.
2489 </li>
2490 </ul>
2491 </column>
2492
2493 <column name="options" key="packet_type"
2494 type='{"type": "string", "enum": ["set",
2495 ["legacy_l2", "legacy_l3", "ptap"]]}'>
2496 <p>
2497 This option controls what types of packets the tunnel sends and
2498 receives and how it represents them:
2499 </p>
2500
2501 <ul>
2502 <li>
2503 By default, or if this option is <code>legacy_l2</code>, the
2504 tunnel sends and receives only Ethernet frames.
2505 </li>
2506 <li>
2507 If this option is <code>legacy_l3</code>, the tunnel sends and
2508 receives only non-Ethernet (L3) packet, but the packets are
2509 represented as Ethernet frames for compatibility with legacy
2510 OpenFlow controllers that expect this behavior. This requires
2511 enabling <code>gpe</code> in <ref column="options" key="exts"/>.
2512 </li>
2513 <li>
2514 If this option is <code>ptap</code>, Open vSwitch represents
2515 packets in the tunnel using the <code>packet_type</code>
2516 mechanism introduced in OpenFlow 1.5. This mechanism supports
2517 any kind of packet, but actually sending and receiving
2518 non-Ethernet packets requires additionally enabling
2519 <code>gpe</code> in <ref column="options" key="exts"/>.
2520 </li>
2521 </ul>
2522 </column>
2523 </group>
2524
2525 <group title="Tunnel Options: gre only">
2526 <p>
2527 <code>gre</code> interfaces support these options.
2528 </p>
2529
2530 <column name="options" key="packet_type"
2531 type='{"type": "string", "enum": ["set",
2532 ["legacy_l2", "legacy_l3", "ptap"]]}'>
2533 <p>
2534 This option controls what types of packets the tunnel sends and
2535 receives and how it represents them:
2536 </p>
2537
2538 <ul>
2539 <li>
2540 By default, or if this option is <code>legacy_l2</code>, the
2541 tunnel sends and receives only Ethernet frames.
2542 </li>
2543 <li>
2544 If this option is <code>legacy_l3</code>, the tunnel sends and
2545 receives only non-Ethernet (L3) packet, but the packets are
2546 represented as Ethernet frames for compatibility with legacy
2547 OpenFlow controllers that expect this behavior.
2548 </li>
2549 <li>
2550 If this option is <code>ptap</code>, the tunnel sends and
2551 receives any kind of packet. Open vSwitch represents packets in
2552 the tunnel using the <code>packet_type</code> mechanism
2553 introduced in OpenFlow 1.5.
2554 </li>
2555 </ul>
2556 </column>
2557 </group>
2558
2559 <group title="Tunnel Options: gre, geneve, and vxlan">
2560 <p>
2561 <code>gre</code>, <code>geneve</code>, and
2562 <code>vxlan</code> interfaces support these options.
2563 </p>
2564
2565 <column name="options" key="csum" type='{"type": "boolean"}'>
2566 <p>
2567 Optional. Compute encapsulation header (either GRE or UDP)
2568 checksums on outgoing packets. Default is disabled, set to
2569 <code>true</code> to enable. Checksums present on incoming
2570 packets will be validated regardless of this setting.
2571 </p>
2572
2573 <p>
2574 When using the upstream Linux kernel module, computation of
2575 checksums for <code>geneve</code> and <code>vxlan</code> requires
2576 Linux kernel version 4.0 or higher. <code>gre</code> supports
2577 checksums for all versions of Open vSwitch that support GRE.
2578 The out of tree kernel module distributed as part of OVS
2579 can compute all tunnel checksums on any kernel version that it
2580 is compatible with.
2581 </p>
2582
2583 </column>
2584 </group>
2585 </group>
2586
2587 <group title="Patch Options">
2588 <p>
2589 These options apply only to <dfn>patch ports</dfn>, that is, interfaces
2590 whose <ref column="type"/> column is <code>patch</code>. Patch ports
2591 are mainly a way to connect otherwise independent bridges to one
2592 another, similar to how one might plug an Ethernet cable (a ``patch
2593 cable'') into two physical switches to connect those switches. The
2594 effect of plugging a patch port into two switches is conceptually
2595 similar to that of plugging the two ends of a Linux <code>veth</code>
2596 device into those switches, but the implementation of patch ports makes
2597 them much more efficient.
2598 </p>
2599
2600 <p>
2601 Patch ports may connect two different bridges (the usual case) or the
2602 same bridge. In the latter case, take special care to avoid loops,
2603 e.g. by programming appropriate flows with OpenFlow. Patch ports do
2604 not work if its ends are attached to bridges on different datapaths,
2605 e.g. to connect bridges in <code>system</code> and <code>netdev</code>
2606 datapaths.
2607 </p>
2608
2609 <p>
2610 The following command creates and connects patch ports <code>p0</code>
2611 and <code>p1</code> and adds them to bridges <code>br0</code> and
2612 <code>br1</code>, respectively:
2613 </p>
2614
2615 <pre>
2616 ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
2617 -- add-port br1 p1 -- set Interface p1 type=patch options:peer=p0
2618 </pre>
2619
2620 <column name="options" key="peer">
2621 The <ref column="name"/> of the <ref table="Interface"/> for the other
2622 side of the patch. The named <ref table="Interface"/>'s own
2623 <code>peer</code> option must specify this <ref table="Interface"/>'s
2624 name. That is, the two patch interfaces must have reversed <ref
2625 column="name"/> and <code>peer</code> values.
2626 </column>
2627 </group>
2628
2629 <group title="PMD (Poll Mode Driver) Options">
2630 <p>
2631 Only PMD netdevs support these options.
2632 </p>
2633
2634 <column name="options" key="n_rxq"
2635 type='{"type": "integer", "minInteger": 1}'>
2636 <p>
2637 Specifies the maximum number of rx queues to be created for PMD
2638 netdev. If not specified or specified to 0, one rx queue will
2639 be created by default.
2640 Not supported by DPDK vHost interfaces.
2641 </p>
2642 </column>
2643
2644 <column name="options" key="dpdk-devargs"
2645 type='{"type": "string"}'>
2646 <p>
2647 Specifies the PCI address associated with the port for physical
2648 devices, or the virtual driver to be used for the port when a virtual
2649 PMD is intended to be used. For the latter, the argument string
2650 typically takes the form of
2651 <code>eth_<var>driver_name</var><var>x</var></code>, where
2652 <var>driver_name</var> is a valid virtual DPDK PMD driver name and
2653 <var>x</var> is a unique identifier of your choice for the given
2654 port. Only supported by the dpdk port type.
2655 </p>
2656 </column>
2657
2658 <column name="other_config" key="pmd-rxq-affinity">
2659 <p>Specifies mapping of RX queues of this interface to CPU cores.</p>
2660 <p>Value should be set in the following form:</p>
2661 <p>
2662 <code>other_config:pmd-rxq-affinity=&lt;rxq-affinity-list&gt;</code>
2663 </p>
2664 <p>where</p>
2665 <p>
2666 <ul>
2667 <li>
2668 &lt;rxq-affinity-list&gt; ::= NULL | &lt;non-empty-list&gt;
2669 </li>
2670 <li>
2671 &lt;non-empty-list&gt; ::= &lt;affinity-pair&gt; |
2672 &lt;affinity-pair&gt; , &lt;non-empty-list&gt;
2673 </li>
2674 <li>
2675 &lt;affinity-pair&gt; ::= &lt;queue-id&gt; : &lt;core-id&gt;
2676 </li>
2677 </ul>
2678 </p>
2679 </column>
2680
2681 <column name="options" key="vhost-server-path"
2682 type='{"type": "string"}'>
2683 <p>
2684 The value specifies the path to the socket associated with a vHost
2685 User client mode device that has been or will be created by QEMU.
2686 Only supported by dpdkvhostuserclient interfaces.
2687 </p>
2688 </column>
2689
2690 <column name="options" key="n_rxq_desc"
2691 type='{"type": "integer", "minInteger": 1, "maxInteger": 4096}'>
2692 <p>
2693 Specifies the rx queue size (number rx descriptors) for dpdk ports.
2694 The value must be a power of 2, less than 4096 and supported
2695 by the hardware of the device being configured.
2696 If not specified or an incorrect value is specified, 2048 rx
2697 descriptors will be used by default.
2698 </p>
2699 </column>
2700
2701 <column name="options" key="n_txq_desc"
2702 type='{"type": "integer", "minInteger": 1, "maxInteger": 4096}'>
2703 <p>
2704 Specifies the tx queue size (number tx descriptors) for dpdk ports.
2705 The value must be a power of 2, less than 4096 and supported
2706 by the hardware of the device being configured.
2707 If not specified or an incorrect value is specified, 2048 tx
2708 descriptors will be used by default.
2709 </p>
2710 </column>
2711 </group>
2712
2713 <group title="MTU">
2714 <p>
2715 The MTU (maximum transmission unit) is the largest amount of data
2716 that can fit into a single Ethernet frame. The standard Ethernet
2717 MTU is 1500 bytes. Some physical media and many kinds of virtual
2718 interfaces can be configured with higher MTUs.
2719 </p>
2720
2721 <p>
2722 A client may change an interface MTU by filling in
2723 <ref column="mtu_request"/>. Open vSwitch then reports in
2724 <ref column="mtu"/> the currently configured value.
2725 </p>
2726
2727 <column name="mtu">
2728 <p>
2729 The currently configured MTU for the interface.
2730 </p>
2731
2732 <p>
2733 This column will be empty for an interface that does not
2734 have an MTU as, for example, some kinds of tunnels do not.
2735 </p>
2736
2737 <p>
2738 Open vSwitch sets this column's value, so other clients should treat
2739 it as read-only.
2740 </p>
2741 </column>
2742
2743 <column name="mtu_request"
2744 type='{"type": "integer", "minInteger": 1}'>
2745 <p>
2746 Requested MTU (Maximum Transmission Unit) for the interface. A client
2747 can fill this column to change the MTU of an interface.
2748 </p>
2749
2750 <p>
2751 RFC 791 requires every internet module to be able to forward a
2752 datagram of 68 octets without further fragmentation. The maximum
2753 size of an IP packet is 65535 bytes.
2754 </p>
2755
2756 <p>
2757 If this is not set and if the interface has <code>internal</code>
2758 type, Open vSwitch will change the MTU to match the minimum of the
2759 other interfaces in the bridge.
2760 </p>
2761 </column>
2762
2763 </group>
2764
2765 <group title="Interface Status">
2766 <p>
2767 Status information about interfaces attached to bridges, updated every
2768 5 seconds. Not all interfaces have all of these properties; virtual
2769 interfaces don't have a link speed, for example. Non-applicable
2770 columns will have empty values.
2771 </p>
2772 <column name="admin_state">
2773 <p>
2774 The administrative state of the physical network link.
2775 </p>
2776 </column>
2777
2778 <column name="link_state">
2779 <p>
2780 The observed state of the physical network link. This is ordinarily
2781 the link's carrier status. If the interface's <ref table="Port"/> is
2782 a bond configured for miimon monitoring, it is instead the network
2783 link's miimon status.
2784 </p>
2785 </column>
2786
2787 <column name="link_resets">
2788 <p>
2789 The number of times Open vSwitch has observed the
2790 <ref column="link_state"/> of this <ref table="Interface"/> change.
2791 </p>
2792 </column>
2793
2794 <column name="link_speed">
2795 <p>
2796 The negotiated speed of the physical network link.
2797 Valid values are positive integers greater than 0.
2798 </p>
2799 </column>
2800
2801 <column name="duplex">
2802 <p>
2803 The duplex mode of the physical network link.
2804 </p>
2805 </column>
2806
2807 <column name="lacp_current">
2808 Boolean value indicating LACP status for this interface. If true, this
2809 interface has current LACP information about its LACP partner. This
2810 information may be used to monitor the health of interfaces in a LACP
2811 enabled port. This column will be empty if LACP is not enabled.
2812 </column>
2813
2814 <column name="status">
2815 Key-value pairs that report port status. Supported status values are
2816 <ref column="type"/>-dependent; some interfaces may not have a valid
2817 <ref column="status" key="driver_name"/>, for example.
2818 </column>
2819
2820 <column name="status" key="driver_name">
2821 The name of the device driver controlling the network adapter.
2822 </column>
2823
2824 <column name="status" key="driver_version">
2825 The version string of the device driver controlling the network
2826 adapter.
2827 </column>
2828
2829 <column name="status" key="firmware_version">
2830 The version string of the network adapter's firmware, if available.
2831 </column>
2832
2833 <column name="status" key="source_ip">
2834 The source IP address used for an IPv4/IPv6 tunnel end-point, such as
2835 <code>gre</code>.
2836 </column>
2837
2838 <column name="status" key="tunnel_egress_iface">
2839 Egress interface for tunnels. Currently only relevant for tunnels
2840 on Linux systems, this column will show the name of the interface
2841 which is responsible for routing traffic destined for the configured
2842 <ref column="options" key="remote_ip"/>. This could be an internal
2843 interface such as a bridge port.
2844 </column>
2845
2846 <column name="status" key="tunnel_egress_iface_carrier"
2847 type='{"type": "string", "enum": ["set", ["down", "up"]]}'>
2848 Whether carrier is detected on <ref column="status"
2849 key="tunnel_egress_iface"/>.
2850 </column>
2851
2852 <group title="dpdk">
2853 <p>
2854 DPDK specific interface status options.
2855 </p>
2856
2857 <column name="status" key="port_no">
2858 DPDK port ID.
2859 </column>
2860
2861 <column name="status" key="numa_id">
2862 NUMA socket ID to which an Ethernet device is connected.
2863 </column>
2864
2865 <column name="status" key="min_rx_bufsize">
2866 Minimum size of RX buffer.
2867 </column>
2868
2869 <column name="status" key="max_rx_pktlen">
2870 Maximum configurable length of RX pkt.
2871 </column>
2872
2873 <column name="status" key="max_rx_queues">
2874 Maximum number of RX queues.
2875 </column>
2876
2877 <column name="status" key="max_tx_queues">
2878 Maximum number of TX queues.
2879 </column>
2880
2881 <column name="status" key="max_mac_addrs">
2882 Maximum number of MAC addresses.
2883 </column>
2884
2885 <column name="status" key="max_hash_mac_addrs">
2886 Maximum number of hash MAC addresses for MTA and UTA.
2887 </column>
2888
2889 <column name="status" key="max_vfs">
2890 Maximum number of hash MAC addresses for MTA and UTA.
2891 Maximum number of VFs.
2892 </column>
2893
2894 <column name="status" key="max_vmdq_pools">
2895 Maximum number of VMDq pools.
2896 </column>
2897
2898 <column name="status" key="if_type">
2899 Interface type ID according to IANA ifTYPE MIB definitions.
2900 </column>
2901
2902 <column name="status" key="if_descr">
2903 Interface description string.
2904 </column>
2905
2906 <column name="status" key="pci-vendor_id">
2907 Vendor ID of PCI device.
2908 </column>
2909
2910 <column name="status" key="pci-device_id">
2911 Device ID of PCI device.
2912 </column>
2913
2914 </group>
2915 </group>
2916
2917 <group title="Statistics">
2918 <p>
2919 Key-value pairs that report interface statistics. The current
2920 implementation updates these counters periodically. The update period
2921 is controlled by <ref column="other_config"
2922 key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
2923 Future implementations may update them when an interface is created,
2924 when they are queried (e.g. using an OVSDB <code>select</code>
2925 operation), and just before an interface is deleted due to virtual
2926 interface hot-unplug or VM shutdown, and perhaps at other times, but
2927 not on any regular periodic basis.
2928 </p>
2929 <p>
2930 These are the same statistics reported by OpenFlow in its <code>struct
2931 ofp_port_stats</code> structure. If an interface does not support a
2932 given statistic, then that pair is omitted.
2933 </p>
2934 <group title="Statistics: Successful transmit and receive counters">
2935 <column name="statistics" key="rx_packets">
2936 Number of received packets.
2937 </column>
2938 <column name="statistics" key="rx_bytes">
2939 Number of received bytes.
2940 </column>
2941 <column name="statistics" key="tx_packets">
2942 Number of transmitted packets.
2943 </column>
2944 <column name="statistics" key="tx_bytes">
2945 Number of transmitted bytes.
2946 </column>
2947 </group>
2948 <group title="Statistics: Receive errors">
2949 <column name="statistics" key="rx_dropped">
2950 Number of packets dropped by RX.
2951 </column>
2952 <column name="statistics" key="rx_frame_err">
2953 Number of frame alignment errors.
2954 </column>
2955 <column name="statistics" key="rx_over_err">
2956 Number of packets with RX overrun.
2957 </column>
2958 <column name="statistics" key="rx_crc_err">
2959 Number of CRC errors.
2960 </column>
2961 <column name="statistics" key="rx_errors">
2962 Total number of receive errors, greater than or equal to the sum of
2963 the above.
2964 </column>
2965 </group>
2966 <group title="Statistics: Transmit errors">
2967 <column name="statistics" key="tx_dropped">
2968 Number of packets dropped by TX.
2969 </column>
2970 <column name="statistics" key="collisions">
2971 Number of collisions.
2972 </column>
2973 <column name="statistics" key="tx_errors">
2974 Total number of transmit errors, greater than or equal to the sum of
2975 the above.
2976 </column>
2977 </group>
2978 </group>
2979
2980 <group title="Ingress Policing">
2981 <p>
2982 These settings control ingress policing for packets received on this
2983 interface. On a physical interface, this limits the rate at which
2984 traffic is allowed into the system from the outside; on a virtual
2985 interface (one connected to a virtual machine), this limits the rate at
2986 which the VM is able to transmit.
2987 </p>
2988 <p>
2989 Policing is a simple form of quality-of-service that simply drops
2990 packets received in excess of the configured rate. Due to its
2991 simplicity, policing is usually less accurate and less effective than
2992 egress QoS (which is configured using the <ref table="QoS"/> and <ref
2993 table="Queue"/> tables).
2994 </p>
2995 <p>
2996 Policing is currently implemented on Linux and OVS with DPDK. Both
2997 implementations use a simple ``token bucket'' approach:
2998 </p>
2999 <ul>
3000 <li>
3001 The size of the bucket corresponds to <ref
3002 column="ingress_policing_burst"/>. Initially the bucket is full.
3003 </li>
3004 <li>
3005 Whenever a packet is received, its size (converted to tokens) is
3006 compared to the number of tokens currently in the bucket. If the
3007 required number of tokens are available, they are removed and the
3008 packet is forwarded. Otherwise, the packet is dropped.
3009 </li>
3010 <li>
3011 Whenever it is not full, the bucket is refilled with tokens at the
3012 rate specified by <ref column="ingress_policing_rate"/>.
3013 </li>
3014 </ul>
3015 <p>
3016 Policing interacts badly with some network protocols, and especially
3017 with fragmented IP packets. Suppose that there is enough network
3018 activity to keep the bucket nearly empty all the time. Then this token
3019 bucket algorithm will forward a single packet every so often, with the
3020 period depending on packet size and on the configured rate. All of the
3021 fragments of an IP packets are normally transmitted back-to-back, as a
3022 group. In such a situation, therefore, only one of these fragments
3023 will be forwarded and the rest will be dropped. IP does not provide
3024 any way for the intended recipient to ask for only the remaining
3025 fragments. In such a case there are two likely possibilities for what
3026 will happen next: either all of the fragments will eventually be
3027 retransmitted (as TCP will do), in which case the same problem will
3028 recur, or the sender will not realize that its packet has been dropped
3029 and data will simply be lost (as some UDP-based protocols will do).
3030 Either way, it is possible that no forward progress will ever occur.
3031 </p>
3032 <column name="ingress_policing_rate">
3033 <p>
3034 Maximum rate for data received on this interface, in kbps. Data
3035 received faster than this rate is dropped. Set to <code>0</code>
3036 (the default) to disable policing.
3037 </p>
3038 </column>
3039
3040 <column name="ingress_policing_burst">
3041 <p>Maximum burst size for data received on this interface, in kb. The
3042 default burst size if set to <code>0</code> is 8000 kbit. This value
3043 has no effect if <ref column="ingress_policing_rate"/>
3044 is <code>0</code>.</p>
3045 <p>
3046 Specifying a larger burst size lets the algorithm be more forgiving,
3047 which is important for protocols like TCP that react severely to
3048 dropped packets. The burst size should be at least the size of the
3049 interface's MTU. Specifying a value that is numerically at least as
3050 large as 80% of <ref column="ingress_policing_rate"/> helps TCP come
3051 closer to achieving the full rate.
3052 </p>
3053 </column>
3054 </group>
3055
3056 <group title="Bidirectional Forwarding Detection (BFD)">
3057 <p>
3058 BFD, defined in RFC 5880 and RFC 5881, allows point-to-point
3059 detection of connectivity failures by occasional transmission of
3060 BFD control messages. Open vSwitch implements BFD to serve
3061 as a more popular and standards compliant alternative to CFM.
3062 </p>
3063
3064 <p>
3065 BFD operates by regularly transmitting BFD control messages at a rate
3066 negotiated independently in each direction. Each endpoint specifies
3067 the rate at which it expects to receive control messages, and the rate
3068 at which it is willing to transmit them. By default, Open vSwitch uses
3069 a detection multiplier of three, meaning that an endpoint signals a
3070 connectivity fault if three consecutive BFD control messages fail to
3071 arrive. In the case of a unidirectional connectivity issue, the system
3072 not receiving BFD control messages signals the problem to its peer in
3073 the messages it transmits.
3074 </p>
3075
3076 <p>
3077 The Open vSwitch implementation of BFD aims to comply faithfully
3078 with RFC 5880 requirements. Open vSwitch does not implement the
3079 optional Authentication or ``Echo Mode'' features.
3080 </p>
3081
3082 <group title="BFD Configuration">
3083 <p>
3084 A controller sets up key-value pairs in the <ref column="bfd"/>
3085 column to enable and configure BFD.
3086 </p>
3087
3088 <column name="bfd" key="enable" type='{"type": "boolean"}'>
3089 True to enable BFD on this <ref table="Interface"/>. If not
3090 specified, BFD will not be enabled by default.
3091 </column>
3092
3093 <column name="bfd" key="min_rx"
3094 type='{"type": "integer", "minInteger": 1}'>
3095 The shortest interval, in milliseconds, at which this BFD session
3096 offers to receive BFD control messages. The remote endpoint may
3097 choose to send messages at a slower rate. Defaults to
3098 <code>1000</code>.
3099 </column>
3100
3101 <column name="bfd" key="min_tx"
3102 type='{"type": "integer", "minInteger": 1}'>
3103 The shortest interval, in milliseconds, at which this BFD session is
3104 willing to transmit BFD control messages. Messages will actually be
3105 transmitted at a slower rate if the remote endpoint is not willing to
3106 receive as quickly as specified. Defaults to <code>100</code>.
3107 </column>
3108
3109 <column name="bfd" key="decay_min_rx" type='{"type": "integer"}'>
3110 An alternate receive interval, in milliseconds, that must be greater
3111 than or equal to <ref column="bfd" key="min_rx"/>. The
3112 implementation switches from <ref column="bfd" key="min_rx"/> to <ref
3113 column="bfd" key="decay_min_rx"/> when there is no obvious incoming
3114 data traffic at the interface, to reduce the CPU and bandwidth cost
3115 of monitoring an idle interface. This feature may be disabled by
3116 setting a value of 0. This feature is reset whenever <ref
3117 column="bfd" key="decay_min_rx"/> or <ref column="bfd" key="min_rx"/>
3118 changes.
3119 </column>
3120
3121 <column name="bfd" key="forwarding_if_rx" type='{"type": "boolean"}'>
3122 When <code>true</code>, traffic received on the
3123 <ref table="Interface"/> is used to indicate the capability of packet
3124 I/O. BFD control packets are still transmitted and received. At
3125 least one BFD control packet must be received every 100 * <ref
3126 column="bfd" key="min_rx"/> amount of time. Otherwise, even if
3127 traffic are received, the <ref column="bfd" key="forwarding"/>
3128 will be <code>false</code>.
3129 </column>
3130
3131 <column name="bfd" key="cpath_down" type='{"type": "boolean"}'>
3132 Set to true to notify the remote endpoint that traffic should not be
3133 forwarded to this system for some reason other than a connectivty
3134 failure on the interface being monitored. The typical underlying
3135 reason is ``concatenated path down,'' that is, that connectivity
3136 beyond the local system is down. Defaults to false.
3137 </column>
3138
3139 <column name="bfd" key="check_tnl_key" type='{"type": "boolean"}'>
3140 Set to true to make BFD accept only control messages with a tunnel
3141 key of zero. By default, BFD accepts control messages with any
3142 tunnel key.
3143 </column>
3144
3145 <column name="bfd" key="bfd_local_src_mac">
3146 Set to an Ethernet address in the form
3147 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
3148 to set the MAC used as source for transmitted BFD packets. The
3149 default is the mac address of the BFD enabled interface.
3150 </column>
3151
3152 <column name="bfd" key="bfd_local_dst_mac">
3153 Set to an Ethernet address in the form
3154 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
3155 to set the MAC used as destination for transmitted BFD packets. The
3156 default is <code>00:23:20:00:00:01</code>.
3157 </column>
3158
3159 <column name="bfd" key="bfd_remote_dst_mac">
3160 Set to an Ethernet address in the form
3161 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
3162 to set the MAC used for checking the destination of received BFD packets.
3163 Packets with different destination MAC will not be considered as BFD packets.
3164 If not specified the destination MAC address of received BFD packets
3165 are not checked.
3166 </column>
3167
3168 <column name="bfd" key="bfd_src_ip">
3169 Set to an IPv4 address to set the IP address used as source for
3170 transmitted BFD packets. The default is <code>169.254.1.1</code>.
3171 </column>
3172
3173 <column name="bfd" key="bfd_dst_ip">
3174 Set to an IPv4 address to set the IP address used as destination
3175 for transmitted BFD packets. The default is <code>169.254.1.0</code>.
3176 </column>
3177
3178 <column name="bfd" key="oam">
3179 Some tunnel protocols (such as Geneve) include a bit in the header
3180 to indicate that the encapsulated packet is an OAM frame. By setting
3181 this to true, BFD packets will be marked as OAM if encapsulated in
3182 one of these tunnels.
3183 </column>
3184
3185 <column name="bfd" key="mult"
3186 type='{"type": "integer", "minInteger": 1, "maxInteger": 255}'>
3187 The BFD detection multiplier, which defaults to 3. An endpoint
3188 signals a connectivity fault if the given number of consecutive BFD
3189 control messages fail to arrive.
3190 </column>
3191 </group>
3192
3193 <group title="BFD Status">
3194 <p>
3195 The switch sets key-value pairs in the <ref column="bfd_status"/>
3196 column to report the status of BFD on this interface. When BFD is
3197 not enabled, with <ref column="bfd" key="enable"/>, the switch clears
3198 all key-value pairs from <ref column="bfd_status"/>.
3199 </p>
3200
3201 <column name="bfd_status" key="state"
3202 type='{"type": "string",
3203 "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
3204 Reports the state of the BFD session. The BFD session is fully
3205 healthy and negotiated if <code>UP</code>.
3206 </column>
3207
3208 <column name="bfd_status" key="forwarding" type='{"type": "boolean"}'>
3209 Reports whether the BFD session believes this <ref
3210 table="Interface"/> may be used to forward traffic. Typically this
3211 means the local session is signaling <code>UP</code>, and the remote
3212 system isn't signaling a problem such as concatenated path down.
3213 </column>
3214
3215 <column name="bfd_status" key="diagnostic">
3216 A diagnostic code specifying the local system's reason for the
3217 last change in session state. The error messages are defined in
3218 section 4.1 of [RFC 5880].
3219 </column>
3220
3221 <column name="bfd_status" key="remote_state"
3222 type='{"type": "string",
3223 "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
3224 Reports the state of the remote endpoint's BFD session.
3225 </column>
3226
3227 <column name="bfd_status" key="remote_diagnostic">
3228 A diagnostic code specifying the remote system's reason for the
3229 last change in session state. The error messages are defined in
3230 section 4.1 of [RFC 5880].
3231 </column>
3232
3233 <column name="bfd_status" key="flap_count"
3234 type='{"type": "integer", "minInteger": 0}'>
3235 Counts the number of <ref column="bfd_status" key="forwarding" />
3236 flaps since start. A flap is considered as a change of the
3237 <ref column="bfd_status" key="forwarding" /> value.
3238 </column>
3239 </group>
3240 </group>
3241
3242 <group title="Connectivity Fault Management">
3243 <p>
3244 802.1ag Connectivity Fault Management (CFM) allows a group of
3245 Maintenance Points (MPs) called a Maintenance Association (MA) to
3246 detect connectivity problems with each other. MPs within a MA should
3247 have complete and exclusive interconnectivity. This is verified by
3248 occasionally broadcasting Continuity Check Messages (CCMs) at a
3249 configurable transmission interval.
3250 </p>
3251
3252 <p>
3253 According to the 802.1ag specification, each Maintenance Point should
3254 be configured out-of-band with a list of Remote Maintenance Points it
3255 should have connectivity to. Open vSwitch differs from the
3256 specification in this area. It simply assumes the link is faulted if
3257 no Remote Maintenance Points are reachable, and considers it not
3258 faulted otherwise.
3259 </p>
3260
3261 <p>
3262 When operating over tunnels which have no <code>in_key</code>, or an
3263 <code>in_key</code> of <code>flow</code>. CFM will only accept CCMs
3264 with a tunnel key of zero.
3265 </p>
3266
3267 <column name="cfm_mpid">
3268 <p>
3269 A Maintenance Point ID (MPID) uniquely identifies each endpoint
3270 within a Maintenance Association. The MPID is used to identify this
3271 endpoint to other Maintenance Points in the MA. Each end of a link
3272 being monitored should have a different MPID. Must be configured to
3273 enable CFM on this <ref table="Interface"/>.
3274 </p>
3275 <p>
3276 According to the 802.1ag specification, MPIDs can only range between
3277 [1, 8191]. However, extended mode (see <ref column="other_config"
3278 key="cfm_extended"/>) supports eight byte MPIDs.
3279 </p>
3280 </column>
3281
3282 <column name="cfm_flap_count">
3283 Counts the number of cfm fault flapps since boot. A flap is
3284 considered to be a change of the <ref column="cfm_fault"/> value.
3285 </column>
3286
3287 <column name="cfm_fault">
3288 <p>
3289 Indicates a connectivity fault triggered by an inability to receive
3290 heartbeats from any remote endpoint. When a fault is triggered on
3291 <ref table="Interface"/>s participating in bonds, they will be
3292 disabled.
3293 </p>
3294 <p>
3295 Faults can be triggered for several reasons. Most importantly they
3296 are triggered when no CCMs are received for a period of 3.5 times the
3297 transmission interval. Faults are also triggered when any CCMs
3298 indicate that a Remote Maintenance Point is not receiving CCMs but
3299 able to send them. Finally, a fault is triggered if a CCM is
3300 received which indicates unexpected configuration. Notably, this
3301 case arises when a CCM is received which advertises the local MPID.
3302 </p>
3303 </column>
3304
3305 <column name="cfm_fault_status" key="recv">
3306 Indicates a CFM fault was triggered due to a lack of CCMs received on
3307 the <ref table="Interface"/>.
3308 </column>
3309
3310 <column name="cfm_fault_status" key="rdi">
3311 Indicates a CFM fault was triggered due to the reception of a CCM with
3312 the RDI bit flagged. Endpoints set the RDI bit in their CCMs when they
3313 are not receiving CCMs themselves. This typically indicates a
3314 unidirectional connectivity failure.
3315 </column>
3316
3317 <column name="cfm_fault_status" key="maid">
3318 Indicates a CFM fault was triggered due to the reception of a CCM with
3319 a MAID other than the one Open vSwitch uses. CFM broadcasts are tagged
3320 with an identification number in addition to the MPID called the MAID.
3321 Open vSwitch only supports receiving CCM broadcasts tagged with the
3322 MAID it uses internally.
3323 </column>
3324
3325 <column name="cfm_fault_status" key="loopback">
3326 Indicates a CFM fault was triggered due to the reception of a CCM
3327 advertising the same MPID configured in the <ref column="cfm_mpid"/>
3328 column of this <ref table="Interface"/>. This may indicate a loop in
3329 the network.
3330 </column>
3331
3332 <column name="cfm_fault_status" key="overflow">
3333 Indicates a CFM fault was triggered because the CFM module received
3334 CCMs from more remote endpoints than it can keep track of.
3335 </column>
3336
3337 <column name="cfm_fault_status" key="override">
3338 Indicates a CFM fault was manually triggered by an administrator using
3339 an <code>ovs-appctl</code> command.
3340 </column>
3341
3342 <column name="cfm_fault_status" key="interval">
3343 Indicates a CFM fault was triggered due to the reception of a CCM
3344 frame having an invalid interval.
3345 </column>
3346
3347 <column name="cfm_remote_opstate">
3348 <p>When in extended mode, indicates the operational state of the
3349 remote endpoint as either <code>up</code> or <code>down</code>. See
3350 <ref column="other_config" key="cfm_opstate"/>.
3351 </p>
3352 </column>
3353
3354 <column name="cfm_health">
3355 <p>
3356 Indicates the health of the interface as a percentage of CCM frames
3357 received over 21 <ref column="other_config" key="cfm_interval"/>s.
3358 The health of an interface is undefined if it is communicating with
3359 more than one <ref column="cfm_remote_mpids"/>. It reduces if
3360 healthy heartbeats are not received at the expected rate, and
3361 gradually improves as healthy heartbeats are received at the desired
3362 rate. Every 21 <ref column="other_config" key="cfm_interval"/>s, the
3363 health of the interface is refreshed.
3364 </p>
3365 <p>
3366 As mentioned above, the faults can be triggered for several reasons.
3367 The link health will deteriorate even if heartbeats are received but
3368 they are reported to be unhealthy. An unhealthy heartbeat in this
3369 context is a heartbeat for which either some fault is set or is out
3370 of sequence. The interface health can be 100 only on receiving
3371 healthy heartbeats at the desired rate.
3372 </p>
3373 </column>
3374
3375 <column name="cfm_remote_mpids">
3376 When CFM is properly configured, Open vSwitch will occasionally
3377 receive CCM broadcasts. These broadcasts contain the MPID of the
3378 sending Maintenance Point. The list of MPIDs from which this
3379 <ref table="Interface"/> is receiving broadcasts from is regularly
3380 collected and written to this column.
3381 </column>
3382
3383 <column name="other_config" key="cfm_interval"
3384 type='{"type": "integer"}'>
3385 <p>
3386 The interval, in milliseconds, between transmissions of CFM
3387 heartbeats. Three missed heartbeat receptions indicate a
3388 connectivity fault.
3389 </p>
3390
3391 <p>
3392 In standard operation only intervals of 3, 10, 100, 1,000, 10,000,
3393 60,000, or 600,000 ms are supported. Other values will be rounded
3394 down to the nearest value on the list. Extended mode (see <ref
3395 column="other_config" key="cfm_extended"/>) supports any interval up
3396 to 65,535 ms. In either mode, the default is 1000 ms.
3397 </p>
3398
3399 <p>We do not recommend using intervals less than 100 ms.</p>
3400 </column>
3401
3402 <column name="other_config" key="cfm_extended"
3403 type='{"type": "boolean"}'>
3404 When <code>true</code>, the CFM module operates in extended mode. This
3405 causes it to use a nonstandard destination address to avoid conflicting
3406 with compliant implementations which may be running concurrently on the
3407 network. Furthermore, extended mode increases the accuracy of the
3408 <code>cfm_interval</code> configuration parameter by breaking wire
3409 compatibility with 802.1ag compliant implementations. And extended
3410 mode allows eight byte MPIDs. Defaults to <code>false</code>.
3411 </column>
3412
3413 <column name="other_config" key="cfm_demand" type='{"type": "boolean"}'>
3414 <p>
3415 When <code>true</code>, and
3416 <ref column="other_config" key="cfm_extended"/> is true, the CFM
3417 module operates in demand mode. When in demand mode, traffic
3418 received on the <ref table="Interface"/> is used to indicate
3419 liveness. CCMs are still transmitted and received. At least one
3420 CCM must be received every 100 * <ref column="other_config"
3421 key="cfm_interval"/> amount of time. Otherwise, even if traffic
3422 are received, the CFM module will raise the connectivity fault.
3423 </p>
3424
3425 <p>
3426 Demand mode has a couple of caveats:
3427 <ul>
3428 <li>
3429 To ensure that ovs-vswitchd has enough time to pull statistics
3430 from the datapath, the fault detection interval is set to
3431 3.5 * MAX(<ref column="other_config" key="cfm_interval"/>, 500)
3432 ms.
3433 </li>
3434
3435 <li>
3436 To avoid ambiguity, demand mode disables itself when there are
3437 multiple remote maintenance points.
3438 </li>
3439
3440 <li>
3441 If the <ref table="Interface"/> is heavily congested, CCMs
3442 containing the <ref column="other_config" key="cfm_opstate"/>
3443 status may be dropped causing changes in the operational state to
3444 be delayed. Similarly, if CCMs containing the RDI bit are not
3445 received, unidirectional link failures may not be detected.
3446 </li>
3447 </ul>
3448 </p>
3449 </column>
3450
3451 <column name="other_config" key="cfm_opstate"
3452 type='{"type": "string", "enum": ["set", ["down", "up"]]}'>
3453 When <code>down</code>, the CFM module marks all CCMs it generates as
3454 operationally down without triggering a fault. This allows remote
3455 maintenance points to choose not to forward traffic to the
3456 <ref table="Interface"/> on which this CFM module is running.
3457 Currently, in Open vSwitch, the opdown bit of CCMs affects
3458 <ref table="Interface"/>s participating in bonds, and the bundle
3459 OpenFlow action. This setting is ignored when CFM is not in extended
3460 mode. Defaults to <code>up</code>.
3461 </column>
3462
3463 <column name="other_config" key="cfm_ccm_vlan"
3464 type='{"type": "integer", "minInteger": 1, "maxInteger": 4095}'>
3465 When set, the CFM module will apply a VLAN tag to all CCMs it generates
3466 with the given value. May be the string <code>random</code> in which
3467 case each CCM will be tagged with a different randomly generated VLAN.
3468 </column>
3469
3470 <column name="other_config" key="cfm_ccm_pcp"
3471 type='{"type": "integer", "minInteger": 1, "maxInteger": 7}'>
3472 When set, the CFM module will apply a VLAN tag to all CCMs it generates
3473 with the given PCP value, the VLAN ID of the tag is governed by the
3474 value of <ref column="other_config" key="cfm_ccm_vlan"/>. If
3475 <ref column="other_config" key="cfm_ccm_vlan"/> is unset, a VLAN ID of
3476 zero is used.
3477 </column>
3478
3479 </group>
3480
3481 <group title="Bonding Configuration">
3482 <column name="other_config" key="lacp-port-id"
3483 type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
3484 The LACP port ID of this <ref table="Interface"/>. Port IDs are
3485 used in LACP negotiations to identify individual ports
3486 participating in a bond.
3487 </column>
3488
3489 <column name="other_config" key="lacp-port-priority"
3490 type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
3491 The LACP port priority of this <ref table="Interface"/>. In LACP
3492 negotiations <ref table="Interface"/>s with numerically lower
3493 priorities are preferred for aggregation.
3494 </column>
3495
3496 <column name="other_config" key="lacp-aggregation-key"
3497 type='{"type": "integer", "minInteger": 1, "maxInteger": 65535}'>
3498 The LACP aggregation key of this <ref table="Interface"/>. <ref
3499 table="Interface"/>s with different aggregation keys may not be active
3500 within a given <ref table="Port"/> at the same time.
3501 </column>
3502 </group>
3503
3504 <group title="Virtual Machine Identifiers">
3505 <p>
3506 These key-value pairs specifically apply to an interface that
3507 represents a virtual Ethernet interface connected to a virtual
3508 machine. These key-value pairs should not be present for other types
3509 of interfaces. Keys whose names end in <code>-uuid</code> have
3510 values that uniquely identify the entity in question. For a Citrix
3511 XenServer hypervisor, these values are UUIDs in RFC 4122 format.
3512 Other hypervisors may use other formats.
3513 </p>
3514
3515 <column name="external_ids" key="attached-mac">
3516 The MAC address programmed into the ``virtual hardware'' for this
3517 interface, in the form
3518 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
3519 For Citrix XenServer, this is the value of the <code>MAC</code> field
3520 in the VIF record for this interface.
3521 </column>
3522
3523 <column name="external_ids" key="iface-id">
3524 A system-unique identifier for the interface. On XenServer, this will
3525 commonly be the same as <ref column="external_ids" key="xs-vif-uuid"/>.
3526 </column>
3527
3528 <column name="external_ids" key="iface-status"
3529 type='{"type": "string",
3530 "enum": ["set", ["active", "inactive"]]}'>
3531 <p>
3532 Hypervisors may sometimes have more than one interface associated
3533 with a given <ref column="external_ids" key="iface-id"/>, only one of
3534 which is actually in use at a given time. For example, in some
3535 circumstances XenServer has both a ``tap'' and a ``vif'' interface
3536 for a single <ref column="external_ids" key="iface-id"/>, but only
3537 uses one of them at a time. A hypervisor that behaves this way must
3538 mark the currently in use interface <code>active</code> and the
3539 others <code>inactive</code>. A hypervisor that never has more than
3540 one interface for a given <ref column="external_ids" key="iface-id"/>
3541 may mark that interface <code>active</code> or omit <ref
3542 column="external_ids" key="iface-status"/> entirely.
3543 </p>
3544
3545 <p>
3546 During VM migration, a given <ref column="external_ids"
3547 key="iface-id"/> might transiently be marked <code>active</code> on
3548 two different hypervisors. That is, <code>active</code> means that
3549 this <ref column="external_ids" key="iface-id"/> is the active
3550 instance within a single hypervisor, not in a broader scope.
3551 There is one exception: some hypervisors support ``migration'' from a
3552 given hypervisor to itself (most often for test purposes). During
3553 such a ``migration,'' two instances of a single <ref
3554 column="external_ids" key="iface-id"/> might both be briefly marked
3555 <code>active</code> on a single hypervisor.
3556 </p>
3557 </column>
3558
3559 <column name="external_ids" key="xs-vif-uuid">
3560 The virtual interface associated with this interface.
3561 </column>
3562
3563 <column name="external_ids" key="xs-network-uuid">
3564 The virtual network to which this interface is attached.
3565 </column>
3566
3567 <column name="external_ids" key="vm-id">
3568 The VM to which this interface belongs. On XenServer, this will be the
3569 same as <ref column="external_ids" key="xs-vm-uuid"/>.
3570 </column>
3571
3572 <column name="external_ids" key="xs-vm-uuid">
3573 The VM to which this interface belongs.
3574 </column>
3575 </group>
3576
3577 <group title="Auto Attach Configuration">
3578 <p>
3579 Auto Attach configuration for a particular interface.
3580 </p>
3581
3582 <column name="lldp" key="enable" type='{"type": "boolean"}'>
3583 True to enable LLDP on this <ref table="Interface"/>. If not
3584 specified, LLDP will be disabled by default.
3585 </column>
3586 </group>
3587
3588 <group title="Flow control Configuration">
3589 <p>
3590 Ethernet flow control defined in IEEE 802.1Qbb provides link level flow
3591 control using MAC pause frames. Implemented only for interfaces with
3592 type <code>dpdk</code>.
3593 </p>
3594
3595 <column name="options" key="rx-flow-ctrl" type='{"type": "boolean"}'>
3596 Set to <code>true</code> to enable Rx flow control on physical ports.
3597 By default, Rx flow control is disabled.
3598 </column>
3599
3600 <column name="options" key="tx-flow-ctrl" type='{"type": "boolean"}'>
3601 Set to <code>true</code> to enable Tx flow control on physical ports.
3602 By default, Tx flow control is disabled.
3603 </column>
3604
3605 <column name="options" key="flow-ctrl-autoneg"
3606 type='{"type": "boolean"}'>
3607 Set to <code>true</code> to enable flow control auto negotiation on
3608 physical ports. By default, auto-neg is disabled.
3609 </column>
3610 </group>
3611
3612 <group title="Common Columns">
3613 The overall purpose of these columns is described under <code>Common
3614 Columns</code> at the beginning of this document.
3615
3616 <column name="other_config"/>
3617 <column name="external_ids"/>
3618 </group>
3619 </table>
3620
3621 <table name="Flow_Table" title="OpenFlow table configuration">
3622 <p>Configuration for a particular OpenFlow table.</p>
3623
3624 <column name="name">
3625 The table's name. Set this column to change the name that controllers
3626 will receive when they request table statistics, e.g. <code>ovs-ofctl
3627 dump-tables</code>. The name does not affect switch behavior.
3628 </column>
3629
3630 <group title="Eviction Policy">
3631 <p>
3632 Open vSwitch supports limiting the number of flows that may be
3633 installed in a flow table, via the <ref column="flow_limit"/> column.
3634 When adding a flow would exceed this limit, by default Open vSwitch
3635 reports an error, but there are two ways to configure Open vSwitch to
3636 instead delete (``evict'') a flow to make room for the new one:
3637 </p>
3638
3639 <ul>
3640 <li>
3641 Set the <ref column="overflow_policy"/> column to <code>evict</code>.
3642 </li>
3643
3644 <li>
3645 Send an OpenFlow 1.4+ ``table mod request'' to enable eviction for
3646 the flow table (e.g. <code>ovs-ofctl -O OpenFlow14 mod-table br0 0
3647 evict</code> to enable eviction on flow table 0 of bridge
3648 <code>br0</code>).
3649 </li>
3650 </ul>
3651
3652 <p>
3653 When a flow must be evicted due to overflow, the flow to evict is
3654 chosen through an approximation of the following algorithm. This
3655 algorithm is used regardless of how eviction was enabled:
3656 </p>
3657
3658 <ol>
3659 <li>
3660 Divide the flows in the table into groups based on the values of the
3661 fields or subfields specified in the <ref column="groups"/> column,
3662 so that all of the flows in a given group have the same values for
3663 those fields. If a flow does not specify a given field, that field's
3664 value is treated as 0. If <ref column="groups"/> is empty, then all
3665 of the flows in the flow table are treated as a single group.
3666 </li>
3667
3668 <li>
3669 Consider the flows in the largest group, that is, the group that
3670 contains the greatest number of flows. If two or more groups all
3671 have the same largest number of flows, consider the flows in all of
3672 those groups.
3673 </li>
3674
3675 <li>
3676 If the flows under consideration have different importance values,
3677 eliminate from consideration any flows except those with the lowest
3678 importance. (``Importance,'' a 16-bit integer value attached to each
3679 flow, was introduced in OpenFlow 1.4. Flows inserted with older
3680 versions of OpenFlow always have an importance of 0.)
3681 </li>
3682
3683 <li>
3684 Among the flows under consideration, choose the flow that expires
3685 soonest for eviction.
3686 </li>
3687 </ol>
3688
3689 <p>
3690 The eviction process only considers flows that have an idle timeout
3691 or a hard timeout. That is, eviction never deletes permanent flows.
3692 (Permanent flows do count against <ref column="flow_limit"/>.)
3693 </p>
3694
3695 <column name="flow_limit">
3696 If set, limits the number of flows that may be added to the table.
3697 Open vSwitch may limit the number of flows in a table for other
3698 reasons, e.g. due to hardware limitations or for resource availability
3699 or performance reasons.
3700 </column>
3701
3702 <column name="overflow_policy">
3703 <p>
3704 Controls the switch's behavior when an OpenFlow flow table
3705 modification request would add flows in excess of <ref
3706 column="flow_limit"/>. The supported values are:
3707 </p>
3708
3709 <dl>
3710 <dt><code>refuse</code></dt>
3711 <dd>
3712 Refuse to add the flow or flows. This is also the default policy
3713 when <ref column="overflow_policy"/> is unset.
3714 </dd>
3715
3716 <dt><code>evict</code></dt>
3717 <dd>
3718 Delete a flow chosen according to the algorithm described above.
3719 </dd>
3720 </dl>
3721 </column>
3722
3723 <column name="groups">
3724 <p>
3725 When <ref column="overflow_policy"/> is <code>evict</code>, this
3726 controls how flows are chosen for eviction when the flow table would
3727 otherwise exceed <ref column="flow_limit"/> flows. Its value is a
3728 set of NXM fields or sub-fields, each of which takes one of the forms
3729 <code><var>field</var>[]</code> or
3730 <code><var>field</var>[<var>start</var>..<var>end</var>]</code>,
3731 e.g. <code>NXM_OF_IN_PORT[]</code>. Please see
3732 <code>meta-flow.h</code> for a complete list of NXM field names.
3733 </p>
3734
3735 <p>
3736 Open vSwitch ignores any invalid or unknown field specifications.
3737 </p>
3738
3739 <p>
3740 When eviction is not enabled, via <ref column="overflow_policy"/> or
3741 an OpenFlow 1.4+ ``table mod,'' this column has no effect.
3742 </p>
3743 </column>
3744 </group>
3745
3746 <group title="Classifier Optimization">
3747 <column name="prefixes">
3748 <p>
3749 This string set specifies which fields should be used for
3750 address prefix tracking. Prefix tracking allows the
3751 classifier to skip rules with longer than necessary prefixes,
3752 resulting in better wildcarding for datapath flows.
3753 </p>
3754 <p>
3755 Prefix tracking may be beneficial when a flow table contains
3756 matches on IP address fields with different prefix lengths.
3757 For example, when a flow table contains IP address matches on
3758 both full addresses and proper prefixes, the full address
3759 matches will typically cause the datapath flow to un-wildcard
3760 the whole address field (depending on flow entry priorities).
3761 In this case each packet with a different address gets handed
3762 to the userspace for flow processing and generates its own
3763 datapath flow. With prefix tracking enabled for the address
3764 field in question packets with addresses matching shorter
3765 prefixes would generate datapath flows where the irrelevant
3766 address bits are wildcarded, allowing the same datapath flow
3767 to handle all the packets within the prefix in question. In
3768 this case many userspace upcalls can be avoided and the
3769 overall performance can be better.
3770 </p>
3771 <p>
3772 This is a performance optimization only, so packets will
3773 receive the same treatment with or without prefix tracking.
3774 </p>
3775 <p>
3776 The supported fields are: <code>tun_id</code>,
3777 <code>tun_src</code>, <code>tun_dst</code>,
3778 <code>tun_ipv6_src</code>, <code>tun_ipv6_dst</code>,
3779 <code>nw_src</code>, <code>nw_dst</code> (or aliases
3780 <code>ip_src</code> and <code>ip_dst</code>),
3781 <code>ipv6_src</code>, and <code>ipv6_dst</code>. (Using this
3782 feature for <code>tun_id</code> would only make sense if the
3783 tunnel IDs have prefix structure similar to IP addresses.)
3784 </p>
3785
3786 <p>
3787 By default, the <code>prefixes=ip_dst,ip_src</code> are used
3788 on each flow table. This instructs the flow classifier to
3789 track the IP destination and source addresses used by the
3790 rules in this specific flow table.
3791 </p>
3792
3793 <p>
3794 The keyword <code>none</code> is recognized as an explicit
3795 override of the default values, causing no prefix fields to be
3796 tracked.
3797 </p>
3798
3799 <p>
3800 To set the prefix fields, the flow table record needs to
3801 exist:
3802 </p>
3803
3804 <dl>
3805 <dt><code>ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=table0</code></dt>
3806 <dd>
3807 Creates a flow table record for the OpenFlow table number 0.
3808 </dd>
3809
3810 <dt><code>ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src</code></dt>
3811 <dd>
3812 Enables prefix tracking for IP source and destination
3813 address fields.
3814 </dd>
3815 </dl>
3816
3817 <p>
3818 There is a maximum number of fields that can be enabled for any
3819 one flow table. Currently this limit is 3.
3820 </p>
3821 </column>
3822 </group>
3823
3824 <group title="Common Columns">
3825 The overall purpose of these columns is described under <code>Common
3826 Columns</code> at the beginning of this document.
3827
3828 <column name="external_ids"/>
3829 </group>
3830 </table>
3831
3832 <table name="QoS" title="Quality of Service configuration">
3833 <p>Quality of Service (QoS) configuration for each Port that
3834 references it.</p>
3835
3836 <column name="type">
3837 <p>The type of QoS to implement. The currently defined types are
3838 listed below:</p>
3839 <dl>
3840 <dt><code>linux-htb</code></dt>
3841 <dd>
3842 Linux ``hierarchy token bucket'' classifier. See tc-htb(8) (also at
3843 <code>http://linux.die.net/man/8/tc-htb</code>) and the HTB manual
3844 (<code>http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm</code>)
3845 for information on how this classifier works and how to configure it.
3846 </dd>
3847
3848 <dt><code>linux-hfsc</code></dt>
3849 <dd>
3850 Linux "Hierarchical Fair Service Curve" classifier.
3851 See <code>http://linux-ip.net/articles/hfsc.en/</code> for
3852 information on how this classifier works.
3853 </dd>
3854
3855 <dt><code>linux-sfq</code></dt>
3856 <dd>
3857 Linux ``Stochastic Fairness Queueing'' classifier. See
3858 <code>tc-sfq</code>(8) (also at
3859 <code>http://linux.die.net/man/8/tc-sfq</code>) for information on
3860 how this classifier works.
3861 </dd>
3862
3863 <dt><code>linux-codel</code></dt>
3864 <dd>
3865 Linux ``Controlled Delay'' classifier. See <code>tc-codel</code>(8)
3866 (also at
3867 <code>http://man7.org/linux/man-pages/man8/tc-codel.8.html</code>)
3868 for information on how this classifier works.
3869 </dd>
3870
3871 <dt><code>linux-fq_codel</code></dt>
3872 <dd>
3873 Linux ``Fair Queuing with Controlled Delay'' classifier. See
3874 <code>tc-fq_codel</code>(8) (also at
3875 <code>http://man7.org/linux/man-pages/man8/tc-fq_codel.8.html</code>)
3876 for information on how this classifier works.
3877 </dd>
3878
3879 <dt><code>linux-noop</code></dt>
3880 <dd>
3881 Linux ``No operation.'' By default, Open vSwitch manages quality of
3882 service on all of its configured ports. This can be helpful, but
3883 sometimes administrators prefer to use other software to manage QoS.
3884 This <ref column="type"/> prevents Open vSwitch from changing the QoS
3885 configuration for a port.
3886 </dd>
3887
3888 <dt><code>egress-policer</code></dt>
3889 <dd>
3890 A DPDK egress policer algorithm using the DPDK
3891 rte_meter library. The rte_meter library provides an implementation
3892 which allows the metering and policing of traffic. The implementation
3893 in OVS essentially creates a single token bucket used to police
3894 traffic. It should be noted that when the rte_meter is configured as
3895 part of QoS there will be a performance overhead as the rte_meter
3896 itself will consume CPU cycles in order to police traffic. These CPU
3897 cycles ordinarily are used for packet proccessing. As such the drop
3898 in performance will be noticed in terms of overall aggregate traffic
3899 throughput.
3900 </dd>
3901 </dl>
3902 </column>
3903
3904 <column name="queues">
3905 <p>A map from queue numbers to <ref table="Queue"/> records. The
3906 supported range of queue numbers depend on <ref column="type"/>. The
3907 queue numbers are the same as the <code>queue_id</code> used in
3908 OpenFlow in <code>struct ofp_action_enqueue</code> and other
3909 structures.</p>
3910
3911 <p>
3912 Queue 0 is the ``default queue.'' It is used by OpenFlow output
3913 actions when no specific queue has been set. When no configuration for
3914 queue 0 is present, it is automatically configured as if a <ref
3915 table="Queue"/> record with empty <ref table="Queue" column="dscp"/>
3916 and <ref table="Queue" column="other_config"/> columns had been
3917 specified.
3918 (Before version 1.6, Open vSwitch would leave queue 0 unconfigured in
3919 this case. With some queuing disciplines, this dropped all packets
3920 destined for the default queue.)
3921 </p>
3922 </column>
3923
3924 <group title="Configuration for linux-htb and linux-hfsc">
3925 <p>
3926 The <code>linux-htb</code> and <code>linux-hfsc</code> classes support
3927 the following key-value pair:
3928 </p>
3929
3930 <column name="other_config" key="max-rate" type='{"type": "integer"}'>
3931 Maximum rate shared by all queued traffic, in bit/s. Optional. If not
3932 specified, for physical interfaces, the default is the link rate. For
3933 other interfaces or if the link rate cannot be determined, the default
3934 is currently 100 Mbps.
3935 </column>
3936 </group>
3937
3938 <group title="Configuration for egress-policer QoS">
3939 <p>
3940 <ref table="QoS"/> <ref table="QoS" column="type"/>
3941 <code>egress-policer</code> provides egress policing for userspace
3942 port types with DPDK.
3943
3944 It has the following key-value pairs defined.
3945 </p>
3946
3947 <column name="other_config" key="cir" type='{"type": "integer"}'>
3948 The Committed Information Rate (CIR) is measured in bytes of IP
3949 packets per second, i.e. it includes the IP header, but not link
3950 specific (e.g. Ethernet) headers. This represents the bytes per second
3951 rate at which the token bucket will be updated. The cir value is
3952 calculated by (pps x packet data size). For example assuming a user
3953 wishes to limit a stream consisting of 64 byte packets to 1 million
3954 packets per second the CIR would be set to to to 46000000. This value
3955 can be broken into '1,000,000 x 46'. Where 1,000,000 is the policing
3956 rate for the number of packets per second and 46 represents the size
3957 of the packet data for a 64 byte ip packet.
3958 </column>
3959 <column name="other_config" key="cbs" type='{"type": "integer"}'>
3960 The Committed Burst Size (CBS) is measured in bytes and represents a
3961 token bucket. At a minimum this value should be be set to the expected
3962 largest size packet in the traffic stream. In practice larger values
3963 may be used to increase the size of the token bucket. If a packet can
3964 be transmitted then the cbs will be decremented by the number of
3965 bytes/tokens of the packet. If there are not enough tokens in the cbs
3966 bucket the packet will be dropped.
3967 </column>
3968 </group>
3969
3970 <group title="Configuration for linux-sfq">
3971 <p>
3972 The <code>linux-sfq</code> QoS supports the following key-value pairs:
3973 </p>
3974
3975 <column name="other_config" key="perturb" type='{"type": "integer"}'>
3976 Number of seconds between consecutive perturbations in hashing algorithm.
3977 Different flows can end up in the same hash bucket causing unfairness.
3978 Perturbation's goal is to remove possible unfairness.
3979 The default and recommended value is 10. Too low a value is discouraged
3980 because each perturbation can cause packet reordering.
3981 </column>
3982 <column name="other_config" key="quantum" type='{"type": "integer"}'>
3983 Number of bytes <code>linux-sfq</code> QoS can dequeue in one turn in
3984 round-robin from one flow. The default and recommended value is equal
3985 to interface's MTU.
3986 </column>
3987 </group>
3988
3989 <group title="Common Columns">
3990 The overall purpose of these columns is described under <code>Common
3991 Columns</code> at the beginning of this document.
3992
3993 <column name="other_config"/>
3994 <column name="external_ids"/>
3995 </group>
3996 </table>
3997
3998 <table name="Queue" title="QoS output queue.">
3999 <p>A configuration for a port output queue, used in configuring Quality of
4000 Service (QoS) features. May be referenced by <ref column="queues"
4001 table="QoS"/> column in <ref table="QoS"/> table.</p>
4002
4003 <column name="dscp">
4004 If set, Open vSwitch will mark all traffic egressing this
4005 <ref table="Queue"/> with the given DSCP bits. Traffic egressing the
4006 default <ref table="Queue"/> is only marked if it was explicitly selected
4007 as the <ref table="Queue"/> at the time the packet was output. If unset,
4008 the DSCP bits of traffic egressing this <ref table="Queue"/> will remain
4009 unchanged.
4010 </column>
4011
4012 <group title="Configuration for linux-htb QoS">
4013 <p>
4014 <ref table="QoS"/> <ref table="QoS" column="type"/>
4015 <code>linux-htb</code> may use <code>queue_id</code>s less than 61440.
4016 It has the following key-value pairs defined.
4017 </p>
4018
4019 <column name="other_config" key="min-rate"
4020 type='{"type": "integer", "minInteger": 1}'>
4021 Minimum guaranteed bandwidth, in bit/s.
4022 </column>
4023
4024 <column name="other_config" key="max-rate"
4025 type='{"type": "integer", "minInteger": 1}'>
4026 Maximum allowed bandwidth, in bit/s. Optional. If specified, the
4027 queue's rate will not be allowed to exceed the specified value, even
4028 if excess bandwidth is available. If unspecified, defaults to no
4029 limit.
4030 </column>
4031
4032 <column name="other_config" key="burst"
4033 type='{"type": "integer", "minInteger": 1}'>
4034 Burst size, in bits. This is the maximum amount of ``credits'' that a
4035 queue can accumulate while it is idle. Optional. Details of the
4036 <code>linux-htb</code> implementation require a minimum burst size, so
4037 a too-small <code>burst</code> will be silently ignored.
4038 </column>
4039
4040 <column name="other_config" key="priority"
4041 type='{"type": "integer", "minInteger": 0, "maxInteger": 4294967295}'>
4042 A queue with a smaller <code>priority</code> will receive all the
4043 excess bandwidth that it can use before a queue with a larger value
4044 receives any. Specific priority values are unimportant; only relative
4045 ordering matters. Defaults to 0 if unspecified.
4046 </column>
4047 </group>
4048
4049 <group title="Configuration for linux-hfsc QoS">
4050 <p>
4051 <ref table="QoS"/> <ref table="QoS" column="type"/>
4052 <code>linux-hfsc</code> may use <code>queue_id</code>s less than 61440.
4053 It has the following key-value pairs defined.
4054 </p>
4055
4056 <column name="other_config" key="min-rate"
4057 type='{"type": "integer", "minInteger": 1}'>
4058 Minimum guaranteed bandwidth, in bit/s.
4059 </column>
4060
4061 <column name="other_config" key="max-rate"
4062 type='{"type": "integer", "minInteger": 1}'>
4063 Maximum allowed bandwidth, in bit/s. Optional. If specified, the
4064 queue's rate will not be allowed to exceed the specified value, even if
4065 excess bandwidth is available. If unspecified, defaults to no
4066 limit.
4067 </column>
4068 </group>
4069
4070 <group title="Common Columns">
4071 The overall purpose of these columns is described under <code>Common
4072 Columns</code> at the beginning of this document.
4073
4074 <column name="other_config"/>
4075 <column name="external_ids"/>
4076 </group>
4077 </table>
4078
4079 <table name="Mirror" title="Port mirroring.">
4080 <p>A port mirror within a <ref table="Bridge"/>.</p>
4081 <p>A port mirror configures a bridge to send selected frames to special
4082 ``mirrored'' ports, in addition to their normal destinations. Mirroring
4083 traffic may also be referred to as SPAN or RSPAN, depending on how
4084 the mirrored traffic is sent.</p>
4085
4086 <p>
4087 When a packet enters an Open vSwitch bridge, it becomes eligible for
4088 mirroring based on its ingress port and VLAN. As the packet travels
4089 through the flow tables, each time it is output to a port, it becomes
4090 eligible for mirroring based on the egress port and VLAN. In Open
4091 vSwitch 2.5 and later, mirroring occurs just after a packet first becomes
4092 eligible, using the packet as it exists at that point; in Open vSwitch
4093 2.4 and earlier, mirroring occurs only after a packet has traversed all
4094 the flow tables, using the original packet as it entered the bridge.
4095 This makes a difference only when the flow table modifies the packet: in
4096 Open vSwitch 2.4, the modifications are never visible to mirrors, whereas
4097 in Open vSwitch 2.5 and later modifications made before the first output
4098 that makes it eligible for mirroring to a particular destination are
4099 visible.
4100 </p>
4101
4102 <p>
4103 A packet that enters an Open vSwitch bridge is mirrored to a particular
4104 destination only once, even if it is eligible for multiple reasons. For
4105 example, a packet would be mirrored to a particular <ref
4106 column="output_port"/> only once, even if it is selected for mirroring to
4107 that port by <ref column="select_dst_port"/> and <ref
4108 column="select_src_port"/> in the same or different <ref table="Mirror"/>
4109 records.
4110 </p>
4111
4112 <column name="name">
4113 Arbitrary identifier for the <ref table="Mirror"/>.
4114 </column>
4115
4116 <group title="Selecting Packets for Mirroring">
4117 <p>
4118 To be selected for mirroring, a given packet must enter or leave the
4119 bridge through a selected port and it must also be in one of the
4120 selected VLANs.
4121 </p>
4122
4123 <column name="select_all">
4124 If true, every packet arriving or departing on any port is
4125 selected for mirroring.
4126 </column>
4127
4128 <column name="select_dst_port">
4129 Ports on which departing packets are selected for mirroring.
4130 </column>
4131
4132 <column name="select_src_port">
4133 Ports on which arriving packets are selected for mirroring.
4134 </column>
4135
4136 <column name="select_vlan">
4137 VLANs on which packets are selected for mirroring. An empty set
4138 selects packets on all VLANs.
4139 </column>
4140 </group>
4141
4142 <group title="Mirroring Destination Configuration">
4143 <p>
4144 These columns are mutually exclusive. Exactly one of them must be
4145 nonempty.
4146 </p>
4147
4148 <column name="output_port">
4149 <p>Output port for selected packets, if nonempty.</p>
4150 <p>Specifying a port for mirror output reserves that port exclusively
4151 for mirroring. No frames other than those selected for mirroring
4152 via this column
4153 will be forwarded to the port, and any frames received on the port
4154 will be discarded.</p>
4155 <p>
4156 The output port may be any kind of port supported by Open vSwitch.
4157 It may be, for example, a physical port (sometimes called SPAN) or a
4158 GRE tunnel.
4159 </p>
4160 </column>
4161
4162 <column name="output_vlan">
4163 <p>Output VLAN for selected packets, if nonempty.</p>
4164 <p>The frames will be sent out all ports that trunk
4165 <ref column="output_vlan"/>, as well as any ports with implicit VLAN
4166 <ref column="output_vlan"/>. When a mirrored frame is sent out a
4167 trunk port, the frame's VLAN tag will be set to
4168 <ref column="output_vlan"/>, replacing any existing tag; when it is
4169 sent out an implicit VLAN port, the frame will not be tagged. This
4170 type of mirroring is sometimes called RSPAN.</p>
4171 <p>
4172 See the documentation for
4173 <ref column="other_config" key="forward-bpdu"/> in the
4174 <ref table="Interface"/> table for a list of destination MAC
4175 addresses which will not be mirrored to a VLAN to avoid confusing
4176 switches that interpret the protocols that they represent.
4177 </p>
4178 <p><em>Please note:</em> Mirroring to a VLAN can disrupt a network that
4179 contains unmanaged switches. Consider an unmanaged physical switch
4180 with two ports: port 1, connected to an end host, and port 2,
4181 connected to an Open vSwitch configured to mirror received packets
4182 into VLAN 123 on port 2. Suppose that the end host sends a packet on
4183 port 1 that the physical switch forwards to port 2. The Open vSwitch
4184 forwards this packet to its destination and then reflects it back on
4185 port 2 in VLAN 123. This reflected packet causes the unmanaged
4186 physical switch to replace the MAC learning table entry, which
4187 correctly pointed to port 1, with one that incorrectly points to port
4188 2. Afterward, the physical switch will direct packets destined for
4189 the end host to the Open vSwitch on port 2, instead of to the end
4190 host on port 1, disrupting connectivity. If mirroring to a VLAN is
4191 desired in this scenario, then the physical switch must be replaced
4192 by one that learns Ethernet addresses on a per-VLAN basis. In
4193 addition, learning should be disabled on the VLAN containing mirrored
4194 traffic. If this is not done then intermediate switches will learn
4195 the MAC address of each end host from the mirrored traffic. If
4196 packets being sent to that end host are also mirrored, then they will
4197 be dropped since the switch will attempt to send them out the input
4198 port. Disabling learning for the VLAN will cause the switch to
4199 correctly send the packet out all ports configured for that VLAN. If
4200 Open vSwitch is being used as an intermediate switch, learning can be
4201 disabled by adding the mirrored VLAN to <ref column="flood_vlans"/>
4202 in the appropriate <ref table="Bridge"/> table or tables.</p>
4203 <p>
4204 Mirroring to a GRE tunnel has fewer caveats than mirroring to a
4205 VLAN and should generally be preferred.
4206 </p>
4207 </column>
4208
4209 <column name="snaplen">
4210 <p>Maximum per-packet number of bytes to mirror.</p>
4211 <p>A mirrored packet with size larger than <ref column="snaplen"/>
4212 will be truncated in datapath to <ref column="snaplen"/> bytes
4213 before sending to the mirror output port. If omitted, packets
4214 are not truncated.
4215 </p>
4216 </column>
4217 </group>
4218
4219 <group title="Statistics: Mirror counters">
4220 <p>
4221 Key-value pairs that report mirror statistics. The update period
4222 is controlled by <ref column="other_config"
4223 key="stats-update-interval"/> in the <code>Open_vSwitch</code> table.
4224 </p>
4225 <column name="statistics" key="tx_packets">
4226 Number of packets transmitted through this mirror.
4227 </column>
4228 <column name="statistics" key="tx_bytes">
4229 Number of bytes transmitted through this mirror.
4230 </column>
4231 </group>
4232
4233 <group title="Common Columns">
4234 The overall purpose of these columns is described under <code>Common
4235 Columns</code> at the beginning of this document.
4236
4237 <column name="external_ids"/>
4238 </group>
4239 </table>
4240
4241 <table name="Controller" title="OpenFlow controller configuration.">
4242 <p>An OpenFlow controller.</p>
4243
4244 <p>
4245 Open vSwitch supports two kinds of OpenFlow controllers:
4246 </p>
4247
4248 <dl>
4249 <dt>Primary controllers</dt>
4250 <dd>
4251 <p>
4252 This is the kind of controller envisioned by the OpenFlow 1.0
4253 specification. Usually, a primary controller implements a network
4254 policy by taking charge of the switch's flow table.
4255 </p>
4256
4257 <p>
4258 Open vSwitch initiates and maintains persistent connections to
4259 primary controllers, retrying the connection each time it fails or
4260 drops. The <ref table="Bridge" column="fail_mode"/> column in the
4261 <ref table="Bridge"/> table applies to primary controllers.
4262 </p>
4263
4264 <p>
4265 Open vSwitch permits a bridge to have any number of primary
4266 controllers. When multiple controllers are configured, Open
4267 vSwitch connects to all of them simultaneously. Because
4268 OpenFlow 1.0 does not specify how multiple controllers
4269 coordinate in interacting with a single switch, more than
4270 one primary controller should be specified only if the
4271 controllers are themselves designed to coordinate with each
4272 other. (The Nicira-defined <code>NXT_ROLE</code> OpenFlow
4273 vendor extension may be useful for this.)
4274 </p>
4275 </dd>
4276 <dt>Service controllers</dt>
4277 <dd>
4278 <p>
4279 These kinds of OpenFlow controller connections are intended for
4280 occasional support and maintenance use, e.g. with
4281 <code>ovs-ofctl</code>. Usually a service controller connects only
4282 briefly to inspect or modify some of a switch's state.
4283 </p>
4284
4285 <p>
4286 Open vSwitch listens for incoming connections from service
4287 controllers. The service controllers initiate and, if necessary,
4288 maintain the connections from their end. The <ref table="Bridge"
4289 column="fail_mode"/> column in the <ref table="Bridge"/> table does
4290 not apply to service controllers.
4291 </p>
4292
4293 <p>
4294 Open vSwitch supports configuring any number of service controllers.
4295 </p>
4296 </dd>
4297 </dl>
4298
4299 <p>
4300 The <ref column="target"/> determines the type of controller.
4301 </p>
4302
4303 <group title="Core Features">
4304 <column name="target">
4305 <p>Connection method for controller.</p>
4306 <p>
4307 The following connection methods are currently supported for primary
4308 controllers:
4309 </p>
4310 <dl>
4311 <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
4312 <dd>
4313 <p>The specified SSL <var>port</var> on the host at the
4314 given <var>ip</var>, which must be expressed as an IP
4315 address (not a DNS name). The <ref table="Open_vSwitch"
4316 column="ssl"/> column in the <ref table="Open_vSwitch"/>
4317 table must point to a valid SSL configuration when this form
4318 is used.</p>
4319 <p>If <var>port</var> is not specified, it defaults to 6653.</p>
4320 <p>SSL support is an optional feature that is not always built as
4321 part of Open vSwitch.</p>
4322 </dd>
4323 <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
4324 <dd>
4325 <p>
4326 The specified TCP <var>port</var> on the host at the given
4327 <var>ip</var>, which must be expressed as an IP address (not a
4328 DNS name), where <var>ip</var> can be IPv4 or IPv6 address. If
4329 <var>ip</var> is an IPv6 address, wrap it in square brackets,
4330 e.g. <code>tcp:[::1]:6653</code>.
4331 </p>
4332 <p>
4333 If <var>port</var> is not specified, it defaults to 6653.
4334 </p>
4335 </dd>
4336 </dl>
4337 <p>
4338 The following connection methods are currently supported for service
4339 controllers:
4340 </p>
4341 <dl>
4342 <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
4343 <dd>
4344 <p>
4345 Listens for SSL connections on the specified TCP <var>port</var>.
4346 If <var>ip</var>, which must be expressed as an IP address (not a
4347 DNS name), is specified, then connections are restricted to the
4348 specified local IP address (either IPv4 or IPv6). If
4349 <var>ip</var> is an IPv6 address, wrap it in square brackets,
4350 e.g. <code>pssl:6653:[::1]</code>.
4351 </p>
4352 <p>
4353 If <var>port</var> is not specified, it defaults to
4354 6653. If <var>ip</var> is not specified then it listens only on
4355 IPv4 (but not IPv6) addresses. The
4356 <ref table="Open_vSwitch" column="ssl"/>
4357 column in the <ref table="Open_vSwitch"/> table must point to a
4358 valid SSL configuration when this form is used.
4359 </p>
4360 <p>
4361 If <var>port</var> is not specified, it currently to 6653.
4362 </p>
4363 <p>
4364 SSL support is an optional feature that is not always built as
4365 part of Open vSwitch.
4366 </p>
4367 </dd>
4368 <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
4369 <dd>
4370 <p>
4371 Listens for connections on the specified TCP <var>port</var>. If
4372 <var>ip</var>, which must be expressed as an IP address (not a
4373 DNS name), is specified, then connections are restricted to the
4374 specified local IP address (either IPv4 or IPv6). If
4375 <var>ip</var> is an IPv6 address, wrap it in square brackets,
4376 e.g. <code>ptcp:6653:[::1]</code>. If <var>ip</var> is not
4377 specified then it listens only on IPv4 addresses.
4378 </p>
4379 <p>
4380 If <var>port</var> is not specified, it defaults to 6653.
4381 </p>
4382 </dd>
4383 </dl>
4384 <p>When multiple controllers are configured for a single bridge, the
4385 <ref column="target"/> values must be unique. Duplicate
4386 <ref column="target"/> values yield unspecified results.</p>
4387 </column>
4388
4389 <column name="connection_mode">
4390 <p>If it is specified, this setting must be one of the following
4391 strings that describes how Open vSwitch contacts this OpenFlow
4392 controller over the network:</p>
4393
4394 <dl>
4395 <dt><code>in-band</code></dt>
4396 <dd>In this mode, this controller's OpenFlow traffic travels over the
4397 bridge associated with the controller. With this setting, Open
4398 vSwitch allows traffic to and from the controller regardless of the
4399 contents of the OpenFlow flow table. (Otherwise, Open vSwitch
4400 would never be able to connect to the controller, because it did
4401 not have a flow to enable it.) This is the most common connection
4402 mode because it is not necessary to maintain two independent
4403 networks.</dd>
4404 <dt><code>out-of-band</code></dt>
4405 <dd>In this mode, OpenFlow traffic uses a control network separate
4406 from the bridge associated with this controller, that is, the
4407 bridge does not use any of its own network devices to communicate
4408 with the controller. The control network must be configured
4409 separately, before or after <code>ovs-vswitchd</code> is started.
4410 </dd>
4411 </dl>
4412
4413 <p>If not specified, the default is implementation-specific.</p>
4414 </column>
4415 </group>
4416
4417 <group title="Controller Failure Detection and Handling">
4418 <column name="max_backoff">
4419 Maximum number of milliseconds to wait between connection attempts.
4420 Default is implementation-specific.
4421 </column>
4422
4423 <column name="inactivity_probe">
4424 Maximum number of milliseconds of idle time on connection to
4425 controller before sending an inactivity probe message. If Open
4426 vSwitch does not communicate with the controller for the specified
4427 number of seconds, it will send a probe. If a response is not
4428 received for the same additional amount of time, Open vSwitch
4429 assumes the connection has been broken and attempts to reconnect.
4430 Default is implementation-specific. A value of 0 disables
4431 inactivity probes.
4432 </column>
4433 </group>
4434
4435 <group title="Asynchronous Messages">
4436 <p>
4437 OpenFlow switches send certain messages to controllers spontanenously,
4438 that is, not in response to any request from the controller. These
4439 messages are called ``asynchronous messages.'' These columns allow
4440 asynchronous messages to be limited or disabled to ensure the best use
4441 of network resources.
4442 </p>
4443
4444 <column name="enable_async_messages">
4445 The OpenFlow protocol enables asynchronous messages at time of
4446 connection establishment, which means that a controller can receive
4447 asynchronous messages, potentially many of them, even if it turns them
4448 off immediately after connecting. Set this column to
4449 <code>false</code> to change Open vSwitch behavior to disable, by
4450 default, all asynchronous messages. The controller can use the
4451 <code>NXT_SET_ASYNC_CONFIG</code> Nicira extension to OpenFlow to turn
4452 on any messages that it does want to receive, if any.
4453 </column>
4454
4455 <group title="Controller Rate Limiting">
4456 <p>
4457 A switch can forward packets to a controller over the OpenFlow
4458 protocol. Forwarding packets this way at too high a rate can
4459 overwhelm a controller, frustrate use of the OpenFlow connection for
4460 other purposes, increase the latency of flow setup, and use an
4461 unreasonable amount of bandwidth. Therefore, Open vSwitch supports
4462 limiting the rate of packet forwarding to a controller.
4463 </p>
4464
4465 <p>
4466 There are two main reasons in OpenFlow for a packet to be sent to a
4467 controller: either the packet ``misses'' in the flow table, that is,
4468 there is no matching flow, or a flow table action says to send the
4469 packet to the controller. Open vSwitch limits the rate of each kind
4470 of packet separately at the configured rate. Therefore, the actual
4471 rate that packets are sent to the controller can be up to twice the
4472 configured rate, when packets are sent for both reasons.
4473 </p>
4474
4475 <p>
4476 This feature is specific to forwarding packets over an OpenFlow
4477 connection. It is not general-purpose QoS. See the <ref
4478 table="QoS"/> table for quality of service configuration, and <ref
4479 column="ingress_policing_rate" table="Interface"/> in the <ref
4480 table="Interface"/> table for ingress policing configuration.
4481 </p>
4482
4483 <column name="controller_rate_limit">
4484 <p>
4485 The maximum rate at which the switch will forward packets to the
4486 OpenFlow controller, in packets per second. If no value is
4487 specified, rate limiting is disabled.
4488 </p>
4489 </column>
4490
4491 <column name="controller_burst_limit">
4492 <p>
4493 When a high rate triggers rate-limiting, Open vSwitch queues
4494 packets to the controller for each port and transmits them to the
4495 controller at the configured rate. This value limits the number of
4496 queued packets. Ports on a bridge share the packet queue fairly.
4497 </p>
4498
4499 <p>
4500 This value has no effect unless <ref
4501 column="controller_rate_limit"/> is configured. The current
4502 default when this value is not specified is one-quarter of <ref
4503 column="controller_rate_limit"/>, meaning that queuing can delay
4504 forwarding a packet to the controller by up to 250 ms.
4505 </p>
4506 </column>
4507
4508 <group title="Controller Rate Limiting Statistics">
4509 <p>
4510 These values report the effects of rate limiting. Their values are
4511 relative to establishment of the most recent OpenFlow connection,
4512 or since rate limiting was enabled, whichever happened more
4513 recently. Each consists of two values, one with <code>TYPE</code>
4514 replaced by <code>miss</code> for rate limiting flow table misses,
4515 and the other with <code>TYPE</code> replaced by
4516 <code>action</code> for rate limiting packets sent by OpenFlow
4517 actions.
4518 </p>
4519
4520 <p>
4521 These statistics are reported only when controller rate limiting is
4522 enabled.
4523 </p>
4524
4525 <column name="status" key="packet-in-TYPE-bypassed"
4526 type='{"type": "integer", "minInteger": 0}'>
4527 Number of packets sent directly to the controller, without queuing,
4528 because the rate did not exceed the configured maximum.
4529 </column>
4530
4531 <column name="status" key="packet-in-TYPE-queued"
4532 type='{"type": "integer", "minInteger": 0}'>
4533 Number of packets added to the queue to send later.
4534 </column>
4535
4536 <column name="status" key="packet-in-TYPE-dropped"
4537 type='{"type": "integer", "minInteger": 0}'>
4538 Number of packets added to the queue that were later dropped due to
4539 overflow. This value is less than or equal to <ref column="status"
4540 key="packet-in-TYPE-queued"/>.
4541 </column>
4542
4543 <column name="status" key="packet-in-TYPE-backlog"
4544 type='{"type": "integer", "minInteger": 0}'>
4545 Number of packets currently queued. The other statistics increase
4546 monotonically, but this one fluctuates between 0 and the <ref
4547 column="controller_burst_limit"/> as conditions change.
4548 </column>
4549 </group>
4550 </group>
4551 </group>
4552
4553 <group title="Additional In-Band Configuration">
4554 <p>These values are considered only in in-band control mode (see
4555 <ref column="connection_mode"/>).</p>
4556
4557 <p>When multiple controllers are configured on a single bridge, there
4558 should be only one set of unique values in these columns. If different
4559 values are set for these columns in different controllers, the effect
4560 is unspecified.</p>
4561
4562 <column name="local_ip">
4563 The IP address to configure on the local port,
4564 e.g. <code>192.168.0.123</code>. If this value is unset, then
4565 <ref column="local_netmask"/> and <ref column="local_gateway"/> are
4566 ignored.
4567 </column>
4568
4569 <column name="local_netmask">
4570 The IP netmask to configure on the local port,
4571 e.g. <code>255.255.255.0</code>. If <ref column="local_ip"/> is set
4572 but this value is unset, then the default is chosen based on whether
4573 the IP address is class A, B, or C.
4574 </column>
4575
4576 <column name="local_gateway">
4577 The IP address of the gateway to configure on the local port, as a
4578 string, e.g. <code>192.168.0.1</code>. Leave this column unset if
4579 this network has no gateway.
4580 </column>
4581 </group>
4582
4583 <group title="Controller Status">
4584 <column name="is_connected">
4585 <code>true</code> if currently connected to this controller,
4586 <code>false</code> otherwise.
4587 </column>
4588
4589 <column name="role"
4590 type='{"type": "string", "enum": ["set", ["other", "master", "slave"]]}'>
4591 <p>The level of authority this controller has on the associated
4592 bridge. Possible values are:</p>
4593 <dl>
4594 <dt><code>other</code></dt>
4595 <dd>Allows the controller access to all OpenFlow features.</dd>
4596 <dt><code>master</code></dt>
4597 <dd>Equivalent to <code>other</code>, except that there may be at
4598 most one master controller at a time. When a controller configures
4599 itself as <code>master</code>, any existing master is demoted to
4600 the <code>slave</code> role.</dd>
4601 <dt><code>slave</code></dt>
4602 <dd>Allows the controller read-only access to OpenFlow features.
4603 Attempts to modify the flow table will be rejected with an
4604 error. Slave controllers do not receive OFPT_PACKET_IN or
4605 OFPT_FLOW_REMOVED messages, but they do receive OFPT_PORT_STATUS
4606 messages.</dd>
4607 </dl>
4608 </column>
4609
4610 <column name="status" key="last_error">
4611 A human-readable description of the last error on the connection
4612 to the controller; i.e. <code>strerror(errno)</code>. This key
4613 will exist only if an error has occurred.
4614 </column>
4615
4616 <column name="status" key="state"
4617 type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
4618 <p>
4619 The state of the connection to the controller:
4620 </p>
4621 <dl>
4622 <dt><code>VOID</code></dt>
4623 <dd>Connection is disabled.</dd>
4624
4625 <dt><code>BACKOFF</code></dt>
4626 <dd>Attempting to reconnect at an increasing period.</dd>
4627
4628 <dt><code>CONNECTING</code></dt>
4629 <dd>Attempting to connect.</dd>
4630
4631 <dt><code>ACTIVE</code></dt>
4632 <dd>Connected, remote host responsive.</dd>
4633
4634 <dt><code>IDLE</code></dt>
4635 <dd>Connection is idle. Waiting for response to keep-alive.</dd>
4636 </dl>
4637 <p>
4638 These values may change in the future. They are provided only for
4639 human consumption.
4640 </p>
4641 </column>
4642
4643 <column name="status" key="sec_since_connect"
4644 type='{"type": "integer", "minInteger": 0}'>
4645 The amount of time since this controller last successfully connected to
4646 the switch (in seconds). Value is empty if controller has never
4647 successfully connected.
4648 </column>
4649
4650 <column name="status" key="sec_since_disconnect"
4651 type='{"type": "integer", "minInteger": 1}'>
4652 The amount of time since this controller last disconnected from
4653 the switch (in seconds). Value is empty if controller has never
4654 disconnected.
4655 </column>
4656 </group>
4657
4658 <group title="Connection Parameters">
4659 <p>
4660 Additional configuration for a connection between the controller
4661 and the Open vSwitch.
4662 </p>
4663
4664 <column name="other_config" key="dscp"
4665 type='{"type": "integer"}'>
4666 The Differentiated Service Code Point (DSCP) is specified using 6 bits
4667 in the Type of Service (TOS) field in the IP header. DSCP provides a
4668 mechanism to classify the network traffic and provide Quality of
4669 Service (QoS) on IP networks.
4670
4671 The DSCP value specified here is used when establishing the connection
4672 between the controller and the Open vSwitch. If no value is specified,
4673 a default value of 48 is chosen. Valid DSCP values must be in the
4674 range 0 to 63.
4675 </column>
4676 </group>
4677
4678
4679 <group title="Common Columns">
4680 The overall purpose of these columns is described under <code>Common
4681 Columns</code> at the beginning of this document.
4682
4683 <column name="external_ids"/>
4684 <column name="other_config"/>
4685 </group>
4686 </table>
4687
4688 <table name="Manager" title="OVSDB management connection.">
4689 <p>
4690 Configuration for a database connection to an Open vSwitch database
4691 (OVSDB) client.
4692 </p>
4693
4694 <p>
4695 This table primarily configures the Open vSwitch database
4696 (<code>ovsdb-server</code>), not the Open vSwitch switch
4697 (<code>ovs-vswitchd</code>). The switch does read the table to determine
4698 what connections should be treated as in-band.
4699 </p>
4700
4701 <p>
4702 The Open vSwitch database server can initiate and maintain active
4703 connections to remote clients. It can also listen for database
4704 connections.
4705 </p>
4706
4707 <group title="Core Features">
4708 <column name="target">
4709 <p>Connection method for managers.</p>
4710 <p>
4711 The following connection methods are currently supported:
4712 </p>
4713 <dl>
4714 <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
4715 <dd>
4716 <p>
4717 The specified SSL <var>port</var> on the host at the given
4718 <var>ip</var>, which must be expressed as an IP address
4719 (not a DNS name). The <ref table="Open_vSwitch"
4720 column="ssl"/> column in the <ref table="Open_vSwitch"/>
4721 table must point to a valid SSL configuration when this
4722 form is used.
4723 </p>
4724 <p>
4725 If <var>port</var> is not specified, it defaults to 6640.
4726 </p>
4727 <p>
4728 SSL support is an optional feature that is not always
4729 built as part of Open vSwitch.
4730 </p>
4731 </dd>
4732
4733 <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
4734 <dd>
4735 <p>
4736 The specified TCP <var>port</var> on the host at the given
4737 <var>ip</var>, which must be expressed as an IP address (not a
4738 DNS name), where <var>ip</var> can be IPv4 or IPv6 address. If
4739 <var>ip</var> is an IPv6 address, wrap it in square brackets,
4740 e.g. <code>tcp:[::1]:6640</code>.
4741 </p>
4742 <p>
4743 If <var>port</var> is not specified, it defaults to 6640.
4744 </p>
4745 </dd>
4746 <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
4747 <dd>
4748 <p>
4749 Listens for SSL connections on the specified TCP <var>port</var>.
4750 Specify 0 for <var>port</var> to have the kernel automatically
4751 choose an available port. If <var>ip</var>, which must be
4752 expressed as an IP address (not a DNS name), is specified, then
4753 connections are restricted to the specified local IP address
4754 (either IPv4 or IPv6 address). If <var>ip</var> is an IPv6
4755 address, wrap in square brackets,
4756 e.g. <code>pssl:6640:[::1]</code>. If <var>ip</var> is not
4757 specified then it listens only on IPv4 (but not IPv6) addresses.
4758 The <ref table="Open_vSwitch" column="ssl"/> column in the <ref
4759 table="Open_vSwitch"/> table must point to a valid SSL
4760 configuration when this form is used.
4761 </p>
4762 <p>
4763 If <var>port</var> is not specified, it defaults to 6640.
4764 </p>
4765 <p>
4766 SSL support is an optional feature that is not always built as
4767 part of Open vSwitch.
4768 </p>
4769 </dd>
4770 <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
4771 <dd>
4772 <p>
4773 Listens for connections on the specified TCP <var>port</var>.
4774 Specify 0 for <var>port</var> to have the kernel automatically
4775 choose an available port. If <var>ip</var>, which must be
4776 expressed as an IP address (not a DNS name), is specified, then
4777 connections are restricted to the specified local IP address
4778 (either IPv4 or IPv6 address). If <var>ip</var> is an IPv6
4779 address, wrap it in square brackets,
4780 e.g. <code>ptcp:6640:[::1]</code>. If <var>ip</var> is not
4781 specified then it listens only on IPv4 addresses.
4782 </p>
4783 <p>
4784 If <var>port</var> is not specified, it defaults to 6640.
4785 </p>
4786 </dd>
4787 </dl>
4788 <p>When multiple managers are configured, the <ref column="target"/>
4789 values must be unique. Duplicate <ref column="target"/> values yield
4790 unspecified results.</p>
4791 </column>
4792
4793 <column name="connection_mode">
4794 <p>
4795 If it is specified, this setting must be one of the following strings
4796 that describes how Open vSwitch contacts this OVSDB client over the
4797 network:
4798 </p>
4799
4800 <dl>
4801 <dt><code>in-band</code></dt>
4802 <dd>
4803 In this mode, this connection's traffic travels over a bridge
4804 managed by Open vSwitch. With this setting, Open vSwitch allows
4805 traffic to and from the client regardless of the contents of the
4806 OpenFlow flow table. (Otherwise, Open vSwitch would never be able
4807 to connect to the client, because it did not have a flow to enable
4808 it.) This is the most common connection mode because it is not
4809 necessary to maintain two independent networks.
4810 </dd>
4811 <dt><code>out-of-band</code></dt>
4812 <dd>
4813 In this mode, the client's traffic uses a control network separate
4814 from that managed by Open vSwitch, that is, Open vSwitch does not
4815 use any of its own network devices to communicate with the client.
4816 The control network must be configured separately, before or after
4817 <code>ovs-vswitchd</code> is started.
4818 </dd>
4819 </dl>
4820
4821 <p>
4822 If not specified, the default is implementation-specific.
4823 </p>
4824 </column>
4825 </group>
4826
4827 <group title="Client Failure Detection and Handling">
4828 <column name="max_backoff">
4829 Maximum number of milliseconds to wait between connection attempts.
4830 Default is implementation-specific.
4831 </column>
4832
4833 <column name="inactivity_probe">
4834 Maximum number of milliseconds of idle time on connection to the client
4835 before sending an inactivity probe message. If Open vSwitch does not
4836 communicate with the client for the specified number of seconds, it
4837 will send a probe. If a response is not received for the same
4838 additional amount of time, Open vSwitch assumes the connection has been
4839 broken and attempts to reconnect. Default is implementation-specific.
4840 A value of 0 disables inactivity probes.
4841 </column>
4842 </group>
4843
4844 <group title="Status">
4845 <p>
4846 Key-value pair of <ref column="is_connected"/> is always updated.
4847 Other key-value pairs in the status columns may be updated depends
4848 on the <ref column="target"/> type.
4849 </p>
4850
4851 <p>
4852 When <ref column="target"/> specifies a connection method that
4853 listens for inbound connections (e.g. <code>ptcp:</code> or
4854 <code>punix:</code>), both <ref column="n_connections"/> and
4855 <ref column="is_connected"/> may also be updated while the
4856 remaining key-value pairs are omitted.
4857 </p>
4858
4859 <p>
4860 On the other hand, when <ref column="target"/> specifies an
4861 outbound connection, all key-value pairs may be updated, except
4862 the above-mentioned two key-value pairs associated with inbound
4863 connection targets. They are omitted.
4864 </p>
4865
4866 <column name="is_connected">
4867 <code>true</code> if currently connected to this manager,
4868 <code>false</code> otherwise.
4869 </column>
4870
4871 <column name="status" key="last_error">
4872 A human-readable description of the last error on the connection
4873 to the manager; i.e. <code>strerror(errno)</code>. This key
4874 will exist only if an error has occurred.
4875 </column>
4876
4877 <column name="status" key="state"
4878 type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
4879 <p>
4880 The state of the connection to the manager:
4881 </p>
4882 <dl>
4883 <dt><code>VOID</code></dt>
4884 <dd>Connection is disabled.</dd>
4885
4886 <dt><code>BACKOFF</code></dt>
4887 <dd>Attempting to reconnect at an increasing period.</dd>
4888
4889 <dt><code>CONNECTING</code></dt>
4890 <dd>Attempting to connect.</dd>
4891
4892 <dt><code>ACTIVE</code></dt>
4893 <dd>Connected, remote host responsive.</dd>
4894
4895 <dt><code>IDLE</code></dt>
4896 <dd>Connection is idle. Waiting for response to keep-alive.</dd>
4897 </dl>
4898 <p>
4899 These values may change in the future. They are provided only for
4900 human consumption.
4901 </p>
4902 </column>
4903
4904 <column name="status" key="sec_since_connect"
4905 type='{"type": "integer", "minInteger": 0}'>
4906 The amount of time since this manager last successfully connected
4907 to the database (in seconds). Value is empty if manager has never
4908 successfully connected.
4909 </column>
4910
4911 <column name="status" key="sec_since_disconnect"
4912 type='{"type": "integer", "minInteger": 0}'>
4913 The amount of time since this manager last disconnected from the
4914 database (in seconds). Value is empty if manager has never
4915 disconnected.
4916 </column>
4917
4918 <column name="status" key="locks_held">
4919 Space-separated list of the names of OVSDB locks that the connection
4920 holds. Omitted if the connection does not hold any locks.
4921 </column>
4922
4923 <column name="status" key="locks_waiting">
4924 Space-separated list of the names of OVSDB locks that the connection is
4925 currently waiting to acquire. Omitted if the connection is not waiting
4926 for any locks.
4927 </column>
4928
4929 <column name="status" key="locks_lost">
4930 Space-separated list of the names of OVSDB locks that the connection
4931 has had stolen by another OVSDB client. Omitted if no locks have been
4932 stolen from this connection.
4933 </column>
4934
4935 <column name="status" key="n_connections"
4936 type='{"type": "integer", "minInteger": 2}'>
4937 When <ref column="target"/> specifies a connection method that
4938 listens for inbound connections (e.g. <code>ptcp:</code> or
4939 <code>pssl:</code>) and more than one connection is actually active,
4940 the value is the number of active connections. Otherwise, this
4941 key-value pair is omitted.
4942 </column>
4943
4944 <column name="status" key="bound_port" type='{"type": "integer"}'>
4945 When <ref column="target"/> is <code>ptcp:</code> or
4946 <code>pssl:</code>, this is the TCP port on which the OVSDB server is
4947 listening. (This is particularly useful when <ref
4948 column="target"/> specifies a port of 0, allowing the kernel to
4949 choose any available port.)
4950 </column>
4951 </group>
4952
4953 <group title="Connection Parameters">
4954 <p>
4955 Additional configuration for a connection between the manager
4956 and the Open vSwitch Database.
4957 </p>
4958
4959 <column name="other_config" key="dscp"
4960 type='{"type": "integer"}'>
4961 The Differentiated Service Code Point (DSCP) is specified using 6 bits
4962 in the Type of Service (TOS) field in the IP header. DSCP provides a
4963 mechanism to classify the network traffic and provide Quality of
4964 Service (QoS) on IP networks.
4965
4966 The DSCP value specified here is used when establishing the connection
4967 between the manager and the Open vSwitch. If no value is specified, a
4968 default value of 48 is chosen. Valid DSCP values must be in the range
4969 0 to 63.
4970 </column>
4971 </group>
4972
4973 <group title="Common Columns">
4974 The overall purpose of these columns is described under <code>Common
4975 Columns</code> at the beginning of this document.
4976
4977 <column name="external_ids"/>
4978 <column name="other_config"/>
4979 </group>
4980 </table>
4981
4982 <table name="NetFlow">
4983 A NetFlow target. NetFlow is a protocol that exports a number of
4984 details about terminating IP flows, such as the principals involved
4985 and duration.
4986
4987 <column name="targets">
4988 NetFlow targets in the form
4989 <code><var>ip</var>:<var>port</var></code>. The <var>ip</var>
4990 must be specified numerically, not as a DNS name.
4991 </column>
4992
4993 <column name="engine_id">
4994 Engine ID to use in NetFlow messages. Defaults to datapath index
4995 if not specified.
4996 </column>
4997
4998 <column name="engine_type">
4999 Engine type to use in NetFlow messages. Defaults to datapath
5000 index if not specified.
5001 </column>
5002
5003 <column name="active_timeout">
5004 <p>
5005 The interval at which NetFlow records are sent for flows that
5006 are still active, in seconds. A value of <code>0</code>
5007 requests the default timeout (currently 600 seconds); a value
5008 of <code>-1</code> disables active timeouts.
5009 </p>
5010
5011 <p>
5012 The NetFlow passive timeout, for flows that become inactive,
5013 is not configurable. It will vary depending on the Open
5014 vSwitch version, the forms and contents of the OpenFlow flow
5015 tables, CPU and memory usage, and network activity. A typical
5016 passive timeout is about a second.
5017 </p>
5018 </column>
5019
5020 <column name="add_id_to_interface">
5021 <p>If this column's value is <code>false</code>, the ingress and egress
5022 interface fields of NetFlow flow records are derived from OpenFlow port
5023 numbers. When it is <code>true</code>, the 7 most significant bits of
5024 these fields will be replaced by the least significant 7 bits of the
5025 engine id. This is useful because many NetFlow collectors do not
5026 expect multiple switches to be sending messages from the same host, so
5027 they do not store the engine information which could be used to
5028 disambiguate the traffic.</p>
5029 <p>When this option is enabled, a maximum of 508 ports are supported.</p>
5030 </column>
5031
5032 <group title="Common Columns">
5033 The overall purpose of these columns is described under <code>Common
5034 Columns</code> at the beginning of this document.
5035
5036 <column name="external_ids"/>
5037 </group>
5038 </table>
5039
5040 <table name="SSL">
5041 SSL configuration for an Open_vSwitch.
5042
5043 <column name="private_key">
5044 Name of a PEM file containing the private key used as the switch's
5045 identity for SSL connections to the controller.
5046 </column>
5047
5048 <column name="certificate">
5049 Name of a PEM file containing a certificate, signed by the
5050 certificate authority (CA) used by the controller and manager,
5051 that certifies the switch's private key, identifying a trustworthy
5052 switch.
5053 </column>
5054
5055 <column name="ca_cert">
5056 Name of a PEM file containing the CA certificate used to verify
5057 that the switch is connected to a trustworthy controller.
5058 </column>
5059
5060 <column name="bootstrap_ca_cert">
5061 If set to <code>true</code>, then Open vSwitch will attempt to
5062 obtain the CA certificate from the controller on its first SSL
5063 connection and save it to the named PEM file. If it is successful,
5064 it will immediately drop the connection and reconnect, and from then
5065 on all SSL connections must be authenticated by a certificate signed
5066 by the CA certificate thus obtained. <em>This option exposes the
5067 SSL connection to a man-in-the-middle attack obtaining the initial
5068 CA certificate.</em> It may still be useful for bootstrapping.
5069 </column>
5070
5071 <group title="Common Columns">
5072 The overall purpose of these columns is described under <code>Common
5073 Columns</code> at the beginning of this document.
5074
5075 <column name="external_ids"/>
5076 </group>
5077 </table>
5078
5079 <table name="sFlow">
5080 <p>A set of sFlow(R) targets. sFlow is a protocol for remote
5081 monitoring of switches.</p>
5082
5083 <column name="agent">
5084 Name of the network device whose IP address should be reported as the
5085 ``agent address'' to collectors. If not specified, the agent device is
5086 figured from the first target address and the routing table. If the
5087 routing table does not contain a route to the target, the IP address
5088 defaults to the <ref table="Controller" column="local_ip"/> in the
5089 collector's <ref table="Controller"/>. If an agent IP address cannot be
5090 determined any of these ways, sFlow is disabled.
5091 </column>
5092
5093 <column name="header">
5094 Number of bytes of a sampled packet to send to the collector.
5095 If not specified, the default is 128 bytes.
5096 </column>
5097
5098 <column name="polling">
5099 Polling rate in seconds to send port statistics to the collector.
5100 If not specified, defaults to 30 seconds.
5101 </column>
5102
5103 <column name="sampling">
5104 Rate at which packets should be sampled and sent to the collector.
5105 If not specified, defaults to 400, which means one out of 400
5106 packets, on average, will be sent to the collector.
5107 </column>
5108
5109 <column name="targets">
5110 sFlow targets in the form
5111 <code><var>ip</var>:<var>port</var></code>.
5112 </column>
5113
5114 <group title="Common Columns">
5115 The overall purpose of these columns is described under <code>Common
5116 Columns</code> at the beginning of this document.
5117
5118 <column name="external_ids"/>
5119 </group>
5120 </table>
5121
5122 <table name="IPFIX">
5123 <p>Configuration for sending packets to IPFIX collectors.</p>
5124
5125 <p>
5126 IPFIX is a protocol that exports a number of details about flows. The
5127 IPFIX implementation in Open vSwitch samples packets at a configurable
5128 rate, extracts flow information from those packets, optionally caches and
5129 aggregates the flow information, and sends the result to one or more
5130 collectors.
5131 </p>
5132
5133 <p>
5134 IPFIX in Open vSwitch can be configured two different ways:
5135 </p>
5136
5137 <ul>
5138 <li>
5139 With <em>per-bridge sampling</em>, Open vSwitch performs IPFIX sampling
5140 automatically on all packets that pass through a bridge. To configure
5141 per-bridge sampling, create an <ref table="IPFIX"/> record and point a
5142 <ref table="Bridge"/> table's <ref table="Bridge" column="ipfix"/>
5143 column to it. The <ref table="Flow_Sample_Collector_Set"/> table is
5144 not used for per-bridge sampling.
5145 </li>
5146
5147 <li>
5148 <p>
5149 With <em>flow-based sampling</em>, <code>sample</code> actions in the
5150 OpenFlow flow table drive IPFIX sampling. See
5151 <code>ovs-ofctl</code>(8) for a description of the
5152 <code>sample</code> action.
5153 </p>
5154
5155 <p>
5156 Flow-based sampling also requires database configuration: create a
5157 <ref table="IPFIX"/> record that describes the IPFIX configuration
5158 and a <ref table="Flow_Sample_Collector_Set"/> record that points to
5159 the <ref table="Bridge"/> whose flow table holds the
5160 <code>sample</code> actions and to <ref table="IPFIX"/> record. The
5161 <ref table="Bridge" column="ipfix"/> in the <ref table="Bridge"/>
5162 table is not used for flow-based sampling.
5163 </p>
5164 </li>
5165 </ul>
5166
5167 <column name="targets">
5168 IPFIX target collectors in the form
5169 <code><var>ip</var>:<var>port</var></code>.
5170 </column>
5171
5172 <column name="cache_active_timeout">
5173 The maximum period in seconds for which an IPFIX flow record is
5174 cached and aggregated before being sent. If not specified,
5175 defaults to 0. If 0, caching is disabled.
5176 </column>
5177
5178 <column name="cache_max_flows">
5179 The maximum number of IPFIX flow records that can be cached at a
5180 time. If not specified, defaults to 0. If 0, caching is
5181 disabled.
5182 </column>
5183
5184 <column name="other_config" key="enable-tunnel-sampling"
5185 type='{"type": "boolean"}'>
5186 <p>
5187 Set to <code>true</code> to enable sampling and reporting tunnel
5188 header 7-tuples in IPFIX flow records. Tunnel sampling is enabled
5189 by default.
5190 </p>
5191
5192 <p>
5193 The following enterprise entities report the sampled tunnel info:
5194 </p>
5195
5196 <dl>
5197 <dt>tunnelType:</dt>
5198 <dd>
5199 <p>ID: 891, and enterprise ID 6876 (VMware).</p>
5200 <p>type: unsigned 8-bit integer.</p>
5201 <p>data type semantics: identifier.</p>
5202 <p>description: Identifier of the layer 2 network overlay network
5203 encapsulation type: 0x01 VxLAN, 0x02 GRE, 0x03 LISP, 0x07 GENEVE.</p>
5204 </dd>
5205 <dt>tunnelKey:</dt>
5206 <dd>
5207 <p>ID: 892, and enterprise ID 6876 (VMware).</p>
5208 <p>type: variable-length octetarray.</p>
5209 <p>data type semantics: identifier.</p>
5210 <p>description: Key which is used for identifying an individual
5211 traffic flow within a VxLAN (24-bit VNI), GENEVE (24-bit VNI),
5212 GRE (32-bit key), or LISP (24-bit instance ID) tunnel. The
5213 key is encoded in this octetarray as a 3-, 4-, or 8-byte integer
5214 ID in network byte order.</p>
5215 </dd>
5216 <dt>tunnelSourceIPv4Address:</dt>
5217 <dd>
5218 <p>ID: 893, and enterprise ID 6876 (VMware).</p>
5219 <p>type: unsigned 32-bit integer.</p>
5220 <p>data type semantics: identifier.</p>
5221 <p>description: The IPv4 source address in the tunnel IP packet
5222 header.</p>
5223 </dd>
5224 <dt>tunnelDestinationIPv4Address:</dt>
5225 <dd>
5226 <p>ID: 894, and enterprise ID 6876 (VMware).</p>
5227 <p>type: unsigned 32-bit integer.</p>
5228 <p>data type semantics: identifier.</p>
5229 <p>description: The IPv4 destination address in the tunnel IP
5230 packet header.</p>
5231 </dd>
5232 <dt>tunnelProtocolIdentifier:</dt>
5233 <dd>
5234 <p>ID: 895, and enterprise ID 6876 (VMware).</p>
5235 <p>type: unsigned 8-bit integer.</p>
5236 <p>data type semantics: identifier.</p>
5237 <p>description: The value of the protocol number in the tunnel
5238 IP packet header. The protocol number identifies the tunnel IP
5239 packet payload type.</p>
5240 </dd>
5241 <dt>tunnelSourceTransportPort:</dt>
5242 <dd>
5243 <p>ID: 896, and enterprise ID 6876 (VMware).</p>
5244 <p>type: unsigned 16-bit integer.</p>
5245 <p>data type semantics: identifier.</p>
5246 <p>description: The source port identifier in the tunnel transport
5247 header. For the transport protocols UDP, TCP, and SCTP, this is
5248 the source port number given in the respective header.</p>
5249 </dd>
5250 <dt>tunnelDestinationTransportPort:</dt>
5251 <dd>
5252 <p>ID: 897, and enterprise ID 6876 (VMware).</p>
5253 <p>type: unsigned 16-bit integer.</p>
5254 <p>data type semantics: identifier.</p>
5255 <p>description: The destination port identifier in the tunnel
5256 transport header. For the transport protocols UDP, TCP, and SCTP,
5257 this is the destination port number given in the respective header.
5258 </p>
5259 </dd>
5260 </dl>
5261
5262 <p>
5263 Before Open vSwitch 2.5.90, <ref column="other_config"
5264 key="enable-tunnel-sampling"/> was only supported with per-bridge
5265 sampling, and ignored otherwise. Open vSwitch 2.5.90 and later support
5266 <ref column="other_config" key="enable-tunnel-sampling"/> for
5267 per-bridge and per-flow sampling.
5268 </p>
5269 </column>
5270
5271 <column name="other_config" key="virtual_obs_id"
5272 type='{"type": "string"}'>
5273 <p>
5274 A string that accompanies each IPFIX flow record. Its intended use is
5275 for the ``virtual observation ID,'' an identifier of a virtual
5276 observation point that is locally unique in a virtual network. It
5277 describes a location in the virtual network where IP packets can be
5278 observed. The maximum length is 254 bytes. If not specified, the
5279 field is omitted from the IPFIX flow record.
5280 </p>
5281
5282 <p>
5283 The following enterprise entity reports the specified virtual
5284 observation ID:
5285 </p>
5286
5287 <dl>
5288 <dt>virtualObsID:</dt>
5289 <dd>
5290 <p>ID: 898, and enterprise ID 6876 (VMware).</p>
5291 <p>type: variable-length string.</p>
5292 <p>data type semantics: identifier.</p>
5293 <p>description: A virtual observation domain ID that is locally
5294 unique in a virtual network.
5295 </p>
5296 </dd>
5297 </dl>
5298
5299 <p>
5300 This feature was introduced in Open vSwitch 2.5.90.
5301 </p>
5302 </column>
5303
5304 <group title="Per-Bridge Sampling">
5305 <p>
5306 These values affect only per-bridge sampling. See above for a
5307 description of the differences between per-bridge and flow-based
5308 sampling.
5309 </p>
5310
5311 <column name="sampling">
5312 The rate at which packets should be sampled and sent to each target
5313 collector. If not specified, defaults to 400, which means one out of
5314 400 packets, on average, will be sent to each target collector.
5315 </column>
5316
5317 <column name="obs_domain_id">
5318 The IPFIX Observation Domain ID sent in each IPFIX packet. If not
5319 specified, defaults to 0.
5320 </column>
5321
5322 <column name="obs_point_id">
5323 The IPFIX Observation Point ID sent in each IPFIX flow record. If not
5324 specified, defaults to 0.
5325 </column>
5326
5327 <column name="other_config" key="enable-input-sampling"
5328 type='{"type": "boolean"}'>
5329 By default, Open vSwitch samples and reports flows at bridge port input
5330 in IPFIX flow records. Set this column to <code>false</code> to
5331 disable input sampling.
5332 </column>
5333
5334 <column name="other_config" key="enable-output-sampling"
5335 type='{"type": "boolean"}'>
5336 By default, Open vSwitch samples and reports flows at bridge port
5337 output in IPFIX flow records. Set this column to <code>false</code> to
5338 disable output sampling.
5339 </column>
5340 </group>
5341
5342 <group title="Common Columns">
5343 The overall purpose of these columns is described under <code>Common
5344 Columns</code> at the beginning of this document.
5345
5346 <column name="external_ids"/>
5347 </group>
5348 </table>
5349
5350 <table name="Flow_Sample_Collector_Set">
5351 <p>
5352 A set of IPFIX collectors of packet samples generated by OpenFlow
5353 <code>sample</code> actions. This table is used only for IPFIX
5354 flow-based sampling, not for per-bridge sampling (see the <ref
5355 table="IPFIX"/> table for a description of the two forms).
5356 </p>
5357
5358 <column name="id">
5359 The ID of this collector set, unique among the bridge's
5360 collector sets, to be used as the <code>collector_set_id</code>
5361 in OpenFlow <code>sample</code> actions.
5362 </column>
5363
5364 <column name="bridge">
5365 The bridge into which OpenFlow <code>sample</code> actions can
5366 be added to send packet samples to this set of IPFIX collectors.
5367 </column>
5368
5369 <column name="ipfix">
5370 Configuration of the set of IPFIX collectors to send one flow
5371 record per sampled packet to.
5372 </column>
5373
5374 <group title="Common Columns">
5375 The overall purpose of these columns is described under <code>Common
5376 Columns</code> at the beginning of this document.
5377
5378 <column name="external_ids"/>
5379 </group>
5380 </table>
5381
5382 <table name="AutoAttach">
5383 <p>
5384 Auto Attach configuration within a bridge. The IETF Auto-Attach SPBM
5385 draft standard describes a compact method of using IEEE 802.1AB Link
5386 Layer Discovery Protocol (LLDP) together with a IEEE 802.1aq Shortest
5387 Path Bridging (SPB) network to automatically attach network devices
5388 to individual services in a SPB network. The intent here is to allow
5389 network applications and devices using OVS to be able to easily take
5390 advantage of features offered by industry standard SPB networks.
5391 </p>
5392
5393 <p>
5394 Auto Attach (AA) uses LLDP to communicate between a directly connected
5395 Auto Attach Client (AAC) and Auto Attach Server (AAS). The LLDP protocol
5396 is extended to add two new Type-Length-Value tuples (TLVs). The first
5397 new TLV supports the ongoing discovery of directly connected AA
5398 correspondents. Auto Attach operates by regularly transmitting AA
5399 discovery TLVs between the AA client and AA server. By exchanging these
5400 discovery messages, both the AAC and AAS learn the system name and
5401 system description of their peer. In the OVS context, OVS operates as
5402 the AA client and the AA server resides on a switch at the edge of the
5403 SPB network.
5404 </p>
5405
5406 <p>
5407 Once AA discovery has been completed the AAC then uses the second new TLV
5408 to deliver identifier mappings from the AAC to the AAS. A primary feature
5409 of Auto Attach is to facilitate the mapping of VLANs defined outside the
5410 SPB network onto service ids (ISIDs) defined within the SPM network. By
5411 doing so individual external VLANs can be mapped onto specific SPB
5412 network services. These VLAN id to ISID mappings can be configured and
5413 managed locally using new options added to the ovs-vsctl command.
5414 </p>
5415
5416 <p>
5417 The Auto Attach OVS feature does not provide a full implementation of
5418 the LLDP protocol. Support for the mandatory TLVs as defined by the LLDP
5419 standard and support for the AA TLV extensions is provided. LLDP
5420 protocol support in OVS can be enabled or disabled on a port by port
5421 basis. LLDP support is disabled by default.
5422 </p>
5423
5424 <column name="system_name">
5425 The system_name string is exported in LLDP messages. It should uniquely
5426 identify the bridge in the network.
5427 </column>
5428
5429 <column name="system_description">
5430 The system_description string is exported in LLDP messages. It should
5431 describe the type of software and hardware.
5432 </column>
5433
5434 <column name="mappings">
5435 A mapping from SPB network Individual Service Identifier (ISID) to VLAN
5436 id.
5437 </column>
5438 </table>
5439 </database>