]> git.proxmox.com Git - ovs.git/blob - ovn/ovn-sb.xml
5704f414721ad051f24f64c79aa149ec537ed0c0
[ovs.git] / ovn / ovn-sb.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <database name="ovn-sb" title="OVN Southbound Database">
3 <p>
4 This database holds logical and physical configuration and state for the
5 Open Virtual Network (OVN) system to support virtual network abstraction.
6 For an introduction to OVN, please see <code>ovn-architecture</code>(7).
7 </p>
8
9 <p>
10 The OVN Southbound database sits at the center of the OVN
11 architecture. It is the one component that speaks both southbound
12 directly to all the hypervisors and gateways, via
13 <code>ovn-controller</code>/<code>ovn-controller-vtep</code>, and
14 northbound to the Cloud Management System, via <code>ovn-northd</code>:
15 </p>
16
17 <h2>Database Structure</h2>
18
19 <p>
20 The OVN Southbound database contains classes of data with
21 different properties, as described in the sections below.
22 </p>
23
24 <h3>Physical Network (PN) data</h3>
25
26 <p>
27 PN tables contain information about the chassis nodes in the system. This
28 contains all the information necessary to wire the overlay, such as IP
29 addresses, supported tunnel types, and security keys.
30 </p>
31
32 <p>
33 The amount of PN data is small (O(n) in the number of chassis) and it
34 changes infrequently, so it can be replicated to every chassis.
35 </p>
36
37 <p>
38 The <ref table="Chassis"/> table comprises the PN tables.
39 </p>
40
41 <h3>Logical Network (LN) data</h3>
42
43 <p>
44 LN tables contain the topology of logical switches and routers, ACLs,
45 firewall rules, and everything needed to describe how packets traverse a
46 logical network, represented as logical datapath flows (see Logical
47 Datapath Flows, below).
48 </p>
49
50 <p>
51 LN data may be large (O(n) in the number of logical ports, ACL rules,
52 etc.). Thus, to improve scaling, each chassis should receive only data
53 related to logical networks in which that chassis participates. Past
54 experience shows that in the presence of large logical networks, even
55 finer-grained partitioning of data, e.g. designing logical flows so that
56 only the chassis hosting a logical port needs related flows, pays off
57 scale-wise. (This is not necessary initially but it is worth bearing in
58 mind in the design.)
59 </p>
60
61 <p>
62 The LN is a slave of the cloud management system running northbound of OVN.
63 That CMS determines the entire OVN logical configuration and therefore the
64 LN's content at any given time is a deterministic function of the CMS's
65 configuration, although that happens indirectly via the
66 <ref db="OVN_Northbound"/> database and <code>ovn-northd</code>.
67 </p>
68
69 <p>
70 LN data is likely to change more quickly than PN data. This is especially
71 true in a container environment where VMs are created and destroyed (and
72 therefore added to and deleted from logical switches) quickly.
73 </p>
74
75 <p>
76 <ref table="Logical_Flow"/> and <ref table="Multicast_Group"/> contain LN
77 data.
78 </p>
79
80 <h3>Logical-physical bindings</h3>
81
82 <p>
83 These tables link logical and physical components. They show the current
84 placement of logical components (such as VMs and VIFs) onto chassis, and
85 map logical entities to the values that represent them in tunnel
86 encapsulations.
87 </p>
88
89 <p>
90 These tables change frequently, at least every time a VM powers up or down
91 or migrates, and especially quickly in a container environment. The
92 amount of data per VM (or VIF) is small.
93 </p>
94
95 <p>
96 Each chassis is authoritative about the VMs and VIFs that it hosts at any
97 given time and can efficiently flood that state to a central location, so
98 the consistency needs are minimal.
99 </p>
100
101 <p>
102 The <ref table="Port_Binding"/> and <ref table="Datapath_Binding"/> tables
103 contain binding data.
104 </p>
105
106 <h3>MAC bindings</h3>
107
108 <p>
109 The <ref table="MAC_Binding"/> table tracks the bindings from IP addresses
110 to Ethernet addresses that are dynamically discovered using ARP (for IPv4)
111 and neighbor discovery (for IPv6). Usually, IP-to-MAC bindings for virtual
112 machines are statically populated into the <ref table="Port_Binding"/>
113 table, so <ref table="MAC_Binding"/> is primarily used to discover bindings
114 on physical networks.
115 </p>
116
117 <h2>Common Columns</h2>
118
119 <p>
120 Some tables contain a special column named <code>external_ids</code>. This
121 column has the same form and purpose each place that it appears, so we
122 describe it here to save space later.
123 </p>
124
125 <dl>
126 <dt><code>external_ids</code>: map of string-string pairs</dt>
127 <dd>
128 Key-value pairs for use by the software that manages the OVN Southbound
129 database rather than by
130 <code>ovn-controller</code>/<code>ovn-controller-vtep</code>. In
131 particular, <code>ovn-northd</code> can use key-value pairs in this
132 column to relate entities in the southbound database to higher-level
133 entities (such as entities in the OVN Northbound database). Individual
134 key-value pairs in this column may be documented in some cases to aid
135 in understanding and troubleshooting, but the reader should not mistake
136 such documentation as comprehensive.
137 </dd>
138 </dl>
139
140 <table name="SB_Global" title="Southbound configuration">
141 <p>
142 Southbound configuration for an OVN system. This table must have exactly
143 one row.
144 </p>
145
146 <group title="Status">
147 This column allow a client to track the overall configuration state of
148 the system.
149
150 <column name="nb_cfg">
151 Sequence number for the configuration. When a CMS or
152 <code>ovn-nbctl</code> updates the northbound database, it increments
153 the <code>nb_cfg</code> column in the <code>NB_Global</code> table in
154 the northbound database. In turn, when <code>ovn-northd</code> updates
155 the southbound database to bring it up to date with these changes, it
156 updates this column to the same value.
157 </column>
158 </group>
159
160 <group title="Common Columns">
161 <column name="external_ids">
162 See <em>External IDs</em> at the beginning of this document.
163 </column>
164 </group>
165 <group title="Connection Options">
166 <column name="connections">
167 Database clients to which the Open vSwitch database server should
168 connect or on which it should listen, along with options for how these
169 connections should be configured. See the <ref table="Connection"/>
170 table for more information.
171 </column>
172 <column name="ssl">
173 Global SSL configuration.
174 </column>
175 </group>
176 </table>
177
178 <table name="Chassis" title="Physical Network Hypervisor and Gateway Information">
179 <p>
180 Each row in this table represents a hypervisor or gateway (a chassis) in
181 the physical network (PN). Each chassis, via
182 <code>ovn-controller</code>/<code>ovn-controller-vtep</code>, adds
183 and updates its own row, and keeps a copy of the remaining rows to
184 determine how to reach other hypervisors.
185 </p>
186
187 <p>
188 When a chassis shuts down gracefully, it should remove its own row.
189 (This is not critical because resources hosted on the chassis are equally
190 unreachable regardless of whether the row is present.) If a chassis
191 shuts down permanently without removing its row, some kind of manual or
192 automatic cleanup is eventually needed; we can devise a process for that
193 as necessary.
194 </p>
195
196 <column name="name">
197 OVN does not prescribe a particular format for chassis names.
198 ovn-controller populates this column using <ref key="system-id"
199 table="Open_vSwitch" column="external_ids" db="Open_vSwitch"/>
200 in the Open_vSwitch database's <ref table="Open_vSwitch"
201 db="Open_vSwitch"/> table. ovn-controller-vtep populates this
202 column with <ref table="Physical_Switch" column="name"
203 db="hardware_vtep"/> in the hardware_vtep database's
204 <ref table="Physical_Switch" db="hardware_vtep"/> table.
205 </column>
206
207 <column name="hostname">
208 The hostname of the chassis, if applicable. ovn-controller will populate
209 this column with the hostname of the host it is running on.
210 ovn-controller-vtep will leave this column empty.
211 </column>
212
213 <column name="nb_cfg">
214 Sequence number for the configuration. When <code>ovn-controller</code>
215 updates the configuration of a chassis from the contents of the
216 southbound database, it copies <ref table="SB_Global" column="nb_cfg"/>
217 from the <ref table="SB_Global"/> table into this column.
218 </column>
219
220 <column name="external_ids" key="ovn-bridge-mappings">
221 <code>ovn-controller</code> populates this key with the set of bridge
222 mappings it has been configured to use. Other applications should treat
223 this key as read-only. See <code>ovn-controller</code>(8) for more
224 information.
225 </column>
226
227 <column name="external_ids" key="datapath-type">
228 <code>ovn-controller</code> populates this key with the datapath type
229 configured in the <ref table="Bridge" column="datapath_type"/> column of
230 the Open_vSwitch database's <ref table="Bridge" db="Open_vSwitch"/>
231 table. Other applications should treat this key as read-only. See
232 <code>ovn-controller</code>(8) for more information.
233 </column>
234
235 <column name="external_ids" key="iface-types">
236 <code>ovn-controller</code> populates this key with the interface types
237 configured in the <ref table="Open_vSwitch" column="iface_types"/> column
238 of the Open_vSwitch database's <ref table="Open_vSwitch"
239 db="Open_vSwitch"/> table. Other applications should treat this key as
240 read-only. See <code>ovn-controller</code>(8) for more information.
241 </column>
242
243 <group title="Common Columns">
244 The overall purpose of these columns is described under <code>Common
245 Columns</code> at the beginning of this document.
246
247 <column name="external_ids"/>
248 </group>
249
250 <group title="Encapsulation Configuration">
251 <p>
252 OVN uses encapsulation to transmit logical dataplane packets
253 between chassis.
254 </p>
255
256 <column name="encaps">
257 Points to supported encapsulation configurations to transmit
258 logical dataplane packets to this chassis. Each entry is a <ref
259 table="Encap"/> record that describes the configuration.
260 </column>
261 </group>
262
263 <group title="Gateway Configuration">
264 <p>
265 A <dfn>gateway</dfn> is a chassis that forwards traffic between the
266 OVN-managed part of a logical network and a physical VLAN, extending a
267 tunnel-based logical network into a physical network. Gateways are
268 typically dedicated nodes that do not host VMs and will be controlled
269 by <code>ovn-controller-vtep</code>.
270 </p>
271
272 <column name="vtep_logical_switches">
273 Stores all VTEP logical switch names connected by this gateway
274 chassis. The <ref table="Port_Binding"/> table entry with
275 <ref column="options" table="Port_Binding"/>:<code>vtep-physical-switch</code>
276 equal <ref table="Chassis"/> <ref column="name" table="Chassis"/>, and
277 <ref column="options" table="Port_Binding"/>:<code>vtep-logical-switch</code>
278 value in <ref table="Chassis"/>
279 <ref column="vtep_logical_switches" table="Chassis"/>, will be
280 associated with this <ref table="Chassis"/>.
281 </column>
282 </group>
283 </table>
284
285 <table name="Encap" title="Encapsulation Types">
286 <p>
287 The <ref column="encaps" table="Chassis"/> column in the <ref
288 table="Chassis"/> table refers to rows in this table to identify
289 how OVN may transmit logical dataplane packets to this chassis.
290 Each chassis, via <code>ovn-controller</code>(8) or
291 <code>ovn-controller-vtep</code>(8), adds and updates its own rows
292 and keeps a copy of the remaining rows to determine how to reach
293 other chassis.
294 </p>
295
296 <column name="type">
297 The encapsulation to use to transmit packets to this chassis.
298 Hypervisors must use either <code>geneve</code> or
299 <code>stt</code>. Gateways may use <code>vxlan</code>,
300 <code>geneve</code>, or <code>stt</code>.
301 </column>
302
303 <column name="options">
304 <p>
305 Options for configuring the encapsulation. Currently, the only
306 option that has been defined is <code>csum</code>.
307 </p>
308
309 <p>
310 <code>csum</code> indicates that encapsulation checksums can be
311 transmitted and received with reasonable performance. It is a hint
312 to senders transmitting data to this chassis that they should use
313 checksums to protect OVN metadata. Set to <code>true</code> to enable
314 or <code>false</code> to disable.
315 </p>
316
317 <p>
318 In terms of performance, this actually significantly increases
319 throughput in most common cases when running on Linux based hosts
320 without NICs supporting encapsulation hardware offload (around 60% for
321 bulk traffic). The reason is that generally all NICs are capable of
322 offloading transmitted and received TCP/UDP checksums (viewed as
323 ordinary data packets and not as tunnels). The benefit comes on the
324 receive side where the validated outer checksum can be used to
325 additionally validate an inner checksum (such as TCP), which in turn
326 allows aggregation of packets to be more efficiently handled by the
327 rest of the stack.
328 </p>
329
330 <p>
331 Not all devices see such a benefit. The most notable exception is
332 hardware VTEPs. These devices are designed to not buffer entire
333 packets in their switching engines and are therefore unable to
334 efficiently compute or validate full packet checksums. In addition
335 certain versions of the Linux kernel are not able to fully take
336 advantage of encapsulation NIC offloads in the presence of checksums.
337 (This is actually a pretty narrow corner case though - earlier
338 versions of Linux don't support encapsulation offloads at all and
339 later versions support both offloads and checksums well.)
340 </p>
341
342 <p>
343 <code>csum</code> defaults to <code>false</code> for hardware VTEPs and
344 <code>true</code> for all other cases.
345 </p>
346 </column>
347
348 <column name="ip">
349 The IPv4 address of the encapsulation tunnel endpoint.
350 </column>
351 </table>
352
353 <table name="Address_Set" title="Address Sets">
354 <p>
355 See the documentation for the <ref table="Address_Set"
356 db="OVN_Northbound"/> table in the <ref db="OVN_Northbound"/> database
357 for details.
358 </p>
359
360 <column name="name"/>
361 <column name="addresses"/>
362 </table>
363
364 <table name="Logical_Flow" title="Logical Network Flows">
365 <p>
366 Each row in this table represents one logical flow.
367 <code>ovn-northd</code> populates this table with logical flows
368 that implement the L2 and L3 topologies specified in the
369 <ref db="OVN_Northbound"/> database. Each hypervisor, via
370 <code>ovn-controller</code>, translates the logical flows into
371 OpenFlow flows specific to its hypervisor and installs them into
372 Open vSwitch.
373 </p>
374
375 <p>
376 Logical flows are expressed in an OVN-specific format, described here. A
377 logical datapath flow is much like an OpenFlow flow, except that the
378 flows are written in terms of logical ports and logical datapaths instead
379 of physical ports and physical datapaths. Translation between logical
380 and physical flows helps to ensure isolation between logical datapaths.
381 (The logical flow abstraction also allows the OVN centralized
382 components to do less work, since they do not have to separately
383 compute and push out physical flows to each chassis.)
384 </p>
385
386 <p>
387 The default action when no flow matches is to drop packets.
388 </p>
389
390 <p><em>Architectural Logical Life Cycle of a Packet</em></p>
391
392 <p>
393 This following description focuses on the life cycle of a packet through
394 a logical datapath, ignoring physical details of the implementation.
395 Please refer to <em>Architectural Physical Life Cycle of a Packet</em> in
396 <code>ovn-architecture</code>(7) for the physical information.
397 </p>
398
399 <p>
400 The description here is written as if OVN itself executes these steps,
401 but in fact OVN (that is, <code>ovn-controller</code>) programs Open
402 vSwitch, via OpenFlow and OVSDB, to execute them on its behalf.
403 </p>
404
405 <p>
406 At a high level, OVN passes each packet through the logical datapath's
407 logical ingress pipeline, which may output the packet to one or more
408 logical port or logical multicast groups. For each such logical output
409 port, OVN passes the packet through the datapath's logical egress
410 pipeline, which may either drop the packet or deliver it to the
411 destination. Between the two pipelines, outputs to logical multicast
412 groups are expanded into logical ports, so that the egress pipeline only
413 processes a single logical output port at a time. Between the two
414 pipelines is also where, when necessary, OVN encapsulates a packet in a
415 tunnel (or tunnels) to transmit to remote hypervisors.
416 </p>
417
418 <p>
419 In more detail, to start, OVN searches the <ref table="Logical_Flow"/>
420 table for a row with correct <ref column="logical_datapath"/>, a <ref
421 column="pipeline"/> of <code>ingress</code>, a <ref column="table_id"/>
422 of 0, and a <ref column="match"/> that is true for the packet. If none
423 is found, OVN drops the packet. If OVN finds more than one, it chooses
424 the match with the highest <ref column="priority"/>. Then OVN executes
425 each of the actions specified in the row's <ref table="actions"/> column,
426 in the order specified. Some actions, such as those to modify packet
427 headers, require no further details. The <code>next</code> and
428 <code>output</code> actions are special.
429 </p>
430
431 <p>
432 The <code>next</code> action causes the above process to be repeated
433 recursively, except that OVN searches for <ref column="table_id"/> of 1
434 instead of 0. Similarly, any <code>next</code> action in a row found in
435 that table would cause a further search for a <ref column="table_id"/> of
436 2, and so on. When recursive processing completes, flow control returns
437 to the action following <code>next</code>.
438 </p>
439
440 <p>
441 The <code>output</code> action also introduces recursion. Its effect
442 depends on the current value of the <code>outport</code> field. Suppose
443 <code>outport</code> designates a logical port. First, OVN compares
444 <code>inport</code> to <code>outport</code>; if they are equal, it treats
445 the <code>output</code> as a no-op by default. In the common
446 case, where they are different, the packet enters the egress
447 pipeline. This transition to the egress pipeline discards
448 register data, e.g. <code>reg0</code> ... <code>reg9</code> and
449 connection tracking state, to achieve uniform behavior regardless
450 of whether the egress pipeline is on a different hypervisor
451 (because registers aren't preserve across tunnel encapsulation).
452 </p>
453
454 <p>
455 To execute the egress pipeline, OVN again searches the <ref
456 table="Logical_Flow"/> table for a row with correct <ref
457 column="logical_datapath"/>, a <ref column="table_id"/> of 0, a <ref
458 column="match"/> that is true for the packet, but now looking for a <ref
459 column="pipeline"/> of <code>egress</code>. If no matching row is found,
460 the output becomes a no-op. Otherwise, OVN executes the actions for the
461 matching flow (which is chosen from multiple, if necessary, as already
462 described).
463 </p>
464
465 <p>
466 In the <code>egress</code> pipeline, the <code>next</code> action acts as
467 already described, except that it, of course, searches for
468 <code>egress</code> flows. The <code>output</code> action, however, now
469 directly outputs the packet to the output port (which is now fixed,
470 because <code>outport</code> is read-only within the egress pipeline).
471 </p>
472
473 <p>
474 The description earlier assumed that <code>outport</code> referred to a
475 logical port. If it instead designates a logical multicast group, then
476 the description above still applies, with the addition of fan-out from
477 the logical multicast group to each logical port in the group. For each
478 member of the group, OVN executes the logical pipeline as described, with
479 the logical output port replaced by the group member.
480 </p>
481
482 <p><em>Pipeline Stages</em></p>
483
484 <p>
485 <code>ovn-northd</code> populates the <ref table="Logical_Flow"/> table
486 with the logical flows described in detail in <code>ovn-northd</code>(8).
487 </p>
488
489 <column name="logical_datapath">
490 The logical datapath to which the logical flow belongs.
491 </column>
492
493 <column name="pipeline">
494 <p>
495 The primary flows used for deciding on a packet's destination are the
496 <code>ingress</code> flows. The <code>egress</code> flows implement
497 ACLs. See <em>Logical Life Cycle of a Packet</em>, above, for details.
498 </p>
499 </column>
500
501 <column name="table_id">
502 The stage in the logical pipeline, analogous to an OpenFlow table number.
503 </column>
504
505 <column name="priority">
506 The flow's priority. Flows with numerically higher priority take
507 precedence over those with lower. If two logical datapath flows with the
508 same priority both match, then the one actually applied to the packet is
509 undefined.
510 </column>
511
512 <column name="match">
513 <p>
514 A matching expression. OVN provides a superset of OpenFlow matching
515 capabilities, using a syntax similar to Boolean expressions in a
516 programming language.
517 </p>
518
519 <p>
520 The most important components of match expression are
521 <dfn>comparisons</dfn> between <dfn>symbols</dfn> and
522 <dfn>constants</dfn>, e.g. <code>ip4.dst == 192.168.0.1</code>,
523 <code>ip.proto == 6</code>, <code>arp.op == 1</code>, <code>eth.type ==
524 0x800</code>. The logical AND operator <code>&amp;&amp;</code> and
525 logical OR operator <code>||</code> can combine comparisons into a
526 larger expression.
527 </p>
528
529 <p>
530 Matching expressions also support parentheses for grouping, the logical
531 NOT prefix operator <code>!</code>, and literals <code>0</code> and
532 <code>1</code> to express ``false'' or ``true,'' respectively. The
533 latter is useful by itself as a catch-all expression that matches every
534 packet.
535 </p>
536
537 <p>
538 Match expressions also support a kind of function syntax. The
539 following functions are supported:
540 </p>
541
542 <dl>
543 <dt><code>is_chassis_resident(<var>lport</var>)</code></dt>
544 <dd>
545 Evaluates to true on a chassis on which logical port <var>lport</var>
546 (a quoted string) resides, and to false elsewhere. This function was
547 introduced in OVN 2.7.
548 </dd>
549 </dl>
550
551 <p><em>Symbols</em></p>
552
553 <p>
554 <em>Type</em>. Symbols have <dfn>integer</dfn> or <dfn>string</dfn>
555 type. Integer symbols have a <dfn>width</dfn> in bits.
556 </p>
557
558 <p>
559 <em>Kinds</em>. There are three kinds of symbols:
560 </p>
561
562 <ul>
563 <li>
564 <p>
565 <dfn>Fields</dfn>. A field symbol represents a packet header or
566 metadata field. For example, a field
567 named <code>vlan.tci</code> might represent the VLAN TCI field in a
568 packet.
569 </p>
570
571 <p>
572 A field symbol can have integer or string type. Integer fields can
573 be nominal or ordinal (see <em>Level of Measurement</em>,
574 below).
575 </p>
576 </li>
577
578 <li>
579 <p>
580 <dfn>Subfields</dfn>. A subfield represents a subset of bits from
581 a larger field. For example, a field <code>vlan.vid</code> might
582 be defined as an alias for <code>vlan.tci[0..11]</code>. Subfields
583 are provided for syntactic convenience, because it is always
584 possible to instead refer to a subset of bits from a field
585 directly.
586 </p>
587
588 <p>
589 Only ordinal fields (see <em>Level of Measurement</em>,
590 below) may have subfields. Subfields are always ordinal.
591 </p>
592 </li>
593
594 <li>
595 <p>
596 <dfn>Predicates</dfn>. A predicate is shorthand for a Boolean
597 expression. Predicates may be used much like 1-bit fields. For
598 example, <code>ip4</code> might expand to <code>eth.type ==
599 0x800</code>. Predicates are provided for syntactic convenience,
600 because it is always possible to instead specify the underlying
601 expression directly.
602 </p>
603
604 <p>
605 A predicate whose expansion refers to any nominal field or
606 predicate (see <em>Level of Measurement</em>, below) is nominal;
607 other predicates have Boolean level of measurement.
608 </p>
609 </li>
610 </ul>
611
612 <p>
613 <em>Level of Measurement</em>. See
614 http://en.wikipedia.org/wiki/Level_of_measurement for the statistical
615 concept on which this classification is based. There are three
616 levels:
617 </p>
618
619 <ul>
620 <li>
621 <p>
622 <dfn>Ordinal</dfn>. In statistics, ordinal values can be ordered
623 on a scale. OVN considers a field (or subfield) to be ordinal if
624 its bits can be examined individually. This is true for the
625 OpenFlow fields that OpenFlow or Open vSwitch makes ``maskable.''
626 </p>
627
628 <p>
629 Any use of a nominal field may specify a single bit or a range of
630 bits, e.g. <code>vlan.tci[13..15]</code> refers to the PCP field
631 within the VLAN TCI, and <code>eth.dst[40]</code> refers to the
632 multicast bit in the Ethernet destination address.
633 </p>
634
635 <p>
636 OVN supports all the usual arithmetic relations (<code>==</code>,
637 <code>!=</code>, <code>&lt;</code>, <code>&lt;=</code>,
638 <code>&gt;</code>, and <code>&gt;=</code>) on ordinal fields and
639 their subfields, because OVN can implement these in OpenFlow and
640 Open vSwitch as collections of bitwise tests.
641 </p>
642 </li>
643
644 <li>
645 <p>
646 <dfn>Nominal</dfn>. In statistics, nominal values cannot be
647 usefully compared except for equality. This is true of OpenFlow
648 port numbers, Ethernet types, and IP protocols are examples: all of
649 these are just identifiers assigned arbitrarily with no deeper
650 meaning. In OpenFlow and Open vSwitch, bits in these fields
651 generally aren't individually addressable.
652 </p>
653
654 <p>
655 OVN only supports arithmetic tests for equality on nominal fields,
656 because OpenFlow and Open vSwitch provide no way for a flow to
657 efficiently implement other comparisons on them. (A test for
658 inequality can be sort of built out of two flows with different
659 priorities, but OVN matching expressions always generate flows with
660 a single priority.)
661 </p>
662
663 <p>
664 String fields are always nominal.
665 </p>
666 </li>
667
668 <li>
669 <p>
670 <dfn>Boolean</dfn>. A nominal field that has only two values, 0
671 and 1, is somewhat exceptional, since it is easy to support both
672 equality and inequality tests on such a field: either one can be
673 implemented as a test for 0 or 1.
674 </p>
675
676 <p>
677 Only predicates (see above) have a Boolean level of measurement.
678 </p>
679
680 <p>
681 This isn't a standard level of measurement.
682 </p>
683 </li>
684 </ul>
685
686 <p>
687 <em>Prerequisites</em>. Any symbol can have prerequisites, which are
688 additional condition implied by the use of the symbol. For example,
689 For example, <code>icmp4.type</code> symbol might have prerequisite
690 <code>icmp4</code>, which would cause an expression <code>icmp4.type ==
691 0</code> to be interpreted as <code>icmp4.type == 0 &amp;&amp;
692 icmp4</code>, which would in turn expand to <code>icmp4.type == 0
693 &amp;&amp; eth.type == 0x800 &amp;&amp; ip4.proto == 1</code> (assuming
694 <code>icmp4</code> is a predicate defined as suggested under
695 <em>Types</em> above).
696 </p>
697
698 <p><em>Relational operators</em></p>
699
700 <p>
701 All of the standard relational operators <code>==</code>,
702 <code>!=</code>, <code>&lt;</code>, <code>&lt;=</code>,
703 <code>&gt;</code>, and <code>&gt;=</code> are supported. Nominal
704 fields support only <code>==</code> and <code>!=</code>, and only in a
705 positive sense when outer <code>!</code> are taken into account,
706 e.g. given string field <code>inport</code>, <code>inport ==
707 "eth0"</code> and <code>!(inport != "eth0")</code> are acceptable, but
708 not <code>inport != "eth0"</code>.
709 </p>
710
711 <p>
712 The implementation of <code>==</code> (or <code>!=</code> when it is
713 negated), is more efficient than that of the other relational
714 operators.
715 </p>
716
717 <p><em>Constants</em></p>
718
719 <p>
720 Integer constants may be expressed in decimal, hexadecimal prefixed by
721 <code>0x</code>, or as dotted-quad IPv4 addresses, IPv6 addresses in
722 their standard forms, or Ethernet addresses as colon-separated hex
723 digits. A constant in any of these forms may be followed by a slash
724 and a second constant (the mask) in the same form, to form a masked
725 constant. IPv4 and IPv6 masks may be given as integers, to express
726 CIDR prefixes.
727 </p>
728
729 <p>
730 String constants have the same syntax as quoted strings in JSON (thus,
731 they are Unicode strings).
732 </p>
733
734 <p>
735 Some operators support sets of constants written inside curly braces
736 <code>{</code> ... <code>}</code>. Commas between elements of a set,
737 and after the last elements, are optional. With <code>==</code>,
738 ``<code><var>field</var> == { <var>constant1</var>,
739 <var>constant2</var>,</code> ... <code>}</code>'' is syntactic sugar
740 for ``<code><var>field</var> == <var>constant1</var> ||
741 <var>field</var> == <var>constant2</var> || </code>...<code></code>.
742 Similarly, ``<code><var>field</var> != { <var>constant1</var>,
743 <var>constant2</var>, </code>...<code> }</code>'' is equivalent to
744 ``<code><var>field</var> != <var>constant1</var> &amp;&amp;
745 <var>field</var> != <var>constant2</var> &amp;&amp;
746 </code>...<code></code>''.
747 </p>
748
749 <p>
750 You may refer to a set of IPv4, IPv6, or MAC addresses stored in the
751 <ref table="Address_Set"/> table by its <ref column="name"
752 table="Address_Set"/>. An <ref table="Address_Set"/> with a name
753 of <code>set1</code> can be referred to as
754 <code>$set1</code>.
755 </p>
756
757 <p><em>Miscellaneous</em></p>
758
759 <p>
760 Comparisons may name the symbol or the constant first,
761 e.g. <code>tcp.src == 80</code> and <code>80 == tcp.src</code> are both
762 acceptable.
763 </p>
764
765 <p>
766 Tests for a range may be expressed using a syntax like <code>1024 &lt;=
767 tcp.src &lt;= 49151</code>, which is equivalent to <code>1024 &lt;=
768 tcp.src &amp;&amp; tcp.src &lt;= 49151</code>.
769 </p>
770
771 <p>
772 For a one-bit field or predicate, a mention of its name is equivalent
773 to <code><var>symobl</var> == 1</code>, e.g. <code>vlan.present</code>
774 is equivalent to <code>vlan.present == 1</code>. The same is true for
775 one-bit subfields, e.g. <code>vlan.tci[12]</code>. There is no
776 technical limitation to implementing the same for ordinal fields of all
777 widths, but the implementation is expensive enough that the syntax
778 parser requires writing an explicit comparison against zero to make
779 mistakes less likely, e.g. in <code>tcp.src != 0</code> the comparison
780 against 0 is required.
781 </p>
782
783 <p>
784 <em>Operator precedence</em> is as shown below, from highest to lowest.
785 There are two exceptions where parentheses are required even though the
786 table would suggest that they are not: <code>&amp;&amp;</code> and
787 <code>||</code> require parentheses when used together, and
788 <code>!</code> requires parentheses when applied to a relational
789 expression. Thus, in <code>(eth.type == 0x800 || eth.type == 0x86dd)
790 &amp;&amp; ip.proto == 6</code> or <code>!(arp.op == 1)</code>, the
791 parentheses are mandatory.
792 </p>
793
794 <ul>
795 <li><code>()</code></li>
796 <li><code>== != &lt; &lt;= &gt; &gt;=</code></li>
797 <li><code>!</code></li>
798 <li><code>&amp;&amp; ||</code></li>
799 </ul>
800
801 <p>
802 <em>Comments</em> may be introduced by <code>//</code>, which extends
803 to the next new-line. Comments within a line may be bracketed by
804 <code>/*</code> and <code>*/</code>. Multiline comments are not
805 supported.
806 </p>
807
808 <p><em>Symbols</em></p>
809
810 <p>
811 Most of the symbols below have integer type. Only <code>inport</code>
812 and <code>outport</code> have string type. <code>inport</code> names a
813 logical port. Thus, its value is a <ref column="logical_port"/> name
814 from the <ref table="Port_Binding"/> table. <code>outport</code> may
815 name a logical port, as <code>inport</code>, or a logical multicast
816 group defined in the <ref table="Multicast_Group"/> table. For both
817 symbols, only names within the flow's logical datapath may be used.
818 </p>
819
820 <p>
821 The <code>reg</code><var>X</var> symbols are 32-bit integers.
822 The <code>xxreg</code><var>X</var> symbols are 128-bit integers,
823 which overlay four of the 32-bit registers: <code>xxreg0</code>
824 overlays <code>reg0</code> through <code>reg3</code>, with
825 <code>reg0</code> supplying the most-significant bits of
826 <code>xxreg0</code> and <code>reg3</code> the least-signficant.
827 <code>xxreg1</code> similarly overlays <code>reg4</code> through
828 <code>reg7</code>.
829 </p>
830
831 <ul>
832 <li><code>reg0</code>...<code>reg9</code></li>
833 <li><code>xxreg0</code> <code>xxreg1</code></li>
834 <li><code>inport</code> <code>outport</code></li>
835 <li><code>flags.loopback</code></li>
836 <li><code>eth.src</code> <code>eth.dst</code> <code>eth.type</code></li>
837 <li><code>vlan.tci</code> <code>vlan.vid</code> <code>vlan.pcp</code> <code>vlan.present</code></li>
838 <li><code>ip.proto</code> <code>ip.dscp</code> <code>ip.ecn</code> <code>ip.ttl</code> <code>ip.frag</code></li>
839 <li><code>ip4.src</code> <code>ip4.dst</code></li>
840 <li><code>ip6.src</code> <code>ip6.dst</code> <code>ip6.label</code></li>
841 <li><code>arp.op</code> <code>arp.spa</code> <code>arp.tpa</code> <code>arp.sha</code> <code>arp.tha</code></li>
842 <li><code>tcp.src</code> <code>tcp.dst</code> <code>tcp.flags</code></li>
843 <li><code>udp.src</code> <code>udp.dst</code></li>
844 <li><code>sctp.src</code> <code>sctp.dst</code></li>
845 <li><code>icmp4.type</code> <code>icmp4.code</code></li>
846 <li><code>icmp6.type</code> <code>icmp6.code</code></li>
847 <li><code>nd.target</code> <code>nd.sll</code> <code>nd.tll</code></li>
848 <li><code>ct_mark</code> <code>ct_label</code></li>
849 <li>
850 <p>
851 <code>ct_state</code>, which has the following Boolean subfields:
852 </p>
853 <ul>
854 <li><code>ct.new</code>: True for a new flow</li>
855 <li><code>ct.est</code>: True for an established flow</li>
856 <li><code>ct.rel</code>: True for a related flow</li>
857 <li><code>ct.rpl</code>: True for a reply flow</li>
858 <li><code>ct.inv</code>: True for a connection entry in a bad state</li>
859 </ul>
860 <p>
861 The above subfields of <code>ct_state</code> are initialized by
862 the <code>ct_next</code> action, described later.
863 </p>
864 <ul>
865 <li>
866 <code>ct.dnat</code>: True for a packet whose destination IP
867 address has been changed.
868 </li>
869 <li>
870 <code>ct.snat</code>: True for a packet whose source IP
871 address has been changed.
872 </li>
873 </ul>
874 <p>
875 The above subfields of <code>ct_state</code> are initialized by
876 the actions like <code>ct_dnat</code>, <code>ct_snat</code> and
877 <code>ct_lb</code> described later.
878 </p>
879 </li>
880 </ul>
881
882 <p>
883 The following predicates are supported:
884 </p>
885
886 <ul>
887 <li><code>eth.bcast</code> expands to <code>eth.dst == ff:ff:ff:ff:ff:ff</code></li>
888 <li><code>eth.mcast</code> expands to <code>eth.dst[40]</code></li>
889 <li><code>vlan.present</code> expands to <code>vlan.tci[12]</code></li>
890 <li><code>ip4</code> expands to <code>eth.type == 0x800</code></li>
891 <li><code>ip4.mcast</code> expands to <code>ip4.dst[28..31] == 0xe</code></li>
892 <li><code>ip6</code> expands to <code>eth.type == 0x86dd</code></li>
893 <li><code>ip</code> expands to <code>ip4 || ip6</code></li>
894 <li><code>icmp4</code> expands to <code>ip4 &amp;&amp; ip.proto == 1</code></li>
895 <li><code>icmp6</code> expands to <code>ip6 &amp;&amp; ip.proto == 58</code></li>
896 <li><code>icmp</code> expands to <code>icmp4 || icmp6</code></li>
897 <li><code>ip.is_frag</code> expands to <code>ip.frag[0]</code></li>
898 <li><code>ip.later_frag</code> expands to <code>ip.frag[1]</code></li>
899 <li><code>ip.first_frag</code> expands to <code>ip.is_frag &amp;&amp; !ip.later_frag</code></li>
900 <li><code>arp</code> expands to <code>eth.type == 0x806</code></li>
901 <li><code>nd</code> expands to <code>icmp6.type == {135, 136} &amp;&amp; icmp6.code == 0 &amp;&amp; ip.ttl == 255</code></li>
902 <li><code>nd_ns</code> expands to <code>icmp6.type == 135 &amp;&amp; icmp6.code == 0 &amp;&amp; ip.ttl == 255</code></li>
903 <li><code>nd_na</code> expands to <code>icmp6.type == 136 &amp;&amp; icmp6.code == 0 &amp;&amp; ip.ttl == 255</code></li>
904 <li><code>tcp</code> expands to <code>ip.proto == 6</code></li>
905 <li><code>udp</code> expands to <code>ip.proto == 17</code></li>
906 <li><code>sctp</code> expands to <code>ip.proto == 132</code></li>
907 </ul>
908 </column>
909
910 <column name="actions">
911 <p>
912 Logical datapath actions, to be executed when the logical flow
913 represented by this row is the highest-priority match.
914 </p>
915
916 <p>
917 Actions share lexical syntax with the <ref column="match"/> column. An
918 empty set of actions (or one that contains just white space or
919 comments), or a set of actions that consists of just
920 <code>drop;</code>, causes the matched packets to be dropped.
921 Otherwise, the column should contain a sequence of actions, each
922 terminated by a semicolon.
923 </p>
924
925 <p>
926 The following actions are defined:
927 </p>
928
929 <dl>
930 <dt><code>output;</code></dt>
931 <dd>
932 <p>
933 In the ingress pipeline, this action executes the
934 <code>egress</code> pipeline as a subroutine. If
935 <code>outport</code> names a logical port, the egress pipeline
936 executes once; if it is a multicast group, the egress pipeline runs
937 once for each logical port in the group.
938 </p>
939
940 <p>
941 In the egress pipeline, this action performs the actual
942 output to the <code>outport</code> logical port. (In the egress
943 pipeline, <code>outport</code> never names a multicast group.)
944 </p>
945
946 <p>
947 By default, output to the input port is implicitly dropped,
948 that is, <code>output</code> becomes a no-op if
949 <code>outport</code> == <code>inport</code>. Occasionally
950 it may be useful to override this behavior, e.g. to send an
951 ARP reply to an ARP request; to do so, use
952 <code>flags.loopback = 1</code> to allow the packet to
953 "hair-pin" back to the input port.
954 </p>
955 </dd>
956
957 <dt><code>next;</code></dt>
958 <dt><code>next(<var>table</var>);</code></dt>
959 <dd>
960 Executes another logical datapath table as a subroutine. By default,
961 the table after the current one is executed. Specify
962 <var>table</var> to jump to a specific table in the same pipeline.
963 </dd>
964
965 <dt><code><var>field</var> = <var>constant</var>;</code></dt>
966 <dd>
967 <p>
968 Sets data or metadata field <var>field</var> to constant value
969 <var>constant</var>, e.g. <code>outport = "vif0";</code> to set the
970 logical output port. To set only a subset of bits in a field,
971 specify a subfield for <var>field</var> or a masked
972 <var>constant</var>, e.g. one may use <code>vlan.pcp[2] = 1;</code>
973 or <code>vlan.pcp = 4/4;</code> to set the most sigificant bit of
974 the VLAN PCP.
975 </p>
976
977 <p>
978 Assigning to a field with prerequisites implicitly adds those
979 prerequisites to <ref column="match"/>; thus, for example, a flow
980 that sets <code>tcp.dst</code> applies only to TCP flows,
981 regardless of whether its <ref column="match"/> mentions any TCP
982 field.
983 </p>
984
985 <p>
986 Not all fields are modifiable (e.g. <code>eth.type</code> and
987 <code>ip.proto</code> are read-only), and not all modifiable fields
988 may be partially modified (e.g. <code>ip.ttl</code> must assigned
989 as a whole). The <code>outport</code> field is modifiable in the
990 <code>ingress</code> pipeline but not in the <code>egress</code>
991 pipeline.
992 </p>
993 </dd>
994
995 <dt><code><var>field1</var> = <var>field2</var>;</code></dt>
996 <dd>
997 <p>
998 Sets data or metadata field <var>field1</var> to the value of data
999 or metadata field <var>field2</var>, e.g. <code>reg0 =
1000 ip4.src;</code> copies <code>ip4.src</code> into <code>reg0</code>.
1001 To modify only a subset of a field's bits, specify a subfield for
1002 <var>field1</var> or <var>field2</var> or both, e.g. <code>vlan.pcp
1003 = reg0[0..2];</code> copies the least-significant bits of
1004 <code>reg0</code> into the VLAN PCP.
1005 </p>
1006
1007 <p>
1008 <var>field1</var> and <var>field2</var> must be the same type,
1009 either both string or both integer fields. If they are both
1010 integer fields, they must have the same width.
1011 </p>
1012
1013 <p>
1014 If <var>field1</var> or <var>field2</var> has prerequisites, they
1015 are added implicitly to <ref column="match"/>. It is possible to
1016 write an assignment with contradictory prerequisites, such as
1017 <code>ip4.src = ip6.src[0..31];</code>, but the contradiction means
1018 that a logical flow with such an assignment will never be matched.
1019 </p>
1020 </dd>
1021
1022 <dt><code><var>field1</var> &lt;-&gt; <var>field2</var>;</code></dt>
1023 <dd>
1024 <p>
1025 Similar to <code><var>field1</var> = <var>field2</var>;</code>
1026 except that the two values are exchanged instead of copied. Both
1027 <var>field1</var> and <var>field2</var> must modifiable.
1028 </p>
1029 </dd>
1030
1031 <dt><code>ip.ttl--;</code></dt>
1032 <dd>
1033 <p>
1034 Decrements the IPv4 or IPv6 TTL. If this would make the TTL zero
1035 or negative, then processing of the packet halts; no further
1036 actions are processed. (To properly handle such cases, a
1037 higher-priority flow should match on
1038 <code>ip.ttl == {0, 1};</code>.)
1039 </p>
1040
1041 <p><b>Prerequisite:</b> <code>ip</code></p>
1042 </dd>
1043
1044 <dt><code>ct_next;</code></dt>
1045 <dd>
1046 <p>
1047 Apply connection tracking to the flow, initializing
1048 <code>ct_state</code> for matching in later tables.
1049 Automatically moves on to the next table, as if followed by
1050 <code>next</code>.
1051 </p>
1052
1053 <p>
1054 As a side effect, IP fragments will be reassembled for matching.
1055 If a fragmented packet is output, then it will be sent with any
1056 overlapping fragments squashed. The connection tracking state is
1057 scoped by the logical port when the action is used in a flow for
1058 a logical switch, so overlapping addresses may be used. To allow
1059 traffic related to the matched flow, execute <code>ct_commit
1060 </code>. Connection tracking state is scoped by the logical
1061 topology when the action is used in a flow for a router.
1062 </p>
1063
1064 <p>
1065 It is possible to have actions follow <code>ct_next</code>,
1066 but they will not have access to any of its side-effects and
1067 is not generally useful.
1068 </p>
1069 </dd>
1070
1071 <dt><code>ct_commit;</code></dt>
1072 <dt><code>ct_commit(ct_mark=<var>value[/mask]</var>);</code></dt>
1073 <dt><code>ct_commit(ct_label=<var>value[/mask]</var>);</code></dt>
1074 <dt><code>ct_commit(ct_mark=<var>value[/mask]</var>, ct_label=<var>value[/mask]</var>);</code></dt>
1075 <dd>
1076 <p>
1077 Commit the flow to the connection tracking entry associated with it
1078 by a previous call to <code>ct_next</code>. When
1079 <code>ct_mark=<var>value[/mask]</var></code> and/or
1080 <code>ct_label=<var>value[/mask]</var></code> are supplied,
1081 <code>ct_mark</code> and/or <code>ct_label</code> will be set to the
1082 values indicated by <var>value[/mask]</var> on the connection
1083 tracking entry. <code>ct_mark</code> is a 32-bit field.
1084 <code>ct_label</code> is a 128-bit field. The <var>value[/mask]</var>
1085 should be specified in hex string if more than 64bits are to be used.
1086 </p>
1087
1088 <p>
1089 Note that if you want processing to continue in the next table,
1090 you must execute the <code>next</code> action after
1091 <code>ct_commit</code>. You may also leave out <code>next</code>
1092 which will commit connection tracking state, and then drop the
1093 packet. This could be useful for setting <code>ct_mark</code>
1094 on a connection tracking entry before dropping a packet,
1095 for example.
1096 </p>
1097 </dd>
1098
1099 <dt><code>ct_dnat;</code></dt>
1100 <dt><code>ct_dnat(<var>IP</var>);</code></dt>
1101 <dd>
1102 <p>
1103 <code>ct_dnat</code> sends the packet through the DNAT zone in
1104 connection tracking table to unDNAT any packet that was DNATed in
1105 the opposite direction. The packet is then automatically sent to
1106 to the next tables as if followed by <code>next;</code> action.
1107 The next tables will see the changes in the packet caused by
1108 the connection tracker.
1109 </p>
1110 <p>
1111 <code>ct_dnat(<var>IP</var>)</code> sends the packet through the
1112 DNAT zone to change the destination IP address of the packet to
1113 the one provided inside the parentheses and commits the connection.
1114 The packet is then automatically sent to the next tables as if
1115 followed by <code>next;</code> action. The next tables will see
1116 the changes in the packet caused by the connection tracker.
1117 </p>
1118 </dd>
1119
1120 <dt><code>ct_snat;</code></dt>
1121 <dt><code>ct_snat(<var>IP</var>);</code></dt>
1122 <dd>
1123 <p>
1124 <code>ct_snat</code> sends the packet through the SNAT zone to
1125 unSNAT any packet that was SNATed in the opposite direction. If
1126 the packet needs to be sent to the next tables, then it should be
1127 followed by a <code>next;</code> action. The next tables will not
1128 see the changes in the packet caused by the connection tracker.
1129 </p>
1130 <p>
1131 <code>ct_snat(<var>IP</var>)</code> sends the packet through the
1132 SNAT zone to change the source IP address of the packet to
1133 the one provided inside the parenthesis and commits the connection.
1134 The packet is then automatically sent to the next tables as if
1135 followed by <code>next;</code> action. The next tables will see the
1136 changes in the packet caused by the connection tracker.
1137 </p>
1138 </dd>
1139
1140 <dt><code>arp { <var>action</var>; </code>...<code> };</code></dt>
1141 <dd>
1142 <p>
1143 Temporarily replaces the IPv4 packet being processed by an ARP
1144 packet and executes each nested <var>action</var> on the ARP
1145 packet. Actions following the <var>arp</var> action, if any, apply
1146 to the original, unmodified packet.
1147 </p>
1148
1149 <p>
1150 The ARP packet that this action operates on is initialized based on
1151 the IPv4 packet being processed, as follows. These are default
1152 values that the nested actions will probably want to change:
1153 </p>
1154
1155 <ul>
1156 <li><code>eth.src</code> unchanged</li>
1157 <li><code>eth.dst</code> unchanged</li>
1158 <li><code>eth.type = 0x0806</code></li>
1159 <li><code>arp.op = 1</code> (ARP request)</li>
1160 <li><code>arp.sha</code> copied from <code>eth.src</code></li>
1161 <li><code>arp.spa</code> copied from <code>ip4.src</code></li>
1162 <li><code>arp.tha = 00:00:00:00:00:00</code></li>
1163 <li><code>arp.tpa</code> copied from <code>ip4.dst</code></li>
1164 </ul>
1165
1166 <p>
1167 The ARP packet has the same VLAN header, if any, as the IP packet
1168 it replaces.
1169 </p>
1170
1171 <p><b>Prerequisite:</b> <code>ip4</code></p>
1172 </dd>
1173
1174 <dt><code>get_arp(<var>P</var>, <var>A</var>);</code></dt>
1175
1176 <dd>
1177 <p>
1178 <b>Parameters</b>: logical port string field <var>P</var>, 32-bit
1179 IP address field <var>A</var>.
1180 </p>
1181
1182 <p>
1183 Looks up <var>A</var> in <var>P</var>'s mac binding table.
1184 If an entry is found, stores its Ethernet address in
1185 <code>eth.dst</code>, otherwise stores
1186 <code>00:00:00:00:00:00</code> in <code>eth.dst</code>.
1187 </p>
1188
1189 <p><b>Example:</b> <code>get_arp(outport, ip4.dst);</code></p>
1190 </dd>
1191
1192 <dt>
1193 <code>put_arp(<var>P</var>, <var>A</var>, <var>E</var>);</code>
1194 </dt>
1195
1196 <dd>
1197 <p>
1198 <b>Parameters</b>: logical port string field <var>P</var>, 32-bit
1199 IP address field <var>A</var>, 48-bit Ethernet address field
1200 <var>E</var>.
1201 </p>
1202
1203 <p>
1204 Adds or updates the entry for IP address <var>A</var> in
1205 logical port <var>P</var>'s mac binding table, setting its
1206 Ethernet address to <var>E</var>.
1207 </p>
1208
1209 <p><b>Example:</b> <code>put_arp(inport, arp.spa, arp.sha);</code></p>
1210 </dd>
1211
1212 <dt>
1213 <code>nd_na { <var>action</var>; </code>...<code> };</code>
1214 </dt>
1215
1216 <dd>
1217 <p>
1218 Temporarily replaces the IPv6 neighbor solicitation packet
1219 being processed by an IPv6 neighbor advertisement (NA)
1220 packet and executes each nested <var>action</var> on the NA
1221 packet. Actions following the <code>nd_na</code> action,
1222 if any, apply to the original, unmodified packet.
1223 </p>
1224
1225 <p>
1226 The NA packet that this action operates on is initialized based on
1227 the IPv6 packet being processed, as follows. These are default
1228 values that the nested actions will probably want to change:
1229 </p>
1230
1231 <ul>
1232 <li><code>eth.dst</code> exchanged with <code>eth.src</code></li>
1233 <li><code>eth.type = 0x86dd</code></li>
1234 <li><code>ip6.dst</code> copied from <code>ip6.src</code></li>
1235 <li><code>ip6.src</code> copied from <code>nd.target</code></li>
1236 <li><code>icmp6.type = 136</code> (Neighbor Advertisement)</li>
1237 <li><code>nd.target</code> unchanged</li>
1238 <li><code>nd.sll = 00:00:00:00:00:00</code></li>
1239 <li><code>nd.tll</code> copied from <code>eth.dst</code></li>
1240 </ul>
1241
1242 <p>
1243 The ND packet has the same VLAN header, if any, as the IPv6 packet
1244 it replaces.
1245 </p>
1246
1247 <p>
1248 <b>Prerequisite:</b> <code>nd_ns</code>
1249 </p>
1250 </dd>
1251
1252 <dt><code>get_nd(<var>P</var>, <var>A</var>);</code></dt>
1253
1254 <dd>
1255 <p>
1256 <b>Parameters</b>: logical port string field <var>P</var>, 128-bit
1257 IPv6 address field <var>A</var>.
1258 </p>
1259
1260 <p>
1261 Looks up <var>A</var> in <var>P</var>'s mac binding table.
1262 If an entry is found, stores its Ethernet address in
1263 <code>eth.dst</code>, otherwise stores
1264 <code>00:00:00:00:00:00</code> in <code>eth.dst</code>.
1265 </p>
1266
1267 <p><b>Example:</b> <code>get_nd(outport, ip6.dst);</code></p>
1268 </dd>
1269
1270 <dt>
1271 <code>put_nd(<var>P</var>, <var>A</var>, <var>E</var>);</code>
1272 </dt>
1273
1274 <dd>
1275 <p>
1276 <b>Parameters</b>: logical port string field <var>P</var>,
1277 128-bit IPv6 address field <var>A</var>, 48-bit Ethernet
1278 address field <var>E</var>.
1279 </p>
1280
1281 <p>
1282 Adds or updates the entry for IPv6 address <var>A</var> in
1283 logical port <var>P</var>'s mac binding table, setting its
1284 Ethernet address to <var>E</var>.
1285 </p>
1286
1287 <p><b>Example:</b> <code>put_nd(inport, nd.target, nd.tll);</code></p>
1288 </dd>
1289
1290 <dt>
1291 <code><var>R</var> = put_dhcp_opts(<var>D1</var> = <var>V1</var>, <var>D2</var> = <var>V2</var>, ..., <var>Dn</var> = <var>Vn</var>);</code>
1292 </dt>
1293
1294 <dd>
1295 <p>
1296 <b>Parameters</b>: one or more DHCP option/value pairs, which must
1297 include an <code>offerip</code> option (with code 0).
1298 </p>
1299
1300 <p>
1301 <b>Result</b>: stored to a 1-bit subfield <var>R</var>.
1302 </p>
1303
1304 <p>
1305 Valid only in the ingress pipeline.
1306 </p>
1307
1308 <p>
1309 When this action is applied to a DHCP request packet (DHCPDISCOVER
1310 or DHCPREQUEST), it changes the packet into a DHCP reply (DHCPOFFER
1311 or DHCPACK, respectively), replaces the options by those specified
1312 as parameters, and stores 1 in <var>R</var>.
1313 </p>
1314
1315 <p>
1316 When this action is applied to a non-DHCP packet or a DHCP packet
1317 that is not DHCPDISCOVER or DHCPREQUEST, it leaves the packet
1318 unchanged and stores 0 in <var>R</var>.
1319 </p>
1320
1321 <p>
1322 The contents of the <ref table="DHCP_Option"/> table control the
1323 DHCP option names and values that this action supports.
1324 </p>
1325
1326 <p>
1327 <b>Example:</b>
1328 <code>
1329 reg0[0] = put_dhcp_opts(offerip = 10.0.0.2, router = 10.0.0.1,
1330 netmask = 255.255.255.0, dns_server = {8.8.8.8, 7.7.7.7});
1331 </code>
1332 </p>
1333 </dd>
1334
1335 <dt>
1336 <code><var>R</var> = put_dhcpv6_opts(<var>D1</var> = <var>V1</var>, <var>D2</var> = <var>V2</var>, ..., <var>Dn</var> = <var>Vn</var>);</code>
1337 </dt>
1338
1339 <dd>
1340 <p>
1341 <b>Parameters</b>: one or more DHCPv6 option/value pairs.
1342 </p>
1343
1344 <p>
1345 <b>Result</b>: stored to a 1-bit subfield <var>R</var>.
1346 </p>
1347
1348 <p>
1349 Valid only in the ingress pipeline.
1350 </p>
1351
1352 <p>
1353 When this action is applied to a DHCPv6 request packet, it changes
1354 the packet into a DHCPv6 reply, replaces the options by those
1355 specified as parameters, and stores 1 in <var>R</var>.
1356 </p>
1357
1358 <p>
1359 When this action is applied to a non-DHCPv6 packet or an invalid
1360 DHCPv6 request packet , it leaves the packet unchanged and stores
1361 0 in <var>R</var>.
1362 </p>
1363
1364 <p>
1365 The contents of the <ref table="DHCPv6_Options"/> table control the
1366 DHCPv6 option names and values that this action supports.
1367 </p>
1368
1369 <p>
1370 <b>Example:</b>
1371 <code>
1372 reg0[3] = put_dhcpv6_opts(ia_addr = aef0::4, server_id = 00:00:00:00:10:02,
1373 dns_server={ae70::1,ae70::2});
1374 </code>
1375 </p>
1376 </dd>
1377
1378 <dt>
1379 <code>set_queue(<var>queue_number</var>);</code>
1380 </dt>
1381
1382 <dd>
1383 <p>
1384 <b>Parameters</b>: Queue number <var>queue_number</var>, in the range 0 to 61440.
1385 </p>
1386
1387 <p>
1388 This is a logical equivalent of the OpenFlow <code>set_queue</code>
1389 action. It affects packets that egress a hypervisor through a
1390 physical interface. For nonzero <var>queue_number</var>, it
1391 configures packet queuing to match the settings configured for the
1392 <ref table="Port_Binding"/> with
1393 <code>options:qdisc_queue_id</code> matching
1394 <var>queue_number</var>. When <var>queue_number</var> is zero, it
1395 resets queuing to the default strategy.
1396 </p>
1397
1398 <p><b>Example:</b> <code>set_queue(10);</code></p>
1399 </dd>
1400
1401 <dt><code>ct_lb;</code></dt>
1402 <dt><code>ct_lb(</code><var>ip</var>[<code>:</code><var>port</var>]...<code>);</code></dt>
1403 <dd>
1404 <p>
1405 With one or more arguments, <code>ct_lb</code> commits the packet
1406 to the connection tracking table and DNATs the packet's destination
1407 IP address (and port) to the IP address or addresses (and optional
1408 ports) specified in the string. If multiple comma-separated IP
1409 addresses are specified, each is given equal weight for picking the
1410 DNAT address. Processing automatically moves on to the next table,
1411 as if <code>next;</code> were specified, and later tables act on
1412 the packet as modified by the connection tracker. Connection
1413 tracking state is scoped by the logical port when the action is
1414 used in a flow for a logical switch, so overlapping
1415 addresses may be used. Connection tracking state is scoped by the
1416 logical topology when the action is used in a flow for a router.
1417 </p>
1418 <p>
1419 Without arguments, <code>ct_lb</code> sends the packet to the
1420 connection tracking table to NAT the packets. If the packet is
1421 part of an established connection that was previously committed to
1422 the connection tracker via <code>ct_lb(</code>...<code>)</code>, it
1423 will automatically get DNATed to the same IP address as the first
1424 packet in that connection.
1425 </p>
1426 </dd>
1427 </dl>
1428
1429 <p>
1430 The following actions will likely be useful later, but they have not
1431 been thought out carefully.
1432 </p>
1433
1434 <dl>
1435 <dt><code>icmp4 { <var>action</var>; </code>...<code> };</code></dt>
1436 <dd>
1437 <p>
1438 Temporarily replaces the IPv4 packet being processed by an ICMPv4
1439 packet and executes each nested <var>action</var> on the ICMPv4
1440 packet. Actions following the <var>icmp4</var> action, if any,
1441 apply to the original, unmodified packet.
1442 </p>
1443
1444 <p>
1445 The ICMPv4 packet that this action operates on is initialized based
1446 on the IPv4 packet being processed, as follows. These are default
1447 values that the nested actions will probably want to change.
1448 Ethernet and IPv4 fields not listed here are not changed:
1449 </p>
1450
1451 <ul>
1452 <li><code>ip.proto = 1</code> (ICMPv4)</li>
1453 <li><code>ip.frag = 0</code> (not a fragment)</li>
1454 <li><code>icmp4.type = 3</code> (destination unreachable)</li>
1455 <li><code>icmp4.code = 1</code> (host unreachable)</li>
1456 </ul>
1457
1458 <p>
1459 Details TBD.
1460 </p>
1461
1462 <p><b>Prerequisite:</b> <code>ip4</code></p>
1463 </dd>
1464
1465 <dt><code>tcp_reset;</code></dt>
1466 <dd>
1467 <p>
1468 This action transforms the current TCP packet according to the
1469 following pseudocode:
1470 </p>
1471
1472 <pre>
1473 if (tcp.ack) {
1474 tcp.seq = tcp.ack;
1475 } else {
1476 tcp.ack = tcp.seq + length(tcp.payload);
1477 tcp.seq = 0;
1478 }
1479 tcp.flags = RST;
1480 </pre>
1481
1482 <p>
1483 Then, the action drops all TCP options and payload data, and
1484 updates the TCP checksum.
1485 </p>
1486
1487 <p>
1488 Details TBD.
1489 </p>
1490
1491 <p><b>Prerequisite:</b> <code>tcp</code></p>
1492 </dd>
1493 </dl>
1494 </column>
1495
1496 <column name="external_ids" key="stage-name">
1497 Human-readable name for this flow's stage in the pipeline.
1498 </column>
1499
1500 <column name="external_ids" key="source">
1501 Source file and line number of the code that added this flow to the
1502 pipeline.
1503 </column>
1504
1505 <group title="Common Columns">
1506 The overall purpose of these columns is described under <code>Common
1507 Columns</code> at the beginning of this document.
1508
1509 <column name="external_ids"/>
1510 </group>
1511 </table>
1512
1513 <table name="Multicast_Group" title="Logical Port Multicast Groups">
1514 <p>
1515 The rows in this table define multicast groups of logical ports.
1516 Multicast groups allow a single packet transmitted over a tunnel to a
1517 hypervisor to be delivered to multiple VMs on that hypervisor, which
1518 uses bandwidth more efficiently.
1519 </p>
1520
1521 <p>
1522 Each row in this table defines a logical multicast group numbered <ref
1523 column="tunnel_key"/> within <ref column="datapath"/>, whose logical
1524 ports are listed in the <ref column="ports"/> column.
1525 </p>
1526
1527 <column name="datapath">
1528 The logical datapath in which the multicast group resides.
1529 </column>
1530
1531 <column name="tunnel_key">
1532 The value used to designate this logical egress port in tunnel
1533 encapsulations. An index forces the key to be unique within the <ref
1534 column="datapath"/>. The unusual range ensures that multicast group IDs
1535 do not overlap with logical port IDs.
1536 </column>
1537
1538 <column name="name">
1539 <p>
1540 The logical multicast group's name. An index forces the name to be
1541 unique within the <ref column="datapath"/>. Logical flows in the
1542 ingress pipeline may output to the group just as for individual logical
1543 ports, by assigning the group's name to <code>outport</code> and
1544 executing an <code>output</code> action.
1545 </p>
1546
1547 <p>
1548 Multicast group names and logical port names share a single namespace
1549 and thus should not overlap (but the database schema cannot enforce
1550 this). To try to avoid conflicts, <code>ovn-northd</code> uses names
1551 that begin with <code>_MC_</code>.
1552 </p>
1553 </column>
1554
1555 <column name="ports">
1556 The logical ports included in the multicast group. All of these ports
1557 must be in the <ref column="datapath"/> logical datapath (but the
1558 database schema cannot enforce this).
1559 </column>
1560 </table>
1561
1562 <table name="Datapath_Binding" title="Physical-Logical Datapath Bindings">
1563 <p>
1564 Each row in this table identifies physical bindings of a logical
1565 datapath. A logical datapath implements a logical pipeline among the
1566 ports in the <ref table="Port_Binding"/> table associated with it. In
1567 practice, the pipeline in a given logical datapath implements either a
1568 logical switch or a logical router.
1569 </p>
1570
1571 <column name="tunnel_key">
1572 The tunnel key value to which the logical datapath is bound.
1573 The <code>Tunnel Encapsulation</code> section in
1574 <code>ovn-architecture</code>(7) describes how tunnel keys are
1575 constructed for each supported encapsulation.
1576 </column>
1577
1578 <group title="OVN_Northbound Relationship">
1579 <p>
1580 Each row in <ref table="Datapath_Binding"/> is associated with some
1581 logical datapath. <code>ovn-northd</code> uses these keys to track the
1582 association of a logical datapath with concepts in the <ref
1583 db="OVN_Northbound"/> database.
1584 </p>
1585
1586 <column name="external_ids" key="logical-switch" type='{"type": "uuid"}'>
1587 For a logical datapath that represents a logical switch,
1588 <code>ovn-northd</code> stores in this key the UUID of the
1589 corresponding <ref table="Logical_Switch" db="OVN_Northbound"/> row in
1590 the <ref db="OVN_Northbound"/> database.
1591 </column>
1592
1593 <column name="external_ids" key="logical-router" type='{"type": "uuid"}'>
1594 For a logical datapath that represents a logical router,
1595 <code>ovn-northd</code> stores in this key the UUID of the
1596 corresponding <ref table="Logical_Router" db="OVN_Northbound"/> row in
1597 the <ref db="OVN_Northbound"/> database.
1598 </column>
1599
1600 <column name="external_ids" key="name">
1601 <code>ovn-northd</code> copies this from the <ref
1602 table="Logical_Router" db="OVN_Northbound"/> or <ref
1603 table="Logical_Switch" db="OVN_Northbound"/> table in the <ref
1604 db="OVN_Northbound"/> database, when that column is nonempty.
1605 </column>
1606 </group>
1607
1608 <group title="Common Columns">
1609 The overall purpose of these columns is described under <code>Common
1610 Columns</code> at the beginning of this document.
1611
1612 <column name="external_ids"/>
1613 </group>
1614 </table>
1615
1616 <table name="Port_Binding" title="Physical-Logical Port Bindings">
1617 <p>
1618 Most rows in this table identify the physical location of a logical port.
1619 (The exceptions are logical patch ports, which do not have any physical
1620 location.)
1621 </p>
1622
1623 <p>
1624 For every <code>Logical_Switch_Port</code> record in
1625 <code>OVN_Northbound</code> database, <code>ovn-northd</code>
1626 creates a record in this table. <code>ovn-northd</code> populates
1627 and maintains every column except the <code>chassis</code> column,
1628 which it leaves empty in new records.
1629 </p>
1630
1631 <p>
1632 <code>ovn-controller</code>/<code>ovn-controller-vtep</code>
1633 populates the <code>chassis</code> column for the records that
1634 identify the logical ports that are located on its hypervisor/gateway,
1635 which <code>ovn-controller</code>/<code>ovn-controller-vtep</code> in
1636 turn finds out by monitoring the local hypervisor's Open_vSwitch
1637 database, which identifies logical ports via the conventions described
1638 in <code>IntegrationGuide.rst</code>. (The exceptions are for
1639 <code>Port_Binding</code> records with <code>type</code> of
1640 <code>l3gateway</code>, whose locations are identified by
1641 <code>ovn-northd</code> via the <code>options:l3gateway-chassis</code>
1642 column in this table. <code>ovn-controller</code> is still responsible
1643 to populate the <code>chassis</code> column.)
1644 </p>
1645
1646 <p>
1647 When a chassis shuts down gracefully, it should clean up the
1648 <code>chassis</code> column that it previously had populated.
1649 (This is not critical because resources hosted on the chassis are equally
1650 unreachable regardless of whether their rows are present.) To handle the
1651 case where a VM is shut down abruptly on one chassis, then brought up
1652 again on a different one,
1653 <code>ovn-controller</code>/<code>ovn-controller-vtep</code> must
1654 overwrite the <code>chassis</code> column with new information.
1655 </p>
1656
1657 <group title="Core Features">
1658 <column name="datapath">
1659 The logical datapath to which the logical port belongs.
1660 </column>
1661
1662 <column name="logical_port">
1663 A logical port, taken from <ref table="Logical_Switch_Port"
1664 column="name" db="OVN_Northbound"/> in the OVN_Northbound
1665 database's <ref table="Logical_Switch_Port" db="OVN_Northbound"/>
1666 table. OVN does not prescribe a particular format for the
1667 logical port ID.
1668 </column>
1669
1670 <column name="chassis">
1671 The meaning of this column depends on the value of the <ref column="type"/>
1672 column. This is the meaning for each <ref column="type"/>
1673
1674 <dl>
1675 <dt>(empty string)</dt>
1676 <dd>
1677 The physical location of the logical port. To successfully identify a
1678 chassis, this column must be a <ref table="Chassis"/> record. This is
1679 populated by <code>ovn-controller</code>.
1680 </dd>
1681
1682 <dt>vtep</dt>
1683 <dd>
1684 The physical location of the hardware_vtep gateway. To successfully
1685 identify a chassis, this column must be a <ref table="Chassis"/> record.
1686 This is populated by <code>ovn-controller-vtep</code>.
1687 </dd>
1688
1689 <dt>localnet</dt>
1690 <dd>
1691 Always empty. A localnet port is realized on every chassis that has
1692 connectivity to the corresponding physical network.
1693 </dd>
1694
1695 <dt>l3gateway</dt>
1696 <dd>
1697 The physical location of the L3 gateway. To successfully identify a
1698 chassis, this column must be a <ref table="Chassis"/> record. This is
1699 populated by <code>ovn-controller</code> based on the value of
1700 the <code>options:l3gateway-chassis</code> column in this table.
1701 </dd>
1702
1703 <dt>l2gateway</dt>
1704 <dd>
1705 The physical location of this L2 gateway. To successfully identify a
1706 chassis, this column must be a <ref table="Chassis"/> record.
1707 This is populated by <code>ovn-controller</code> based on the value
1708 of the <code>options:l2gateway-chassis</code> column in this table.
1709 </dd>
1710 </dl>
1711
1712 </column>
1713
1714 <column name="tunnel_key">
1715 <p>
1716 A number that represents the logical port in the key (e.g. STT key or
1717 Geneve TLV) field carried within tunnel protocol packets.
1718 </p>
1719
1720 <p>
1721 The tunnel ID must be unique within the scope of a logical datapath.
1722 </p>
1723 </column>
1724
1725 <column name="mac">
1726 <p>
1727 The Ethernet address or addresses used as a source address on the
1728 logical port, each in the form
1729 <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
1730 The string <code>unknown</code> is also allowed to indicate that the
1731 logical port has an unknown set of (additional) source addresses.
1732 </p>
1733
1734 <p>
1735 A VM interface would ordinarily have a single Ethernet address. A
1736 gateway port might initially only have <code>unknown</code>, and then
1737 add MAC addresses to the set as it learns new source addresses.
1738 </p>
1739 </column>
1740
1741 <column name="type">
1742 <p>
1743 A type for this logical port. Logical ports can be used to model other
1744 types of connectivity into an OVN logical switch. The following types
1745 are defined:
1746 </p>
1747
1748 <dl>
1749 <dt>(empty string)</dt>
1750 <dd>VM (or VIF) interface.</dd>
1751
1752 <dt><code>patch</code></dt>
1753 <dd>
1754 One of a pair of logical ports that act as if connected by a patch
1755 cable. Useful for connecting two logical datapaths, e.g. to connect
1756 a logical router to a logical switch or to another logical router.
1757 </dd>
1758
1759 <dt><code>l3gateway</code></dt>
1760 <dd>
1761 One of a pair of logical ports that act as if connected by a patch
1762 cable across multiple chassis. Useful for connecting a logical
1763 switch with a Gateway router (which is only resident on a
1764 particular chassis).
1765 </dd>
1766
1767 <dt><code>localnet</code></dt>
1768 <dd>
1769 A connection to a locally accessible network from each
1770 <code>ovn-controller</code> instance. A logical switch can only
1771 have a single <code>localnet</code> port attached. This is used
1772 to model direct connectivity to an existing network.
1773 </dd>
1774
1775 <dt><code>l2gateway</code></dt>
1776 <dd>
1777 An L2 connection to a physical network. The chassis this
1778 <ref table="Port_Binding"/> is bound to will serve as
1779 an L2 gateway to the network named by
1780 <ref column="options" table="Port_Binding"/>:<code>network_name</code>.
1781 </dd>
1782
1783 <dt><code>vtep</code></dt>
1784 <dd>
1785 A port to a logical switch on a VTEP gateway chassis. In order to
1786 get this port correctly recognized by the OVN controller, the <ref
1787 column="options"
1788 table="Port_Binding"/>:<code>vtep-physical-switch</code> and <ref
1789 column="options"
1790 table="Port_Binding"/>:<code>vtep-logical-switch</code> must also
1791 be defined.
1792 </dd>
1793
1794 <dt><code>chassisredirect</code></dt>
1795 <dd>
1796 A logical port that represents a particular instance, bound
1797 to a specific chassis, of an otherwise distributed parent
1798 port (e.g. of type <code>patch</code>). A
1799 <code>chassisredirect</code> port should never be used as an
1800 <code>inport</code>. When an ingress pipeline sets the
1801 <code>outport</code>, it may set the value to a logical port
1802 of type <code>chassisredirect</code>. This will cause the
1803 packet to be directed to a specific chassis to carry out the
1804 egress pipeline. At the beginning of the egress pipeline,
1805 the <code>outport</code> will be reset to the value of the
1806 distributed port.
1807 </dd>
1808 </dl>
1809 </column>
1810 </group>
1811
1812 <group title="Patch Options">
1813 <p>
1814 These options apply to logical ports with <ref column="type"/> of
1815 <code>patch</code>.
1816 </p>
1817
1818 <column name="options" key="peer">
1819 The <ref column="logical_port"/> in the <ref table="Port_Binding"/>
1820 record for the other side of the patch. The named <ref
1821 column="logical_port"/> must specify this <ref column="logical_port"/>
1822 in its own <code>peer</code> option. That is, the two patch logical
1823 ports must have reversed <ref column="logical_port"/> and
1824 <code>peer</code> values.
1825 </column>
1826 </group>
1827
1828 <group title="L3 Gateway Options">
1829 <p>
1830 These options apply to logical ports with <ref column="type"/> of
1831 <code>l3gateway</code>.
1832 </p>
1833
1834 <column name="options" key="peer">
1835 The <ref column="logical_port"/> in the <ref table="Port_Binding"/>
1836 record for the other side of the 'l3gateway' port. The named <ref
1837 column="logical_port"/> must specify this <ref column="logical_port"/>
1838 in its own <code>peer</code> option. That is, the two 'l3gateway'
1839 logical ports must have reversed <ref column="logical_port"/> and
1840 <code>peer</code> values.
1841 </column>
1842
1843 <column name="options" key="l3gateway-chassis">
1844 The <code>chassis</code> in which the port resides.
1845 </column>
1846
1847 <column name="options" key="nat-addresses">
1848 MAC address of the <code>l3gateway</code> port followed by a list of
1849 SNAT and DNAT IP addresses. This is used to send gratuitous ARPs for
1850 SNAT and DNAT IP addresses via <code>localnet</code> and is valid for
1851 only L3 gateway ports. Example: <code>80:fa:5b:06:72:b7 158.36.44.22
1852 158.36.44.24</code>. This would result in generation of gratuitous
1853 ARPs for IP addresses 158.36.44.22 and 158.36.44.24 with a MAC
1854 address of 80:fa:5b:06:72:b7.
1855 </column>
1856 </group>
1857
1858 <group title="Localnet Options">
1859 <p>
1860 These options apply to logical ports with <ref column="type"/> of
1861 <code>localnet</code>.
1862 </p>
1863
1864 <column name="options" key="network_name">
1865 Required. <code>ovn-controller</code> uses the configuration entry
1866 <code>ovn-bridge-mappings</code> to determine how to connect to this
1867 network. <code>ovn-bridge-mappings</code> is a list of network names
1868 mapped to a local OVS bridge that provides access to that network. An
1869 example of configuring <code>ovn-bridge-mappings</code> would be:
1870
1871 <pre>$ ovs-vsctl set open . external-ids:ovn-bridge-mappings=physnet1:br-eth0,physnet2:br-eth1</pre>
1872
1873 <p>
1874 When a logical switch has a <code>localnet</code> port attached,
1875 every chassis that may have a local vif attached to that logical
1876 switch must have a bridge mapping configured to reach that
1877 <code>localnet</code>. Traffic that arrives on a
1878 <code>localnet</code> port is never forwarded over a tunnel to
1879 another chassis.
1880 </p>
1881 </column>
1882
1883 <column name="tag">
1884 If set, indicates that the port represents a connection to a specific
1885 VLAN on a locally accessible network. The VLAN ID is used to match
1886 incoming traffic and is also added to outgoing traffic.
1887 </column>
1888 </group>
1889
1890 <group title="L2 Gateway Options">
1891 <p>
1892 These options apply to logical ports with <ref column="type"/> of
1893 <code>l2gateway</code>.
1894 </p>
1895
1896 <column name="options" key="network_name">
1897 Required. <code>ovn-controller</code> uses the configuration entry
1898 <code>ovn-bridge-mappings</code> to determine how to connect to this
1899 network. <code>ovn-bridge-mappings</code> is a list of network names
1900 mapped to a local OVS bridge that provides access to that network. An
1901 example of configuring <code>ovn-bridge-mappings</code> would be:
1902
1903 <pre>$ ovs-vsctl set open . external-ids:ovn-bridge-mappings=physnet1:br-eth0,physnet2:br-eth1</pre>
1904
1905 <p>
1906 When a logical switch has a <code>l2gateway</code> port attached,
1907 the chassis that the <code>l2gateway</code> port is bound to
1908 must have a bridge mapping configured to reach the network
1909 identified by <code>network_name</code>.
1910 </p>
1911 </column>
1912
1913 <column name="options" key="l2gateway-chassis">
1914 Required. The <code>chassis</code> in which the port resides.
1915 </column>
1916
1917 <column name="tag">
1918 If set, indicates that the gateway is connected to a specific
1919 VLAN on the physical network. The VLAN ID is used to match
1920 incoming traffic and is also added to outgoing traffic.
1921 </column>
1922 </group>
1923
1924 <group title="VTEP Options">
1925 <p>
1926 These options apply to logical ports with <ref column="type"/> of
1927 <code>vtep</code>.
1928 </p>
1929
1930 <column name="options" key="vtep-physical-switch">
1931 Required. The name of the VTEP gateway.
1932 </column>
1933
1934 <column name="options" key="vtep-logical-switch">
1935 Required. A logical switch name connected by the VTEP gateway. Must
1936 be set when <ref column="type"/> is <code>vtep</code>.
1937 </column>
1938 </group>
1939
1940 <group title="VMI (or VIF) Options">
1941 <p>
1942 These options apply to logical ports with <ref column="type"/> having
1943 (empty string)
1944 </p>
1945
1946 <column name="options" key="qos_max_rate">
1947 If set, indicates the maximum rate for data sent from this interface,
1948 in bit/s. The traffic will be shaped according to this limit.
1949 </column>
1950
1951 <column name="options" key="qos_burst">
1952 If set, indicates the maximum burst size for data sent from this
1953 interface, in bits.
1954 </column>
1955
1956 <column name="options" key="qdisc_queue_id"
1957 type='{"type": "integer", "minInteger": 1, "maxInteger": 61440}'>
1958 Indicates the queue number on the physical device. This is same as the
1959 <code>queue_id</code> used in OpenFlow in <code>struct
1960 ofp_action_enqueue</code>.
1961 </column>
1962 </group>
1963
1964 <group title="Chassis Redirect Options">
1965 <p>
1966 These options apply to logical ports with <ref column="type"/>
1967 of <code>chassisredirect</code>.
1968 </p>
1969
1970 <column name="options" key="distributed-port">
1971 The name of the distributed port for which this
1972 <code>chassisredirect</code> port represents a particular instance.
1973 </column>
1974
1975 <column name="options" key="redirect-chassis">
1976 The <code>chassis</code> that this <code>chassisredirect</code> port
1977 is bound to. This is taken from <ref table="Logical_Router_Port"
1978 column="options" key="redirect-chassis" db="OVN_Northbound"/>
1979 in the OVN_Northbound database's <ref table="Logical_Router_Port"
1980 db="OVN_Northbound"/> table.
1981 </column>
1982 </group>
1983
1984 <group title="Nested Containers">
1985 <p>
1986 These columns support containers nested within a VM. Specifically,
1987 they are used when <ref column="type"/> is empty and <ref
1988 column="logical_port"/> identifies the interface of a container spawned
1989 inside a VM. They are empty for containers or VMs that run directly on
1990 a hypervisor.
1991 </p>
1992
1993 <column name="parent_port">
1994 This is taken from
1995 <ref table="Logical_Switch_Port" column="parent_name"
1996 db="OVN_Northbound"/> in the OVN_Northbound database's
1997 <ref table="Logical_Switch_Port" db="OVN_Northbound"/> table.
1998 </column>
1999
2000 <column name="tag">
2001 <p>
2002 Identifies the VLAN tag in the network traffic associated with that
2003 container's network interface.
2004 </p>
2005
2006 <p>
2007 This column is used for a different purpose when <ref column="type"/>
2008 is <code>localnet</code> (see <code>Localnet Options</code>, above)
2009 or <code>l2gateway</code> (see <code>L2 Gateway Options</code>, above).
2010 </p>
2011 </column>
2012 </group>
2013 </table>
2014
2015 <table name="MAC_Binding" title="IP to MAC bindings">
2016 <p>
2017 Each row in this table specifies a binding from an IP address to an
2018 Ethernet address that has been discovered through ARP (for IPv4) or
2019 neighbor discovery (for IPv6). This table is primarily used to discover
2020 bindings on physical networks, because IP-to-MAC bindings for virtual
2021 machines are usually populated statically into the <ref
2022 table="Port_Binding"/> table.
2023 </p>
2024
2025 <p>
2026 This table expresses a functional relationship: <ref
2027 table="MAC_Binding"/>(<ref column="logical_port"/>, <ref column="ip"/>) =
2028 <ref column="mac"/>.
2029 </p>
2030
2031 <p>
2032 In outline, the lifetime of a logical router's MAC binding looks like
2033 this:
2034 </p>
2035
2036 <ol>
2037 <li>
2038 On hypervisor 1, a logical router determines that a packet should be
2039 forwarded to IP address <var>A</var> on one of its router ports. It
2040 uses its logical flow table to determine that <var>A</var> lacks a
2041 static IP-to-MAC binding and the <code>get_arp</code> action to
2042 determine that it lacks a dynamic IP-to-MAC binding.
2043 </li>
2044
2045 <li>
2046 Using an OVN logical <code>arp</code> action, the logical router
2047 generates and sends a broadcast ARP request to the router port. It
2048 drops the IP packet.
2049 </li>
2050
2051 <li>
2052 The logical switch attached to the router port delivers the ARP request
2053 to all of its ports. (It might make sense to deliver it only to ports
2054 that have no static IP-to-MAC bindings, but this could also be
2055 surprising behavior.)
2056 </li>
2057
2058 <li>
2059 A host or VM on hypervisor 2 (which might be the same as hypervisor 1)
2060 attached to the logical switch owns the IP address in question. It
2061 composes an ARP reply and unicasts it to the logical router port's
2062 Ethernet address.
2063 </li>
2064
2065 <li>
2066 The logical switch delivers the ARP reply to the logical router port.
2067 </li>
2068
2069 <li>
2070 The logical router flow table executes a <code>put_arp</code> action.
2071 To record the IP-to-MAC binding, <code>ovn-controller</code> adds a row
2072 to the <ref table="MAC_Binding"/> table.
2073 </li>
2074
2075 <li>
2076 On hypervisor 1, <code>ovn-controller</code> receives the updated <ref
2077 table="MAC_Binding"/> table from the OVN southbound database. The next
2078 packet destined to <var>A</var> through the logical router is sent
2079 directly to the bound Ethernet address.
2080 </li>
2081 </ol>
2082
2083 <column name="logical_port">
2084 The logical port on which the binding was discovered.
2085 </column>
2086
2087 <column name="ip">
2088 The bound IP address.
2089 </column>
2090
2091 <column name="mac">
2092 The Ethernet address to which the IP is bound.
2093 </column>
2094 <column name="datapath">
2095 The logical datapath to which the logical port belongs.
2096 </column>
2097 </table>
2098
2099 <table name="DHCP_Options" title="DHCP Options supported by native OVN DHCP">
2100 <p>
2101 Each row in this table stores the DHCP Options supported by native OVN
2102 DHCP. <code>ovn-northd</code> populates this table with the supported
2103 DHCP options. <code>ovn-controller</code> looks up this table to get the
2104 DHCP codes of the DHCP options defined in the "put_dhcp_opts" action.
2105 Please refer to the RFC 2132 <code>"https://tools.ietf.org/html/rfc2132"</code>
2106 for the possible list of DHCP options that can be defined here.
2107 </p>
2108
2109 <column name="name">
2110 <p>
2111 Name of the DHCP option.
2112 </p>
2113
2114 <p>
2115 Example. name="router"
2116 </p>
2117 </column>
2118
2119 <column name="code">
2120 <p>
2121 DHCP option code for the DHCP option as defined in the RFC 2132.
2122 </p>
2123
2124 <p>
2125 Example. code=3
2126 </p>
2127 </column>
2128
2129 <column name="type">
2130 <p>
2131 Data type of the DHCP option code.
2132 </p>
2133
2134 <dl>
2135 <dt><code>value: bool</code></dt>
2136 <dd>
2137 <p>
2138 This indicates that the value of the DHCP option is a bool.
2139 </p>
2140
2141 <p>
2142 Example. "name=ip_forward_enable", "code=19", "type=bool".
2143 </p>
2144
2145 <p>
2146 put_dhcp_opts(..., ip_forward_enable = 1,...)
2147 </p>
2148 </dd>
2149
2150 <dt><code>value: uint8</code></dt>
2151 <dd>
2152 <p>
2153 This indicates that the value of the DHCP option is an unsigned
2154 int8 (8 bits)
2155 </p>
2156
2157 <p>
2158 Example. "name=default_ttl", "code=23", "type=uint8".
2159 </p>
2160
2161 <p>
2162 put_dhcp_opts(..., default_ttl = 50,...)
2163 </p>
2164 </dd>
2165
2166 <dt><code>value: uint16</code></dt>
2167 <dd>
2168 <p>
2169 This indicates that the value of the DHCP option is an unsigned
2170 int16 (16 bits).
2171 </p>
2172
2173 <p>
2174 Example. "name=mtu", "code=26", "type=uint16".
2175 </p>
2176
2177 <p>
2178 put_dhcp_opts(..., mtu = 1450,...)
2179 </p>
2180 </dd>
2181
2182 <dt><code>value: uint32</code></dt>
2183 <dd>
2184 <p>
2185 This indicates that the value of the DHCP option is an unsigned
2186 int32 (32 bits).
2187 </p>
2188
2189 <p>
2190 Example. "name=lease_time", "code=51", "type=uint32".
2191 </p>
2192
2193 <p>
2194 put_dhcp_opts(..., lease_time = 86400,...)
2195 </p>
2196 </dd>
2197
2198 <dt><code>value: ipv4</code></dt>
2199 <dd>
2200 <p>
2201 This indicates that the value of the DHCP option is an IPv4
2202 address or addresses.
2203 </p>
2204
2205 <p>
2206 Example. "name=router", "code=3", "type=ipv4".
2207 </p>
2208
2209 <p>
2210 put_dhcp_opts(..., router = 10.0.0.1,...)
2211 </p>
2212
2213 <p>
2214 Example. "name=dns_server", "code=6", "type=ipv4".
2215 </p>
2216
2217 <p>
2218 put_dhcp_opts(..., dns_server = {8.8.8.8 7.7.7.7},...)
2219 </p>
2220 </dd>
2221
2222 <dt><code>value: static_routes</code></dt>
2223 <dd>
2224 <p>
2225 This indicates that the value of the DHCP option contains a pair of
2226 IPv4 route and next hop addresses.
2227 </p>
2228
2229 <p>
2230 Example. "name=classless_static_route", "code=121", "type=static_routes".
2231 </p>
2232
2233 <p>
2234 put_dhcp_opts(..., classless_static_route = {30.0.0.0/24,10.0.0.4,0.0.0.0/0,10.0.0.1}...)
2235 </p>
2236 </dd>
2237
2238 <dt><code>value: str</code></dt>
2239 <dd>
2240 <p>
2241 This indicates that the value of the DHCP option is a string.
2242 </p>
2243
2244 <p>
2245 Example. "name=host_name", "code=12", "type=str".
2246 </p>
2247 </dd>
2248 </dl>
2249 </column>
2250 </table>
2251
2252 <table name="DHCPv6_Options" title="DHCPv6 Options supported by native OVN DHCPv6">
2253 <p>
2254 Each row in this table stores the DHCPv6 Options supported by native OVN
2255 DHCPv6. <code>ovn-northd</code> populates this table with the supported
2256 DHCPv6 options. <code>ovn-controller</code> looks up this table to get
2257 the DHCPv6 codes of the DHCPv6 options defined in the
2258 <code>put_dhcpv6_opts</code> action. Please refer to RFC 3315 and RFC
2259 3646 for the list of DHCPv6 options that can be defined here.
2260 </p>
2261
2262 <column name="name">
2263 <p>
2264 Name of the DHCPv6 option.
2265 </p>
2266
2267 <p>
2268 Example. name="ia_addr"
2269 </p>
2270 </column>
2271
2272 <column name="code">
2273 <p>
2274 DHCPv6 option code for the DHCPv6 option as defined in the appropriate
2275 RFC.
2276 </p>
2277
2278 <p>
2279 Example. code=3
2280 </p>
2281 </column>
2282
2283 <column name="type">
2284 <p>
2285 Data type of the DHCPv6 option code.
2286 </p>
2287
2288 <dl>
2289 <dt><code>value: ipv6</code></dt>
2290 <dd>
2291 <p>
2292 This indicates that the value of the DHCPv6 option is an IPv6
2293 address(es).
2294 </p>
2295
2296 <p>
2297 Example. "name=ia_addr", "code=5", "type=ipv6".
2298 </p>
2299
2300 <p>
2301 put_dhcpv6_opts(..., ia_addr = ae70::4,...)
2302 </p>
2303 </dd>
2304
2305 <dt><code>value: str</code></dt>
2306 <dd>
2307 <p>
2308 This indicates that the value of the DHCPv6 option is a string.
2309 </p>
2310
2311 <p>
2312 Example. "name=domain_search", "code=24", "type=str".
2313 </p>
2314
2315 <p>
2316 put_dhcpv6_opts(..., domain_search = ovn.domain,...)
2317 </p>
2318 </dd>
2319
2320 <dt><code>value: mac</code></dt>
2321 <dd>
2322 <p>
2323 This indicates that the value of the DHCPv6 option is a MAC address.
2324 </p>
2325
2326 <p>
2327 Example. "name=server_id", "code=2", "type=mac".
2328 </p>
2329
2330 <p>
2331 put_dhcpv6_opts(..., server_id = 01:02:03:04L05:06,...)
2332 </p>
2333 </dd>
2334 </dl>
2335 </column>
2336 </table>
2337 <table name="Connection" title="OVSDB client connections.">
2338 <p>
2339 Configuration for a database connection to an Open vSwitch database
2340 (OVSDB) client.
2341 </p>
2342
2343 <p>
2344 This table primarily configures the Open vSwitch database server
2345 (<code>ovsdb-server</code>).
2346 </p>
2347
2348 <p>
2349 The Open vSwitch database server can initiate and maintain active
2350 connections to remote clients. It can also listen for database
2351 connections.
2352 </p>
2353
2354 <group title="Core Features">
2355 <column name="target">
2356 <p>Connection methods for clients.</p>
2357 <p>
2358 The following connection methods are currently supported:
2359 </p>
2360 <dl>
2361 <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
2362 <dd>
2363 <p>
2364 The specified SSL <var>port</var> on the host at the given
2365 <var>ip</var>, which must be expressed as an IP address
2366 (not a DNS name). A valid SSL configuration must be provided
2367 when this form is used, this configuration can be specified
2368 via command-line options or the <ref table="SSL"/> table.
2369 </p>
2370 <p>
2371 If <var>port</var> is not specified, it defaults to 6640.
2372 </p>
2373 <p>
2374 SSL support is an optional feature that is not always
2375 built as part of Open vSwitch.
2376 </p>
2377 </dd>
2378
2379 <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
2380 <dd>
2381 <p>
2382 The specified TCP <var>port</var> on the host at the given
2383 <var>ip</var>, which must be expressed as an IP address (not a
2384 DNS name), where <var>ip</var> can be IPv4 or IPv6 address. If
2385 <var>ip</var> is an IPv6 address, wrap it in square brackets,
2386 e.g. <code>tcp:[::1]:6640</code>.
2387 </p>
2388 <p>
2389 If <var>port</var> is not specified, it defaults to 6640.
2390 </p>
2391 </dd>
2392 <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
2393 <dd>
2394 <p>
2395 Listens for SSL connections on the specified TCP <var>port</var>.
2396 Specify 0 for <var>port</var> to have the kernel automatically
2397 choose an available port. If <var>ip</var>, which must be
2398 expressed as an IP address (not a DNS name), is specified, then
2399 connections are restricted to the specified local IP address
2400 (either IPv4 or IPv6 address). If <var>ip</var> is an IPv6
2401 address, wrap in square brackets,
2402 e.g. <code>pssl:6640:[::1]</code>. If <var>ip</var> is not
2403 specified then it listens only on IPv4 (but not IPv6) addresses.
2404 A valid SSL configuration must be provided when this form is used,
2405 this can be specified either via command-line options or the
2406 <ref table="SSL"/> table.
2407 </p>
2408 <p>
2409 If <var>port</var> is not specified, it defaults to 6640.
2410 </p>
2411 <p>
2412 SSL support is an optional feature that is not always built as
2413 part of Open vSwitch.
2414 </p>
2415 </dd>
2416 <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
2417 <dd>
2418 <p>
2419 Listens for connections on the specified TCP <var>port</var>.
2420 Specify 0 for <var>port</var> to have the kernel automatically
2421 choose an available port. If <var>ip</var>, which must be
2422 expressed as an IP address (not a DNS name), is specified, then
2423 connections are restricted to the specified local IP address
2424 (either IPv4 or IPv6 address). If <var>ip</var> is an IPv6
2425 address, wrap it in square brackets,
2426 e.g. <code>ptcp:6640:[::1]</code>. If <var>ip</var> is not
2427 specified then it listens only on IPv4 addresses.
2428 </p>
2429 <p>
2430 If <var>port</var> is not specified, it defaults to 6640.
2431 </p>
2432 </dd>
2433 </dl>
2434 <p>When multiple clients are configured, the <ref column="target"/>
2435 values must be unique. Duplicate <ref column="target"/> values yield
2436 unspecified results.</p>
2437 </column>
2438
2439 <column name="read_only">
2440 <code>true</code> to restrict these connections to read-only
2441 transactions, <code>false</code> to allow them to modify the database.
2442 </column>
2443 </group>
2444
2445 <group title="Client Failure Detection and Handling">
2446 <column name="max_backoff">
2447 Maximum number of milliseconds to wait between connection attempts.
2448 Default is implementation-specific.
2449 </column>
2450
2451 <column name="inactivity_probe">
2452 Maximum number of milliseconds of idle time on connection to the client
2453 before sending an inactivity probe message. If Open vSwitch does not
2454 communicate with the client for the specified number of seconds, it
2455 will send a probe. If a response is not received for the same
2456 additional amount of time, Open vSwitch assumes the connection has been
2457 broken and attempts to reconnect. Default is implementation-specific.
2458 A value of 0 disables inactivity probes.
2459 </column>
2460 </group>
2461
2462 <group title="Status">
2463 <p>
2464 Key-value pair of <ref column="is_connected"/> is always updated.
2465 Other key-value pairs in the status columns may be updated depends
2466 on the <ref column="target"/> type.
2467 </p>
2468
2469 <p>
2470 When <ref column="target"/> specifies a connection method that
2471 listens for inbound connections (e.g. <code>ptcp:</code> or
2472 <code>punix:</code>), both <ref column="n_connections"/> and
2473 <ref column="is_connected"/> may also be updated while the
2474 remaining key-value pairs are omitted.
2475 </p>
2476
2477 <p>
2478 On the other hand, when <ref column="target"/> specifies an
2479 outbound connection, all key-value pairs may be updated, except
2480 the above-mentioned two key-value pairs associated with inbound
2481 connection targets. They are omitted.
2482 </p>
2483
2484 <column name="is_connected">
2485 <code>true</code> if currently connected to this client,
2486 <code>false</code> otherwise.
2487 </column>
2488
2489 <column name="status" key="last_error">
2490 A human-readable description of the last error on the connection
2491 to the manager; i.e. <code>strerror(errno)</code>. This key
2492 will exist only if an error has occurred.
2493 </column>
2494
2495 <column name="status" key="state"
2496 type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
2497 <p>
2498 The state of the connection to the manager:
2499 </p>
2500 <dl>
2501 <dt><code>VOID</code></dt>
2502 <dd>Connection is disabled.</dd>
2503
2504 <dt><code>BACKOFF</code></dt>
2505 <dd>Attempting to reconnect at an increasing period.</dd>
2506
2507 <dt><code>CONNECTING</code></dt>
2508 <dd>Attempting to connect.</dd>
2509
2510 <dt><code>ACTIVE</code></dt>
2511 <dd>Connected, remote host responsive.</dd>
2512
2513 <dt><code>IDLE</code></dt>
2514 <dd>Connection is idle. Waiting for response to keep-alive.</dd>
2515 </dl>
2516 <p>
2517 These values may change in the future. They are provided only for
2518 human consumption.
2519 </p>
2520 </column>
2521
2522 <column name="status" key="sec_since_connect"
2523 type='{"type": "integer", "minInteger": 0}'>
2524 The amount of time since this client last successfully connected
2525 to the database (in seconds). Value is empty if client has never
2526 successfully been connected.
2527 </column>
2528
2529 <column name="status" key="sec_since_disconnect"
2530 type='{"type": "integer", "minInteger": 0}'>
2531 The amount of time since this client last disconnected from the
2532 database (in seconds). Value is empty if client has never
2533 disconnected.
2534 </column>
2535
2536 <column name="status" key="locks_held">
2537 Space-separated list of the names of OVSDB locks that the connection
2538 holds. Omitted if the connection does not hold any locks.
2539 </column>
2540
2541 <column name="status" key="locks_waiting">
2542 Space-separated list of the names of OVSDB locks that the connection is
2543 currently waiting to acquire. Omitted if the connection is not waiting
2544 for any locks.
2545 </column>
2546
2547 <column name="status" key="locks_lost">
2548 Space-separated list of the names of OVSDB locks that the connection
2549 has had stolen by another OVSDB client. Omitted if no locks have been
2550 stolen from this connection.
2551 </column>
2552
2553 <column name="status" key="n_connections"
2554 type='{"type": "integer", "minInteger": 2}'>
2555 When <ref column="target"/> specifies a connection method that
2556 listens for inbound connections (e.g. <code>ptcp:</code> or
2557 <code>pssl:</code>) and more than one connection is actually active,
2558 the value is the number of active connections. Otherwise, this
2559 key-value pair is omitted.
2560 </column>
2561
2562 <column name="status" key="bound_port" type='{"type": "integer"}'>
2563 When <ref column="target"/> is <code>ptcp:</code> or
2564 <code>pssl:</code>, this is the TCP port on which the OVSDB server is
2565 listening. (This is particularly useful when <ref
2566 column="target"/> specifies a port of 0, allowing the kernel to
2567 choose any available port.)
2568 </column>
2569 </group>
2570
2571 <group title="Common Columns">
2572 The overall purpose of these columns is described under <code>Common
2573 Columns</code> at the beginning of this document.
2574
2575 <column name="external_ids"/>
2576 <column name="other_config"/>
2577 </group>
2578 </table>
2579 <table name="SSL">
2580 SSL configuration for ovn-sb database access.
2581
2582 <column name="private_key">
2583 Name of a PEM file containing the private key used as the switch's
2584 identity for SSL connections to the controller.
2585 </column>
2586
2587 <column name="certificate">
2588 Name of a PEM file containing a certificate, signed by the
2589 certificate authority (CA) used by the controller and manager,
2590 that certifies the switch's private key, identifying a trustworthy
2591 switch.
2592 </column>
2593
2594 <column name="ca_cert">
2595 Name of a PEM file containing the CA certificate used to verify
2596 that the switch is connected to a trustworthy controller.
2597 </column>
2598
2599 <column name="bootstrap_ca_cert">
2600 If set to <code>true</code>, then Open vSwitch will attempt to
2601 obtain the CA certificate from the controller on its first SSL
2602 connection and save it to the named PEM file. If it is successful,
2603 it will immediately drop the connection and reconnect, and from then
2604 on all SSL connections must be authenticated by a certificate signed
2605 by the CA certificate thus obtained. <em>This option exposes the
2606 SSL connection to a man-in-the-middle attack obtaining the initial
2607 CA certificate.</em> It may still be useful for bootstrapping.
2608 </column>
2609
2610 <group title="Common Columns">
2611 The overall purpose of these columns is described under <code>Common
2612 Columns</code> at the beginning of this document.
2613
2614 <column name="external_ids"/>
2615 </group>
2616 </table>
2617 </database>