vtep: Add error messages for logical router support
[cascardo/ovs.git] / vtep / vtep.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <database name="vtep" title="Hardware VTEP Database">
3   <p>
4     This schema specifies relations that a VTEP can use to integrate
5     physical ports into logical switches maintained by a network
6     virtualization controller such as NSX.
7   </p>
8
9   <p>Glossary:</p>
10
11   <dl>
12     <dt>VTEP</dt>
13     <dd>
14       VXLAN Tunnel End Point, an entity which originates and/or terminates
15       VXLAN tunnels.
16     </dd>
17
18     <dt>HSC</dt>
19     <dd>
20       Hardware Switch Controller.
21     </dd>
22
23     <dt>NVC</dt>
24     <dd>
25       Network Virtualization Controller, e.g. NSX.
26     </dd>
27
28     <dt>VRF</dt>
29     <dd>
30       Virtual Routing and Forwarding instance.
31     </dd>
32   </dl>
33
34   <table name="Global" title="Top-level configuration.">
35     Top-level configuration for a hardware VTEP.  There must be
36     exactly one record in the <ref table="Global"/> table.
37
38     <column name="switches">
39       <p>
40         The physical switch or switches managed by the VTEP.
41       </p>
42
43       <p>
44         When a physical switch integrates support for this VTEP schema, which
45         is expected to be the most common case, this column should point to one
46         <ref table="Physical_Switch"/> record that represents the switch
47         itself.  In another possible implementation, a server or a VM presents
48         a VTEP schema front-end interface to one or more physical switches,
49         presumably communicating with those physical switches over a
50         proprietary protocol.  In that case, this column would point to one
51         <ref table="Physical_Switch"/> for each physical switch, and the set
52         might change over time as the front-end server comes to represent a
53         differing set of switches.
54       </p>
55     </column>
56
57     <group title="Database Configuration">
58       <p>
59         These columns primarily configure the database server
60         (<code>ovsdb-server</code>), not the hardware VTEP itself.
61       </p>
62
63       <column name="managers">
64         Database clients to which the database server should connect or
65         to which it should listen, along with options for how these
66         connection should be configured.  See the <ref table="Manager"/>
67         table for more information.
68       </column>
69     </group>
70   </table>
71
72   <table name="Manager" title="OVSDB management connection.">
73     <p>
74       Configuration for a database connection to an Open vSwitch Database
75       (OVSDB) client.
76     </p>
77
78     <p>
79       The database server can initiate and maintain active connections
80       to remote clients.  It can also listen for database connections.
81     </p>
82
83     <group title="Core Features">
84       <column name="target">
85         <p>Connection method for managers.</p>
86         <p>
87           The following connection methods are currently supported:
88         </p>
89         <dl>
90           <dt><code>ssl:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
91           <dd>
92             <p>
93               The specified SSL <var>port</var> (default: 6640) on the host at
94               the given <var>ip</var>, which must be expressed as an IP address
95               (not a DNS name).
96             </p>
97             <p>
98               SSL key and certificate configuration happens outside the
99               database.
100             </p>
101           </dd>
102
103           <dt><code>tcp:<var>ip</var></code>[<code>:<var>port</var></code>]</dt>
104           <dd>
105             The specified TCP <var>port</var> (default: 6640) on the host at
106             the given <var>ip</var>, which must be expressed as an IP address
107             (not a DNS name).
108           </dd>
109           <dt><code>pssl:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
110           <dd>
111             <p>
112               Listens for SSL connections on the specified TCP <var>port</var>
113               (default: 6640).  If <var>ip</var>, which must be expressed as an
114               IP address (not a DNS name), is specified, then connections are
115               restricted to the specified local IP address.
116             </p>
117           </dd>
118           <dt><code>ptcp:</code>[<var>port</var>][<code>:<var>ip</var></code>]</dt>
119           <dd>
120             Listens for connections on the specified TCP <var>port</var>
121             (default: 6640).  If <var>ip</var>, which must be expressed as an
122             IP address (not a DNS name), is specified, then connections are
123             restricted to the specified local IP address.
124           </dd>
125         </dl>
126       </column>
127     </group>
128
129     <group title="Client Failure Detection and Handling">
130       <column name="max_backoff">
131         Maximum number of milliseconds to wait between connection attempts.
132         Default is implementation-specific.
133       </column>
134
135       <column name="inactivity_probe">
136         Maximum number of milliseconds of idle time on connection to the
137         client before sending an inactivity probe message.  If the Open
138         vSwitch database does not communicate with the client for the
139         specified number of seconds, it will send a probe.  If a
140         response is not received for the same additional amount of time,
141         the database server assumes the connection has been broken
142         and attempts to reconnect.  Default is implementation-specific.
143         A value of 0 disables inactivity probes.
144       </column>
145     </group>
146
147     <group title="Status">
148       <column name="is_connected">
149         <code>true</code> if currently connected to this manager,
150         <code>false</code> otherwise.
151       </column>
152
153       <column name="status" key="last_error">
154         A human-readable description of the last error on the connection
155         to the manager; i.e. <code>strerror(errno)</code>.  This key
156         will exist only if an error has occurred.
157       </column>
158
159       <column name="status" key="state"
160               type='{"type": "string", "enum": ["set", ["VOID", "BACKOFF", "CONNECTING", "ACTIVE", "IDLE"]]}'>
161         <p>
162           The state of the connection to the manager:
163         </p>
164         <dl>
165           <dt><code>VOID</code></dt>
166           <dd>Connection is disabled.</dd>
167
168           <dt><code>BACKOFF</code></dt>
169           <dd>Attempting to reconnect at an increasing period.</dd>
170
171           <dt><code>CONNECTING</code></dt>
172           <dd>Attempting to connect.</dd>
173
174           <dt><code>ACTIVE</code></dt>
175           <dd>Connected, remote host responsive.</dd>
176
177           <dt><code>IDLE</code></dt>
178           <dd>Connection is idle.  Waiting for response to keep-alive.</dd>
179         </dl>
180         <p>
181           These values may change in the future.  They are provided only for
182           human consumption.
183         </p>
184       </column>
185
186       <column name="status" key="sec_since_connect"
187               type='{"type": "integer", "minInteger": 0}'>
188         The amount of time since this manager last successfully connected
189         to the database (in seconds). Value is empty if manager has never
190         successfully connected.
191       </column>
192
193       <column name="status" key="sec_since_disconnect"
194               type='{"type": "integer", "minInteger": 0}'>
195         The amount of time since this manager last disconnected from the
196         database (in seconds). Value is empty if manager has never
197         disconnected.
198       </column>
199
200       <column name="status" key="locks_held">
201         Space-separated list of the names of OVSDB locks that the connection
202         holds.  Omitted if the connection does not hold any locks.
203       </column>
204
205       <column name="status" key="locks_waiting">
206         Space-separated list of the names of OVSDB locks that the connection is
207         currently waiting to acquire.  Omitted if the connection is not waiting
208         for any locks.
209       </column>
210
211       <column name="status" key="locks_lost">
212         Space-separated list of the names of OVSDB locks that the connection
213         has had stolen by another OVSDB client.  Omitted if no locks have been
214         stolen from this connection.
215       </column>
216
217       <column name="status" key="n_connections"
218               type='{"type": "integer", "minInteger": 2}'>
219         <p>
220           When <ref column="target"/> specifies a connection method that
221           listens for inbound connections (e.g. <code>ptcp:</code> or
222           <code>pssl:</code>) and more than one connection is actually active,
223           the value is the number of active connections.  Otherwise, this
224           key-value pair is omitted.
225         </p>
226         <p>
227           When multiple connections are active, status columns and key-value
228           pairs (other than this one) report the status of one arbitrarily
229           chosen connection.
230         </p>
231       </column>
232     </group>
233
234     <group title="Connection Parameters">
235       <p>
236         Additional configuration for a connection between the manager
237         and the database server.
238       </p>
239
240       <column name="other_config" key="dscp"
241               type='{"type": "integer"}'>
242         The Differentiated Service Code Point (DSCP) is specified using 6 bits
243         in the Type of Service (TOS) field in the IP header. DSCP provides a
244         mechanism to classify the network traffic and provide Quality of
245         Service (QoS) on IP networks.
246
247         The DSCP value specified here is used when establishing the
248         connection between the manager and the database server.  If no
249         value is specified, a default value of 48 is chosen.  Valid DSCP
250         values must be in the range 0 to 63.
251       </column>
252     </group>
253   </table>
254
255   <table name="Physical_Switch" title="A physical switch.">
256     A physical switch that implements a VTEP.
257
258     <column name="ports">
259       The physical ports within the switch.
260     </column>
261
262     <column name="tunnels">
263       Tunnels created by this switch as instructed by the NVC.
264     </column>
265
266     <group title="Network Status">
267       <column name="management_ips">
268         IPv4 or IPv6 addresses at which the switch may be contacted
269         for management purposes.
270       </column>
271
272       <column name="tunnel_ips">
273         <p>
274           IPv4 or IPv6 addresses on which the switch may originate or
275           terminate tunnels.
276         </p>
277
278         <p>
279           This column is intended to allow a <ref table="Manager"/> to
280           determine the <ref table="Physical_Switch"/> that terminates
281           the tunnel represented by a <ref table="Physical_Locator"/>.
282         </p>
283       </column>
284     </group>
285
286     <group title="Identification">
287       <column name="name">
288         Symbolic name for the switch, such as its hostname.
289       </column>
290
291       <column name="description">
292         An extended description for the switch, such as its switch login
293         banner.
294       </column>
295     </group>
296     <group title="Error Notification">
297       <p>
298         An entry in this column indicates to the NVC that this switch
299         has encountered a fault. The switch must clear this column
300         when the fault has been cleared.
301       </p>
302
303       <column name="switch_fault_status" key="mac_table_exhaustion">
304         Indicates that the switch has been unable to process MAC
305         entries requested by the NVC due to lack of table resources.
306       </column>
307
308       <column name="switch_fault_status" key="tunnel_exhaustion">
309         Indicates that the switch has been unable to create tunnels
310         requested by the NVC due to lack of resources.
311       </column>
312
313       <column name="switch_fault_status" key="lr_switch_bindings_fault">
314         Indicates that the switch has been unable to create the logical router
315         interfaces requested by the NVC due to conflicting configurations or a
316         lack of hardware resources.
317       </column>
318
319       <column name="switch_fault_status" key="lr_static_routes_fault">
320         Indicates that the switch has been unable to create the static routes
321         requested by the NVC due to conflicting configurations or a lack of
322         hardware resources.
323       </column>
324
325       <column name="switch_fault_status" key="lr_creation_fault">
326         Indicates that the switch has been unable to create the logical router
327         requested by the NVC due to conflicting configurations or a lack of
328         hardware resources.
329       </column>
330
331       <column name="switch_fault_status" key="lr_support_fault">
332         Indicates that the switch does not support logical routing.
333       </column>
334
335       <column name="switch_fault_status" key="unspecified_fault">
336         Indicates that an error has occurred in the switch but that no
337         more specific information is available.
338       </column>
339
340     </group>
341   </table>
342
343   <table name="Tunnel" title="A tunnel created by a physical switch.">
344     A tunnel created by a <ref table="Physical_Switch"/>.
345
346     <column name="local">
347       Tunnel end-point local to the physical switch.
348     </column>
349
350     <column name="remote">
351       Tunnel end-point remote to the physical switch.
352     </column>
353
354     <group title="Bidirectional Forwarding Detection (BFD)">
355       <p>
356         BFD, defined in RFC 5880, allows point to point detection of
357         connectivity failures by occasional transmission of BFD control
358         messages. VTEPs are expected to implement BFD.
359       </p>
360
361       <p>
362         BFD operates by regularly transmitting BFD control messages at a
363         rate negotiated independently in each direction.  Each endpoint
364         specifies the rate at which it expects to receive control messages,
365         and the rate at which it's willing to transmit them.  An endpoint
366         which fails to receive BFD control messages for a period of three
367         times the expected reception rate will signal a connectivity
368         fault.  In the case of a unidirectional connectivity issue, the
369         system not receiving BFD control messages will signal the problem
370         to its peer in the messages it transmits.
371       </p>
372
373       <p>
374         A hardware VTEP is expected to use BFD to determine reachability of
375         devices at the end of the tunnels with which it exchanges data. This
376         can enable the VTEP to choose a functioning service node among a set of
377         service nodes providing high availability. It also enables the NVC to
378         report the health status of tunnels.
379       </p>
380
381       <p>
382         In many cases the BFD peer of a hardware VTEP will be an Open vSwitch
383         instance. The Open vSwitch implementation of BFD aims to comply
384         faithfully with the requirements put forth in RFC 5880.  Open vSwitch
385         does not implement the optional Authentication or ``Echo Mode''
386         features.
387       </p>
388
389       <group title="BFD Local Configuration">
390         <p>
391           The HSC writes the key-value pairs in the
392           <ref column="bfd_config_local"/> column to specify the local
393           configurations to be used for BFD sessions on this tunnel.
394         </p>
395
396         <column name="bfd_config_local" key="bfd_dst_mac">
397           Set to an Ethernet address in the form
398           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
399           to set the MAC expected as destination for received BFD packets.
400           The default is <code>00:23:20:00:00:01</code>.
401         </column>
402
403         <column name="bfd_config_local" key="bfd_dst_ip">
404           Set to an IPv4 address to set the IP address that is expected as destination
405           for received BFD packets.  The default is <code>169.254.1.0</code>.
406         </column>
407
408       </group>
409
410       <group title="BFD Remote Configuration">
411         <p>
412           The <ref column="bfd_config_remote"/> column is the remote
413           counterpart of the <ref column="bfd_config_local"/> column.
414           The NVC writes the key-value pairs in this column.
415         </p>
416
417         <column name="bfd_config_remote" key="bfd_dst_mac">
418           Set to an Ethernet address in the form
419           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
420           to set the destination MAC to be used for transmitted BFD packets.
421           The default is <code>00:23:20:00:00:01</code>.
422         </column>
423
424         <column name="bfd_config_remote" key="bfd_dst_ip">
425           Set to an IPv4 address to set the IP address used as destination
426           for transmitted BFD packets.  The default is <code>169.254.1.1</code>.
427         </column>
428
429       </group>
430
431       <group title="BFD Parameters">
432         <p>
433           The NVC sets up key-value pairs in the <ref column="bfd_params"/>
434           column to enable and configure BFD.
435         </p>
436
437         <column name="bfd_params" key="enable" type='{"type": "boolean"}'>
438           True to enable BFD on this <ref table="Tunnel"/>.  If not
439           specified, BFD will not be enabled by default.
440         </column>
441
442         <column name="bfd_params" key="min_rx"
443                 type='{"type": "integer", "minInteger": 1}'>
444           The shortest interval, in milliseconds, at which this BFD session
445           offers to receive BFD control messages.  The remote endpoint may
446           choose to send messages at a slower rate.  Defaults to
447           <code>1000</code>.
448         </column>
449
450         <column name="bfd_params" key="min_tx"
451                 type='{"type": "integer", "minInteger": 1}'>
452           The shortest interval, in milliseconds, at which this BFD session is
453           willing to transmit BFD control messages.  Messages will actually be
454           transmitted at a slower rate if the remote endpoint is not willing to
455           receive as quickly as specified.  Defaults to <code>100</code>.
456         </column>
457
458         <column name="bfd_params" key="decay_min_rx" type='{"type": "integer"}'>
459           An alternate receive interval, in milliseconds, that must be greater
460           than or equal to <ref column="bfd_params" key="min_rx"/>.  The
461           implementation should switch from <ref column="bfd_params" key="min_rx"/>
462           to <ref column="bfd_params" key="decay_min_rx"/> when there is no obvious
463           incoming data traffic at the tunnel, to reduce the CPU and bandwidth
464           cost of monitoring an idle tunnel.  This feature may be disabled by
465           setting a value of 0.  This feature is reset whenever
466           <ref column="bfd_params" key="decay_min_rx"/> or
467           <ref column="bfd_params" key="min_rx"/> changes.
468         </column>
469
470         <column name="bfd_params" key="forwarding_if_rx" type='{"type": "boolean"}'>
471           When <code>true</code>, traffic received on the <ref table="Tunnel"/>
472           is used to indicate the capability of packet I/O.
473           BFD control packets are still transmitted and received. At least one
474           BFD control packet must be received every
475           100 * <ref column="bfd_params" key="min_rx"/> amount of time.
476           Otherwise, even if traffic is received, the
477           <ref column="bfd_params" key="forwarding"/> will be <code>false</code>.
478         </column>
479
480         <column name="bfd_params" key="cpath_down" type='{"type": "boolean"}'>
481           Set to true to notify the remote endpoint that traffic should not be
482           forwarded to this system for some reason other than a connectivity
483           failure on the interface being monitored.  The typical underlying
484           reason is ``concatenated path down,'' that is, that connectivity
485           beyond the local system is down.  Defaults to false.
486         </column>
487
488         <column name="bfd_params" key="check_tnl_key" type='{"type": "boolean"}'>
489           Set to true to make BFD accept only control messages with a tunnel
490           key of zero.  By default, BFD accepts control messages with any
491           tunnel key.
492         </column>
493
494       </group>
495
496       <group title="BFD Status">
497         <p>
498           The VTEP sets key-value pairs in the <ref column="bfd_status"/>
499           column to report the status of BFD on this tunnel.  When BFD is
500           not enabled, with <ref column="bfd_params" key="enable"/>, the
501           HSC clears all key-value pairs from <ref column="bfd_status"/>.
502         </p>
503
504         <column name="bfd_status" key="enabled" type='{"type": "boolean"}'>
505           Set to true if the BFD session has been successfully enabled.
506           Set to false if the VTEP cannot support BFD or has insufficient
507           resources to enable BFD on this tunnel. The NVC will disable
508           the BFD monitoring on the other side of the tunnel once this
509           value is set to false.
510         </column>
511
512         <column name="bfd_status" key="state"
513                 type='{"type": "string",
514               "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
515           Reports the state of the BFD session.  The BFD session is fully
516           healthy and negotiated if <code>UP</code>.
517         </column>
518
519         <column name="bfd_status" key="forwarding" type='{"type": "boolean"}'>
520           Reports whether the BFD session believes this  <ref table="Tunnel"/>
521           may be used to forward traffic.  Typically this means the local session
522           is signaling <code>UP</code>, and the remote system isn't signaling a
523           problem such as concatenated path down.
524         </column>
525
526         <column name="bfd_status" key="diagnostic">
527           A diagnostic code specifying the local system's reason for the
528           last change in session state. The error messages are defined in
529           section 4.1 of [RFC 5880].
530         </column>
531
532        <column name="bfd_status" key="remote_state"
533                 type='{"type": "string",
534               "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
535           Reports the state of the remote endpoint's BFD session.
536         </column>
537
538         <column name="bfd_status" key="remote_diagnostic">
539           A diagnostic code specifying the remote system's reason for the
540           last change in session state. The error messages are defined in
541           section 4.1 of [RFC 5880].
542         </column>
543
544         <column name="bfd_status" key="info">
545           A short message providing further information about the BFD status
546           (possibly including reasons why BFD could not be enabled).
547         </column>
548       </group>
549     </group>
550   </table>
551
552   <table name="Physical_Port" title="A port within a physical switch.">
553     A port within a <ref table="Physical_Switch"/>.
554
555     <column name="vlan_bindings">
556       Identifies how VLANs on the physical port are bound to logical switches.
557       If, for example, the map contains a (VLAN, logical switch) pair, a packet
558       that arrives on the port in the VLAN is considered to belong to the
559       paired logical switch. A value of zero in the VLAN field means
560       that untagged traffic on the physical port is mapped to the
561       logical switch.
562     </column>
563
564     <column name="acl_bindings">
565       <p>
566         Attach Access Control Lists (ACLs) to the physical port. The
567         column consists of a map of VLAN tags to <ref table="ACL"/>s. If the value of
568         the VLAN tag in the map is 0, this means that the ACL is
569         associated with the entire physical port. Non-zero values mean
570         that the ACL is to be applied only on packets carrying that VLAN
571         tag value. Switches will not necessarily support matching on the
572         VLAN tag for all ACLs, and unsupported ACL bindings will cause
573         errors to be reported. The binding of an ACL to a specific
574         VLAN and the binding of an ACL to the entire physical port
575         should not be combined on a single physical port. That is, a
576         mix of zero and non-zero keys in the map is not recommended.
577       </p>
578     </column>
579
580     <column name="vlan_stats">
581       Statistics for VLANs bound to logical switches on the physical port.  An
582       implementation that fully supports such statistics would populate this
583       column with a mapping for every VLAN that is bound in <ref
584       column="vlan_bindings"/>.  An implementation that does not support such
585       statistics or only partially supports them would not populate this column
586       or partially populate it, respectively. A value of zero in the
587       VLAN field refers to untagged traffic on the physical port.
588     </column>
589
590     <group title="Identification">
591       <column name="name">
592         Symbolic name for the port.  The name ought to be unique within a given
593         <ref table="Physical_Switch"/>, but the database is not capable of
594         enforcing this.
595       </column>
596       
597       <column name="description">
598         An extended description for the port.
599       </column>
600     </group>
601     <group title="Error Notification">
602       <p>
603         An entry in this column indicates to the NVC that the physical port has
604         encountered a fault. The switch must clear this column when the error
605         has been cleared.
606       </p>
607       <column name="port_fault_status" key="invalid_vlan_map">
608         <p>
609           Indicates that a VLAN-to-logical-switch mapping requested by
610           the controller could not be instantiated by the switch
611           because of a conflict with local configuration.
612         </p>
613       </column>
614       <column name="port_fault_status" key="invalid_ACL_binding">
615         <p>
616           Indicates that an error has occurred in associating an ACL
617           with a port.
618         </p>
619       </column>
620       <column name="port_fault_status" key="unspecified_fault">
621         <p>
622           Indicates that an error has occurred on the port but that no
623           more specific information is available.
624         </p>
625       </column>
626     </group>
627
628   </table>
629
630   <table name="Logical_Binding_Stats" title="Statistics for a VLAN on a physical port bound to a logical network.">
631     Reports statistics for the <ref table="Logical_Switch"/> with which a VLAN
632     on a <ref table="Physical_Port"/> is associated.
633
634     <group title="Statistics">
635       These statistics count only packets to which the binding applies.
636
637       <column name="packets_from_local">
638         Number of packets sent by the <ref table="Physical_Switch"/>.
639       </column>
640
641       <column name="bytes_from_local">
642         Number of bytes in packets sent by the <ref table="Physical_Switch"/>.
643       </column>
644
645       <column name="packets_to_local">
646         Number of packets received by the <ref table="Physical_Switch"/>.
647       </column>
648
649       <column name="bytes_to_local">
650         Number of bytes in packets received by the <ref
651         table="Physical_Switch"/>.
652       </column>
653     </group>
654   </table>
655
656   <table name="Logical_Switch" title="A layer-2 domain.">
657     A logical Ethernet switch, whose implementation may span physical and
658     virtual media, possibly crossing L3 domains via tunnels; a logical layer-2
659     domain; an Ethernet broadcast domain.
660
661
662
663     <group title="Per Logical-Switch Tunnel Key">
664       <p>
665         Tunnel protocols tend to have a field that allows the tunnel
666         to be partitioned into sub-tunnels: VXLAN has a VNI, GRE and
667         STT have a key, CAPWAP has a WSI, and so on.  We call these
668         generically ``tunnel keys.''  Given that one needs to use a
669         tunnel key at all, there are at least two reasonable ways to
670         assign their values:
671       </p>
672
673       <ul>
674         <li>
675           <p>
676             Per <ref table="Logical_Switch"/>+<ref table="Physical_Locator"/>
677             pair.  That is, each logical switch may be assigned a different
678             tunnel key on every <ref table="Physical_Locator"/>.  This model is
679             especially flexible.
680           </p>
681
682           <p>
683             In this model, <ref table="Physical_Locator"/> carries the tunnel
684             key.  Therefore, one <ref table="Physical_Locator"/> record will
685             exist for each logical switch carried at a given IP destination.
686           </p>
687         </li>
688
689         <li>
690           <p>
691             Per <ref table="Logical_Switch"/>.  That is, every tunnel
692             associated with a particular logical switch carries the same tunnel
693             key, regardless of the <ref table="Physical_Locator"/> to which the
694             tunnel is addressed.  This model may ease switch implementation
695             because it imposes fewer requirements on the hardware datapath.
696           </p>
697
698           <p>
699             In this model, <ref table="Logical_Switch"/> carries the tunnel
700             key.  Therefore, one <ref table="Physical_Locator"/> record will
701             exist for each IP destination.
702           </p>
703         </li>
704       </ul>
705
706       <column name="tunnel_key">
707         <p>
708           This column is used only in the tunnel key per <ref
709           table="Logical_Switch"/> model (see above), because only in that
710           model is there a tunnel key associated with a logical switch.
711         </p>
712
713         <p>
714           For <code>vxlan_over_ipv4</code> encapsulation, when the tunnel key
715           per <ref table="Logical_Switch"/> model is in use, this column is the
716           VXLAN VNI that identifies a logical switch.  It must be in the range
717           0 to 16,777,215.
718         </p>
719       </column>
720     </group>
721
722     <group title="Identification">
723       <column name="name">
724         Symbolic name for the logical switch.
725       </column>
726
727       <column name="description">
728         An extended description for the logical switch, such as its switch
729         login banner.
730       </column>
731     </group>
732   </table>
733
734   <table name="Ucast_Macs_Local" title="Unicast MACs (local)">
735     <p>
736       Mapping of unicast MAC addresses to tunnels (physical
737       locators). This table is written by the HSC, so it contains the
738       MAC addresses that have been learned on physical ports by a
739       VTEP. 
740     </p>
741
742     <column name="MAC">
743       A MAC address that has been learned by the VTEP.
744     </column>
745
746     <column name="logical_switch">
747       The Logical switch to which this mapping applies.
748     </column>
749
750     <column name="locator">
751       The physical locator to be used to reach this MAC address. In
752       this table, the physical locator will be one of the tunnel IP
753       addresses of the appropriate VTEP.
754     </column>
755
756     <column name="ipaddr">
757       The IP address to which this MAC corresponds. Optional field for
758       the purpose of ARP supression.
759     </column>
760
761   </table>
762
763   <table name="Ucast_Macs_Remote" title="Unicast MACs (remote)">
764     <p>
765       Mapping of unicast MAC addresses to tunnels (physical
766       locators). This table is written by the NVC, so it contains the
767       MAC addresses that the NVC has learned. These include VM MAC
768       addresses, in which case the physical locators will be
769       hypervisor IP addresses. The NVC will also report MACs that it
770       has learned from other HSCs in the network, in which case the
771       physical locators will be tunnel IP addresses of the
772       corresponding VTEPs.
773     </p>
774
775     <column name="MAC">
776       A MAC address that has been learned by the NVC.
777     </column>
778
779     <column name="logical_switch">
780       The Logical switch to which this mapping applies.
781     </column>
782
783     <column name="locator">
784       The physical locator to be used to reach this MAC address. In
785       this table, the physical locator will be either a hypervisor IP
786       address or a tunnel IP addresses of another VTEP.
787     </column>
788
789     <column name="ipaddr">
790       The IP address to which this MAC corresponds. Optional field for
791       the purpose of ARP supression.
792     </column>
793
794   </table>
795
796   <table name="Mcast_Macs_Local" title="Multicast MACs (local)">
797     <p>
798       Mapping of multicast MAC addresses to tunnels (physical
799       locators). This table is written by the HSC, so it contains the
800       MAC addresses that have been learned on physical ports by a
801       VTEP. These may be learned by IGMP snooping, for example. This
802       table also specifies how to handle unknown unicast and broadcast packets.
803     </p>
804
805     <column name="MAC">
806       <p>
807         A MAC address that has been learned by the VTEP.
808       </p>
809       <p>
810         The keyword <code>unknown-dst</code> is used as a special
811         ``Ethernet address'' that indicates the locations to which
812         packets in a logical switch whose destination addresses do not
813         otherwise appear in <ref table="Ucast_Macs_Local"/> (for
814         unicast addresses) or <ref table="Mcast_Macs_Local"/> (for
815         multicast addresses) should be sent.
816       </p>
817     </column>
818
819     <column name="logical_switch">
820       The Logical switch to which this mapping applies.
821     </column>
822
823     <column name="locator_set">
824       The physical locator set to be used to reach this MAC address. In
825       this table, the physical locator set will be contain one or more tunnel IP
826       addresses of the appropriate VTEP(s).
827     </column>
828
829     <column name="ipaddr">
830       The IP address to which this MAC corresponds. Optional field for
831       the purpose of ARP supression.
832     </column>
833   </table>
834
835   <table name="Mcast_Macs_Remote" title="Multicast MACs (remote)">
836     <p>
837       Mapping of multicast MAC addresses to tunnels (physical
838       locators). This table is written by the NVC, so it contains the
839       MAC addresses that the NVC has learned. This
840       table also specifies how to handle unknown unicast and broadcast
841       packets.
842     </p>
843     <p>
844       Multicast packet replication may be handled by a service node,
845       in which case the physical locators will be IP addresses of
846       service nodes. If the VTEP supports replication onto multiple
847       tunnels, then this may be used to replicate directly onto
848       VTEP-hypervisor tunnels.
849     </p>
850
851     <column name="MAC">
852       <p>
853         A MAC address that has been learned by the NVC.
854       </p>
855       <p>
856         The keyword <code>unknown-dst</code> is used as a special
857         ``Ethernet address'' that indicates the locations to which
858         packets in a logical switch whose destination addresses do not
859         otherwise appear in <ref table="Ucast_Macs_Remote"/> (for
860         unicast addresses) or <ref table="Mcast_Macs_Remote"/> (for
861         multicast addresses) should be sent.
862       </p>
863     </column>
864
865     <column name="logical_switch">
866       The Logical switch to which this mapping applies.
867     </column>
868
869     <column name="locator_set">
870       The physical locator set to be used to reach this MAC address. In
871       this table, the physical locator set will be either a service node IP
872       address or a set of tunnel IP addresses of hypervisors (and
873       potentially other VTEPs).
874     </column>
875
876     <column name="ipaddr">
877       The IP address to which this MAC corresponds. Optional field for
878       the purpose of ARP supression.
879     </column>
880
881   </table>
882
883   <table name="Logical_Router" title="A logical L3 router.">
884     <p>
885       A logical router, or VRF. A logical router may be connected to one or more
886       logical switches. Subnet addresses and interface addresses may be configured on the
887       interfaces.
888     </p>
889
890     <column name="switch_binding">
891       Maps from an IPv4 or IPv6 address prefix in CIDR notation to a
892       logical switch. Multiple prefixes may map to the same switch. By
893       writing a 32-bit (or 128-bit for v6) address with a /N prefix
894       length, both the router's interface address and the subnet
895       prefix can be configured. For example, 192.68.1.1/24 creates a
896       /24 subnet for the logical switch attached to the interface and
897       assigns the address 192.68.1.1 to the router interface.
898     </column>
899
900     <column name="static_routes">
901       One or more static routes, mapping IP prefixes to next hop IP addresses.
902     </column>
903
904     <column name="acl_binding">
905       Maps ACLs to logical router interfaces. The router interfaces
906       are indicated using IP address notation, and must be the same
907       interfaces created in the <ref column="switch_binding"/>
908       column. For example, an ACL could be associated with the logical
909       router interface with an address of 192.68.1.1 as defined in the
910       example above.
911     </column>
912
913     <group title="Identification">
914       <column name="name">
915         Symbolic name for the logical router.
916       </column>
917       
918       <column name="description">
919         An extended description for the logical router.
920       </column>
921     </group>
922
923     <group title="Error Notification">
924       <p>
925         An entry in this column indicates to the NVC that the HSC has
926         encountered a fault in configuring state related to the
927         logical router.
928       </p>
929       <column name="LR_fault_status" key="invalid_ACL_binding">
930         <p>
931           Indicates that an error has occurred in associating an ACL
932           with a logical router port.
933         </p>
934       </column>
935       <column name="LR_fault_status" key="unspecified_fault">
936         <p>
937           Indicates that an error has occurred in configuring the
938           logical router but that no
939           more specific information is available.
940         </p>
941       </column>
942     </group>
943
944   </table>
945
946   <table name="Arp_Sources_Local" title="ARP source addresses for logical routers">
947     <p>
948       MAC address to be used when a VTEP issues ARP requests on behalf
949       of a logical router.
950     </p>
951
952     <p>
953       A distributed logical router is implemented by a set of VTEPs
954       (both hardware VTEPs and vswitches). In order for a given VTEP
955       to populate the local ARP cache for a logical router, it issues
956       ARP requests with a source MAC address that is unique to the VTEP. A
957       single per-VTEP MAC can be re-used across all logical
958       networks. This table contains the MACs that are used by the
959       VTEPs of a given HSC. The table provides the mapping from MAC to
960       physical locator for each VTEP so that replies to the ARP
961       requests can be sent back to the correct VTEP using the
962       appropriate physical locator.
963     </p>
964
965     <column name="src_mac">
966       The source MAC to be used by a given VTEP.
967     </column>
968
969     <column name="locator">
970       The <ref table="Physical_Locator"/> to use for replies to ARP
971       requests from this MAC address.
972     </column>
973   </table>
974
975   <table name="Arp_Sources_Remote" title="ARP source addresses for logical routers">
976     <p>
977       MAC address to be used when a remote VTEP issues ARP requests on behalf
978       of a logical router.
979     </p>
980
981     <p>
982       This table is the remote counterpart of <ref
983       table="Arp_sources_local"/>. The NVC writes this table to notify
984       the HSC of the MACs that will be used by remote VTEPs when they
985       issue ARP requests on behalf of a distributed logical router.
986     </p>
987
988     <column name="src_mac">
989       The source MAC to be used by a given VTEP.
990     </column>
991
992     <column name="locator">
993       The <ref table="Physical_Locator"/> to use for replies to ARP
994       requests from this MAC address.
995     </column>
996   </table>
997
998   <table name="Physical_Locator_Set">
999     <p>
1000       A set of one or more <ref table="Physical_Locator"/>s.
1001     </p>
1002
1003     <p>
1004       This table exists only because OVSDB does not have a way to
1005       express the type ``map from string to one or more <ref
1006       table="Physical_Locator"/> records.''
1007     </p>
1008
1009     <column name="locators"/>
1010   </table>
1011
1012   <table name="Physical_Locator">
1013     <p>
1014       Identifies an endpoint to which logical switch traffic may be
1015       encapsulated and forwarded.
1016     </p>
1017
1018     <p>
1019       The <code>vxlan_over_ipv4</code> encapsulation, the only encapsulation
1020       defined so far, can use either tunnel key model described in the ``Per
1021       Logical-Switch Tunnel Key'' section in the <ref table="Logical_Switch"/>
1022       table.  When the tunnel key per <ref table="Logical_Switch"/> model is in
1023       use, the <ref table="Logical_Switch" column="tunnel_key"/> column in the
1024       <ref table="Logical_Switch"/> table is filled with a VNI and the <ref
1025       column="tunnel_key"/> column in this table is empty; in the
1026       key-per-tunnel model, the opposite is true.  The former model is older,
1027       and thus likely to be more widely supported.  See the ``Per
1028       Logical-Switch Tunnel Key'' section in the <ref table="Logical_Switch"/>
1029       table for further discussion of the model.
1030     </p>
1031
1032     <column name="encapsulation_type">
1033       The type of tunneling encapsulation.
1034     </column>
1035
1036     <column name="dst_ip">
1037       <p>
1038         For <code>vxlan_over_ipv4</code> encapsulation, the IPv4 address of the
1039         VXLAN tunnel endpoint.
1040       </p>
1041
1042       <p>
1043         We expect that this column could be used for IPv4 or IPv6 addresses in
1044         encapsulations to be introduced later.
1045       </p>
1046     </column>
1047
1048     <column name="tunnel_key">
1049       <p>
1050         This column is used only in the tunnel key per <ref
1051         table="Logical_Switch"/>+<ref table="Physical_Locator"/> model (see
1052         above).
1053       </p>
1054
1055       <p>
1056         For <code>vxlan_over_ipv4</code> encapsulation, when the <ref
1057         table="Logical_Switch"/>+<ref table="Physical_Locator"/> model is in
1058         use, this column is the VXLAN VNI.  It must be in the range 0 to
1059         16,777,215.
1060       </p>
1061     </column>
1062
1063   </table>
1064   <table name="ACL_entry">
1065     <p>
1066       Describes the individual entries that comprise an Access Control List.
1067     </p>
1068     <p>
1069       Each entry in the table is a single rule to match on certain
1070       header fields. While there are a large number of fields that can
1071       be matched on, most hardware cannot match on arbitrary
1072       combinations of fields. It is common to match on either L2
1073       fields (described below in the L2 group of columns) or L3/L4 fields
1074       (the L3/L4 group of columns) but not both. The hardware switch
1075       controller may log an error if an ACL entry requires it to match
1076       on an incompatible mixture of fields.
1077     </p>
1078     <column name="sequence">
1079       <p>
1080         The sequence number for the ACL entry for the purpose of
1081         ordering entries in an ACL. Lower numbered entries are matched
1082         before higher numbered entries.
1083       </p>
1084     </column>
1085     <group title="L2 fields">
1086       <column name="source_mac">
1087         <p>
1088           Source MAC address, in the form
1089           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
1090         </p>
1091       </column>
1092       <column name="dest_mac">
1093         <p>
1094           Destination MAC address, in the form
1095           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
1096         </p>
1097       </column>
1098       <column name="ethertype">
1099         <p>
1100           Ethertype in hexadecimal, in the form
1101           <var>0xAAAA</var>
1102         </p>
1103       </column>
1104     </group>
1105     <group title="L3/L4 fields">
1106       <column name="source_ip">
1107         <p>
1108           Source IP address, in the form
1109           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1110           colon-separated hexadecimal notation for IPv6.
1111         </p>
1112       </column>
1113       <column name="source_mask">
1114         <p>
1115           Mask that determines which bits of source_ip to match on, in the form
1116           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1117           colon-separated hexadecimal notation for IPv6.
1118         </p>
1119       </column>
1120       <column name="dest_ip">
1121         <p>
1122           Destination IP address, in the form
1123           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1124           colon-separated hexadecimal notation for IPv6.
1125         </p>
1126       </column>
1127       <column name="dest_mask">
1128         <p>
1129           Mask that determines which bits of dest_ip to match on, in the form
1130           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1131           colon-separated hexadecimal notation for IPv6.
1132         </p>
1133       </column>
1134       <column name="protocol">
1135         <p>
1136           Protocol number in the IPv4 header, or value of the "next
1137           header" field in the IPv6 header.
1138         </p>
1139       </column>
1140       <column name="source_port_min">
1141         <p>
1142           Lower end of the range of source port values. The value
1143           specified is included in the range.
1144         </p>
1145       </column>
1146       <column name="source_port_max">
1147         <p>
1148           Upper end of the range of source port values. The value
1149           specified is included in the range.
1150         </p>
1151       </column>
1152       <column name="dest_port_min">
1153         <p>
1154           Lower end of the range of destination port values. The value
1155           specified is included in the range.
1156         </p>
1157       </column>
1158       <column name="dest_port_max">
1159         <p>
1160           Upper end of the range of destination port values. The value
1161           specified is included in the range.
1162         </p>
1163       </column>
1164       <column name="tcp_flags">
1165         <p>
1166           Integer representing the value of TCP flags to match. For
1167           example, the SYN flag is the second least significant bit in
1168           the TCP flags. Hence a value of 2 would indicate that the "SYN"
1169           flag should be set (assuming an appropriate mask).
1170         </p>
1171       </column>
1172       <column name="tcp_flags_mask">
1173         <p>
1174           Integer representing the mask to apply when matching TCP
1175           flags. For example, a value of 2 would imply that the "SYN"
1176           flag should be matched and all other flags ignored.
1177         </p>
1178       </column>
1179       <column name="icmp_type">
1180         <p>
1181           ICMP type to be matched.
1182         </p>
1183       </column>
1184       <column name="icmp_code">
1185         <p>
1186           ICMP code to be matched.
1187         </p>
1188       </column>
1189     </group>
1190     <column name="direction">
1191       <p>
1192         Direction of traffic to match on the specified port, either
1193         "ingress" (toward the logical switch or router) or "egress"
1194         (leaving the logical switch or router).
1195       </p>
1196     </column>
1197     <column name="action">
1198       <p>
1199         Action to take for this rule, either "permit" or "deny".
1200       </p>
1201     </column>
1202     <group title="Error Notification">
1203       <p>
1204         An entry in this column indicates to the NVC that the ACL
1205         could not be configured as requested. The switch must clear this column when the error
1206         has been cleared.
1207       </p>
1208       <column name="acle_fault_status" key="invalid_acl_entry">
1209         <p>
1210           Indicates that an ACL entry requested by
1211           the controller could not be instantiated by the switch,
1212           e.g. because it requires an unsupported combination of
1213           fields to be matched.
1214         </p>
1215       </column>
1216       <column name="acle_fault_status" key="unspecified_fault">
1217         <p>
1218           Indicates that an error has occurred in configuring the ACL
1219           entry but no
1220           more specific information is available.
1221         </p>
1222       </column>
1223     </group>
1224   </table>
1225   <table name="ACL">
1226     <p>
1227       Access Control List table. Each ACL is constructed as a set of
1228       entries from the <ref table="ACL_entry"/> table. Packets that
1229       are not matched by any entry in the ACL are allowed by default.
1230     </p>
1231     <column name="acl_entries">
1232       <p>
1233         A set of references to entries in the <ref table="ACL_entry"/> table.
1234       </p>
1235     </column>
1236     <column name="acl_name">
1237       <p>
1238         A human readable name for the ACL, which may (for example) be displayed on
1239         the switch CLI.
1240       </p>
1241     </column>
1242     <group title="Error Notification">
1243       <p>
1244         An entry in this column indicates to the NVC that the ACL
1245         could not be configured as requested. The switch must clear this column when the error
1246         has been cleared.
1247       </p>
1248       <column name="acl_fault_status" key="invalid_acl">
1249         <p>
1250           Indicates that an ACL requested by
1251           the controller could not be instantiated by the switch,
1252           e.g., because it requires an unsupported combination of
1253           fields to be matched.
1254         </p>
1255       </column>
1256       <column name="acl_fault_status" key="resource_shortage">
1257         <p>
1258           Indicates that an ACL requested by
1259           the controller could not be instantiated by the switch due
1260           to a shortage of resources (e.g. TCAM space).
1261         </p>
1262       </column>
1263       <column name="acl_fault_status" key="unspecified_fault">
1264         <p>
1265           Indicates that an error has occurred in configuring the ACL
1266           but no
1267           more specific information is available.
1268         </p>
1269       </column>
1270     </group>
1271   </table>
1272 </database>