vtep: add ACLs to VTEP schema
[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="unspecified_fault">
314         Indicates that an error has occurred in the switch but that no
315         more specific information is available.
316       </column>
317
318     </group>
319   </table>
320
321   <table name="Tunnel" title="A tunnel created by a physical switch.">
322     A tunnel created by a <ref table="Physical_Switch"/>.
323
324     <column name="local">
325       Tunnel end-point local to the physical switch.
326     </column>
327
328     <column name="remote">
329       Tunnel end-point remote to the physical switch.
330     </column>
331
332     <group title="Bidirectional Forwarding Detection (BFD)">
333       <p>
334         BFD, defined in RFC 5880, allows point to point detection of
335         connectivity failures by occasional transmission of BFD control
336         messages. VTEPs are expected to implement BFD.
337       </p>
338
339       <p>
340         BFD operates by regularly transmitting BFD control messages at a
341         rate negotiated independently in each direction.  Each endpoint
342         specifies the rate at which it expects to receive control messages,
343         and the rate at which it's willing to transmit them.  An endpoint
344         which fails to receive BFD control messages for a period of three
345         times the expected reception rate will signal a connectivity
346         fault.  In the case of a unidirectional connectivity issue, the
347         system not receiving BFD control messages will signal the problem
348         to its peer in the messages it transmits.
349       </p>
350
351       <p>
352         A hardware VTEP is expected to use BFD to determine reachability of
353         devices at the end of the tunnels with which it exchanges data. This
354         can enable the VTEP to choose a functioning service node among a set of
355         service nodes providing high availability. It also enables the NVC to
356         report the health status of tunnels.
357       </p>
358
359       <p>
360         In most cases the BFD peer of a hardware VTEP will be an Open vSwitch
361         instance. The Open vSwitch implementation of BFD aims to comply
362         faithfully with the requirements put forth in RFC 5880.  Open vSwitch
363         does not implement the optional Authentication or ``Echo Mode''
364         features.
365       </p>
366
367       <group title="BFD Local Configuration">
368         <p>
369           The HSC writes the key-value pairs in the
370           <ref column="bfd_config_local"/> column to specify the local
371           configurations to be used for BFD sessions on this tunnel.
372         </p>
373
374         <column name="bfd_config_local" key="bfd_dst_mac">
375           Set to an Ethernet address in the form
376           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
377           to set the MAC expected as destination for received BFD packets.
378           The default is <code>00:23:20:00:00:01</code>.
379         </column>
380
381         <column name="bfd_config_local" key="bfd_dst_ip">
382           Set to an IPv4 address to set the IP address that is expected as destination
383           for received BFD packets.  The default is <code>169.254.1.0</code>.
384         </column>
385
386       </group>
387
388       <group title="BFD Remote Configuration">
389         <p>
390           The <ref column="bfd_config_remote"/> column is the remote
391           counterpart of the <ref column="bfd_config_local"/> column.
392           The NVC writes the key-value pairs in this column.
393         </p>
394
395         <column name="bfd_config_remote" key="bfd_dst_mac">
396           Set to an Ethernet address in the form
397           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
398           to set the destination MAC to be used for transmitted BFD packets.
399           The default is <code>00:23:20:00:00:01</code>.
400         </column>
401
402         <column name="bfd_config_remote" key="bfd_dst_ip">
403           Set to an IPv4 address to set the IP address used as destination
404           for transmitted BFD packets.  The default is <code>169.254.1.1</code>.
405         </column>
406
407       </group>
408
409       <group title="BFD Parameters">
410         <p>
411           The NVC sets up key-value pairs in the <ref column="bfd_params"/>
412           column to enable and configure BFD.
413         </p>
414
415         <column name="bfd_params" key="enable" type='{"type": "boolean"}'>
416           True to enable BFD on this tunnel.
417           The default is False.
418         </column>
419
420         <column name="bfd_params" key="min_rx"
421                 type='{"type": "integer", "minInteger": 1}'>
422           The shortest interval, in milliseconds, at which this BFD session
423           offers to receive BFD control messages.  The remote endpoint may
424           choose to send messages at a slower rate.  Defaults to
425           <code>1000</code>.
426         </column>
427
428         <column name="bfd_params" key="min_tx"
429                 type='{"type": "integer", "minInteger": 1}'>
430           The shortest interval, in milliseconds, at which this BFD session is
431           willing to transmit BFD control messages.  Messages will actually be
432           transmitted at a slower rate if the remote endpoint is not willing to
433           receive as quickly as specified.  Defaults to <code>100</code>.
434         </column>
435
436         <column name="bfd_params" key="decay_min_rx" type='{"type": "integer"}'>
437           An alternate receive interval, in milliseconds, that must be greater
438           than or equal to <ref column="bfd" key="min_rx"/>.  The
439           implementation switches from <ref column="bfd" key="min_rx"/> to <ref
440           column="bfd" key="decay_min_rx"/> when there is no obvious incoming
441           data traffic at the interface, to reduce the CPU and bandwidth cost
442           of monitoring an idle interface.  This feature may be disabled by
443           setting a value of 0.  This feature is reset whenever <ref
444           column="bfd" key="decay_min_rx"/> or <ref column="bfd" key="min_rx"/>
445           changes.
446         </column>
447
448         <column name="bfd_params" key="forwarding_if_rx" type='{"type": "boolean"}'>
449           True to consider the interface capable of packet I/O as long as it
450           continues to receive any packets (not just BFD packets).  This
451           prevents link congestion that causes consecutive BFD control packets
452           to be lost from marking the interface down.
453         </column>
454
455         <column name="bfd_params" key="cpath_down" type='{"type": "boolean"}'>
456           Set to true to notify the remote endpoint that traffic should not be
457           forwarded to this system for some reason other than a connectivity
458           failure on the interface being monitored.  The typical underlying
459           reason is ``concatenated path down,'' that is, that connectivity
460           beyond the local system is down.  Defaults to false.
461         </column>
462
463         <column name="bfd_params" key="check_tnl_key" type='{"type": "boolean"}'>
464           Set to true to make BFD accept only control messages with a tunnel
465           key of zero.  By default, BFD accepts control messages with any
466           tunnel key.
467         </column>
468
469       </group>
470
471      <group title="BFD Status">
472       <p>
473         The VTEP sets key-value pairs in the <ref column="bfd_status"/>
474         column to report the status of BFD on this tunnel.  When BFD is
475         not enabled, with <ref column="bfd_params" key="enable"/>, the
476         HSC clears all key-value pairs from <ref column="bfd_status"/>.
477       </p>
478
479       <column name="bfd_status" key="enabled"
480         type='{"type": "boolean"}'>
481         Set to true if the BFD session has been successfully
482         enabled. Set to false if the VTEP cannot support BFD or has
483         insufficient resources to enable BFD on this tunnel. The NVC
484         will disable the BFD monitoring on the other side of the tunnel
485         once this value is set to false.
486       </column>
487
488       <column name="bfd_status" key="state"
489         type='{"type": "string",
490               "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
491         Reports the state of the BFD session.  The BFD session is fully
492         healthy and negotiated if <code>UP</code>.
493       </column>
494
495       <column name="bfd_status" key="forwarding" type='{"type": "boolean"}'>
496         Reports whether the BFD session believes this tunnel
497         may be used to forward traffic.  Typically this means the local session
498         is signaling <code>UP</code>, and the remote system isn't signaling a
499         problem such as concatenated path down.
500       </column>
501
502       <column name="bfd_status" key="diagnostic">
503         In case of a problem, set to an error message that reports what the
504         local BFD session thinks is wrong.  The error messages are defined
505         in section 4.1 of [RFC 5880].
506       </column>
507
508       <column name="bfd_status" key="remote_state"
509         type='{"type": "string",
510               "enum": ["set", ["admin_down", "down", "init", "up"]]}'>
511         Reports the state of the remote endpoint's BFD session.
512       </column>
513
514       <column name="bfd_status" key="remote_diagnostic">
515         In case of a problem, set to an error message that reports what the
516         remote endpoint's BFD session thinks is wrong.  The error messages
517         are defined in section 4.1 of [RFC 5880].
518       </column>
519
520       <column name="bfd_status" key="info">
521         A short message providing further information about the BFD status
522         (possibly including reasons why BFD could not be enabled).
523       </column>
524       </group>
525     </group>
526   </table>
527
528   <table name="Physical_Port" title="A port within a physical switch.">
529     A port within a <ref table="Physical_Switch"/>.
530
531     <column name="vlan_bindings">
532       Identifies how VLANs on the physical port are bound to logical switches.
533       If, for example, the map contains a (VLAN, logical switch) pair, a packet
534       that arrives on the port in the VLAN is considered to belong to the
535       paired logical switch. A value of zero in the VLAN field means
536       that untagged traffic on the physical port is mapped to the
537       logical switch.
538     </column>
539
540     <column name="acl_bindings">
541       <p>
542         Attach Access Control Lists (ACLs) to the physical port. The
543         column consists of a map of VLAN tags to <ref table="ACL"/>s. If the value of
544         the VLAN tag in the map is 0, this means that the ACL is
545         associated with the entire physical port. Non-zero values mean
546         that the ACL is to be applied only on packets carrying that VLAN
547         tag value. Switches will not necessarily support matching on the
548         VLAN tag for all ACLs, and unsupported ACL bindings will cause
549         errors to be reported. The binding of an ACL to a specific
550         VLAN and the binding of an ACL to the entire physical port
551         should not be combined on a single physical port. That is, a
552         mix of zero and non-zero keys in the map is not recommended.
553       </p>
554     </column>
555
556     <column name="vlan_stats">
557       Statistics for VLANs bound to logical switches on the physical port.  An
558       implementation that fully supports such statistics would populate this
559       column with a mapping for every VLAN that is bound in <ref
560       column="vlan_bindings"/>.  An implementation that does not support such
561       statistics or only partially supports them would not populate this column
562       or partially populate it, respectively. A value of zero in the
563       VLAN field refers to untagged traffic on the physical port.
564     </column>
565
566     <group title="Identification">
567       <column name="name">
568         Symbolic name for the port.  The name ought to be unique within a given
569         <ref table="Physical_Switch"/>, but the database is not capable of
570         enforcing this.
571       </column>
572       
573       <column name="description">
574         An extended description for the port.
575       </column>
576     </group>
577     <group title="Error Notification">
578       <p>
579         An entry in this column indicates to the NVC that the physical port has
580         encountered a fault. The switch must clear this column when the error
581         has been cleared.
582       </p>
583       <column name="port_fault_status" key="invalid_vlan_map">
584         <p>
585           Indicates that a VLAN-to-logical-switch mapping requested by
586           the controller could not be instantiated by the switch
587           because of a conflict with local configuration.
588         </p>
589       </column>
590       <column name="port_fault_status" key="invalid_ACL_binding">
591         <p>
592           Indicates that an error has occurred in associating an ACL
593           with a port.
594         </p>
595       </column>
596       <column name="port_fault_status" key="unspecified_fault">
597         <p>
598           Indicates that an error has occurred on the port but that no
599           more specific information is available.
600         </p>
601       </column>
602     </group>
603
604   </table>
605
606   <table name="Logical_Binding_Stats" title="Statistics for a VLAN on a physical port bound to a logical network.">
607     Reports statistics for the <ref table="Logical_Switch"/> with which a VLAN
608     on a <ref table="Physical_Port"/> is associated.
609
610     <group title="Statistics">
611       These statistics count only packets to which the binding applies.
612
613       <column name="packets_from_local">
614         Number of packets sent by the <ref table="Physical_Switch"/>.
615       </column>
616
617       <column name="bytes_from_local">
618         Number of bytes in packets sent by the <ref table="Physical_Switch"/>.
619       </column>
620
621       <column name="packets_to_local">
622         Number of packets received by the <ref table="Physical_Switch"/>.
623       </column>
624
625       <column name="bytes_to_local">
626         Number of bytes in packets received by the <ref
627         table="Physical_Switch"/>.
628       </column>
629     </group>
630   </table>
631
632   <table name="Logical_Switch" title="A layer-2 domain.">
633     A logical Ethernet switch, whose implementation may span physical and
634     virtual media, possibly crossing L3 domains via tunnels; a logical layer-2
635     domain; an Ethernet broadcast domain.
636
637
638
639     <group title="Per Logical-Switch Tunnel Key">
640       <p>
641         Tunnel protocols tend to have a field that allows the tunnel
642         to be partitioned into sub-tunnels: VXLAN has a VNI, GRE and
643         STT have a key, CAPWAP has a WSI, and so on.  We call these
644         generically ``tunnel keys.''  Given that one needs to use a
645         tunnel key at all, there are at least two reasonable ways to
646         assign their values:
647       </p>
648
649       <ul>
650         <li>
651           <p>
652             Per <ref table="Logical_Switch"/>+<ref table="Physical_Locator"/>
653             pair.  That is, each logical switch may be assigned a different
654             tunnel key on every <ref table="Physical_Locator"/>.  This model is
655             especially flexible.
656           </p>
657
658           <p>
659             In this model, <ref table="Physical_Locator"/> carries the tunnel
660             key.  Therefore, one <ref table="Physical_Locator"/> record will
661             exist for each logical switch carried at a given IP destination.
662           </p>
663         </li>
664
665         <li>
666           <p>
667             Per <ref table="Logical_Switch"/>.  That is, every tunnel
668             associated with a particular logical switch carries the same tunnel
669             key, regardless of the <ref table="Physical_Locator"/> to which the
670             tunnel is addressed.  This model may ease switch implementation
671             because it imposes fewer requirements on the hardware datapath.
672           </p>
673
674           <p>
675             In this model, <ref table="Logical_Switch"/> carries the tunnel
676             key.  Therefore, one <ref table="Physical_Locator"/> record will
677             exist for each IP destination.
678           </p>
679         </li>
680       </ul>
681
682       <column name="tunnel_key">
683         <p>
684           This column is used only in the tunnel key per <ref
685           table="Logical_Switch"/> model (see above), because only in that
686           model is there a tunnel key associated with a logical switch.
687         </p>
688
689         <p>
690           For <code>vxlan_over_ipv4</code> encapsulation, this column
691           is the VXLAN VNI that identifies a logical switch.  It must
692           be in the range 0 to 16,777,215.
693         </p>
694       </column>
695     </group>
696
697     <group title="Identification">
698       <column name="name">
699         Symbolic name for the logical switch.
700       </column>
701       
702       <column name="description">
703         An extended description for the logical switch, such as its switch
704         login banner.
705       </column>
706     </group>
707   </table>
708
709   <table name="Ucast_Macs_Local" title="Unicast MACs (local)">
710     <p>
711       Mapping of unicast MAC addresses to tunnels (physical
712       locators). This table is written by the HSC, so it contains the
713       MAC addresses that have been learned on physical ports by a
714       VTEP. 
715     </p>
716
717     <column name="MAC">
718       A MAC address that has been learned by the VTEP.
719     </column>
720
721     <column name="logical_switch">
722       The Logical switch to which this mapping applies.
723     </column>
724
725     <column name="locator">
726       The physical locator to be used to reach this MAC address. In
727       this table, the physical locator will be one of the tunnel IP
728       addresses of the appropriate VTEP.
729     </column>
730
731     <column name="ipaddr">
732       The IP address to which this MAC corresponds. Optional field for
733       the purpose of ARP supression.
734     </column>
735
736   </table>
737
738  <table name="Ucast_Macs_Remote" title="Unicast MACs (remote)">
739     <p>
740       Mapping of unicast MAC addresses to tunnels (physical
741       locators). This table is written by the NVC, so it contains the
742       MAC addresses that the NVC has learned. These include VM MAC
743       addresses, in which case the physical locators will be
744       hypervisor IP addresses. The NVC will also report MACs that it
745       has learned from other HSCs in the network, in which case the
746       physical locators will be tunnel IP addresses of the
747       corresponding VTEPs.
748     </p>
749
750     <column name="MAC">
751       A MAC address that has been learned by the NVC.
752     </column>
753
754     <column name="logical_switch">
755       The Logical switch to which this mapping applies.
756     </column>
757
758     <column name="locator">
759       The physical locator to be used to reach this MAC address. In
760       this table, the physical locator will be either a hypervisor IP
761       address or a tunnel IP addresses of another VTEP.
762     </column>
763
764     <column name="ipaddr">
765       The IP address to which this MAC corresponds. Optional field for
766       the purpose of ARP supression.
767     </column>
768
769   </table>
770
771   <table name="Mcast_Macs_Local" title="Multicast MACs (local)">
772     <p>
773       Mapping of multicast MAC addresses to tunnels (physical
774       locators). This table is written by the HSC, so it contains the
775       MAC addresses that have been learned on physical ports by a
776       VTEP. These may be learned by IGMP snooping, for example. This
777       table also specifies how to handle unknown unicast and broadcast packets.
778     </p>
779
780     <column name="MAC">
781       <p>
782         A MAC address that has been learned by the VTEP. 
783       </p>
784       <p>
785         The keyword <code>unknown-dst</code> is used as a special
786         ``Ethernet address'' that indicates the locations to which
787         packets in a logical switch whose destination addresses do not
788         otherwise appear in <ref table="Ucast_Macs_Local"/> (for
789         unicast addresses) or <ref table="Mcast_Macs_Local"/> (for
790         multicast addresses) should be sent.
791       </p>
792     </column>
793
794     <column name="logical_switch">
795       The Logical switch to which this mapping applies.
796     </column>
797
798     <column name="locator_set">
799       The physical locator set to be used to reach this MAC address. In
800       this table, the physical locator set will be contain one or more tunnel IP
801       addresses of the appropriate VTEP(s).
802     </column>
803
804     <column name="ipaddr">
805       The IP address to which this MAC corresponds. Optional field for
806       the purpose of ARP supression.
807     </column>
808   </table>
809
810   <table name="Mcast_Macs_Remote" title="Multicast MACs (remote)">
811     <p>
812       Mapping of multicast MAC addresses to tunnels (physical
813       locators). This table is written by the NVC, so it contains the
814       MAC addresses that the NVC has learned. This
815       table also specifies how to handle unknown unicast and broadcast
816       packets.
817     </p>
818     <p>
819       Multicast packet replication may be handled by a service node,
820       in which case the physical locators will be IP addresses of
821       service nodes. If the VTEP supports replication onto multiple
822       tunnels, then this may be used to replicate directly onto
823       VTEP-hypervisor tunnels.
824     </p>
825
826     <column name="MAC">
827       <p>
828         A MAC address that has been learned by the NVC.
829       </p>
830       <p>
831         The keyword <code>unknown-dst</code> is used as a special
832         ``Ethernet address'' that indicates the locations to which
833         packets in a logical switch whose destination addresses do not
834         otherwise appear in <ref table="Ucast_Macs_Remote"/> (for
835         unicast addresses) or <ref table="Mcast_Macs_Remote"/> (for
836         multicast addresses) should be sent.
837       </p>
838     </column>
839
840     <column name="logical_switch">
841       The Logical switch to which this mapping applies.
842     </column>
843
844     <column name="locator_set">
845       The physical locator set to be used to reach this MAC address. In
846       this table, the physical locator set will be either a service node IP
847       address or a set of tunnel IP addresses of hypervisors (and
848       potentially other VTEPs).
849     </column>
850
851     <column name="ipaddr">
852       The IP address to which this MAC corresponds. Optional field for
853       the purpose of ARP supression.
854     </column>
855
856   </table>
857
858   <table name="Logical_Router" title="A logical L3 router.">
859     <p>
860       A logical router, or VRF. A logical router may be connected to one or more
861       logical switches. Subnet addresses and interface addresses may be configured on the 
862       interfaces.
863     </p>
864     
865     <column name="switch_binding">
866       Maps from an IPv4 or IPv6 address prefix in CIDR notation to a
867       logical switch. Multiple prefixes may map to the same switch. By
868       writing a 32-bit (or 128-bit for v6) address with a /N prefix
869       length, both the router's interface address and the subnet
870       prefix can be configured. For example, 192.68.1.1/24 creates a
871       /24 subnet for the logical switch attached to the interface and
872       assigns the address 192.68.1.1 to the router interface.
873     </column>
874
875     <column name="static_routes">
876       One or more static routes, mapping IP prefixes to next hop IP addresses.
877     </column>
878
879     <column name="acl_binding">
880       Maps ACLs to logical router interfaces. The router interfaces
881       are indicated using IP address notation, and must be the same
882       interfaces created in the <ref column="switch_binding"/>
883       column. For example, an ACL could be associated with the logical
884       router interface with an address of 192.68.1.1 as defined in the
885       example above.
886     </column>
887
888     <group title="Identification">
889       <column name="name">
890         Symbolic name for the logical router.
891       </column>
892       
893       <column name="description">
894         An extended description for the logical router.
895       </column>
896     </group>
897
898     <group title="Error Notification">
899       <p>
900         An entry in this column indicates to the NVC that the HSC has
901         encountered a fault in configuring state related to the
902         logical router.
903       </p>
904       <column name="LR_fault_status" key="invalid_ACL_binding">
905         <p>
906           Indicates that an error has occurred in associating an ACL
907           with a logical router port.
908         </p>
909       </column>
910       <column name="LR_fault_status" key="unspecified_fault">
911         <p>
912           Indicates that an error has occurred in configuring the
913           logical router but that no
914           more specific information is available.
915         </p>
916       </column>
917     </group>
918
919   </table>
920
921   <table name="Arp_Sources_Local" title="ARP source addresses for logical routers">
922     <p>
923       MAC address to be used when a VTEP issues ARP requests on behalf
924       of a logical router.
925     </p>
926
927     <p>
928       A distributed logical router is implemented by a set of VTEPs
929       (both hardware VTEPs and vswitches). In order for a given VTEP
930       to populate the local ARP cache for a logical router, it issues
931       ARP requests with a source MAC address that is unique to the VTEP. A
932       single per-VTEP MAC can be re-used across all logical
933       networks. This table contains the MACs that are used by the
934       VTEPs of a given HSC. The table provides the mapping from MAC to
935       physical locator for each VTEP so that replies to the ARP
936       requests can be sent back to the correct VTEP using the
937       appropriate physical locator.
938     </p>
939
940     <column name="src_mac">
941       The source MAC to be used by a given VTEP.
942     </column>
943
944     <column name="locator">
945       The <ref table="Physical_Locator"/> to use for replies to ARP
946       requests from this MAC address.
947     </column>
948   </table>
949
950   <table name="Arp_Sources_Remote" title="ARP source addresses for logical routers">
951     <p>
952       MAC address to be used when a remote VTEP issues ARP requests on behalf
953       of a logical router.
954     </p>
955
956     <p>
957       This table is the remote counterpart of <ref
958       table="Arp_sources_local"/>. The NVC writes this table to notify
959       the HSC of the MACs that will be used by remote VTEPs when they
960       issue ARP requests on behalf of a distributed logical router.
961     </p>
962
963     <column name="src_mac">
964       The source MAC to be used by a given VTEP.
965     </column>
966
967     <column name="locator">
968       The <ref table="Physical_Locator"/> to use for replies to ARP
969       requests from this MAC address.
970     </column>
971   </table>
972
973   <table name="Physical_Locator_Set">
974     <p>
975       A set of one or more <ref table="Physical_Locator"/>s.
976     </p>
977
978     <p>
979       This table exists only because OVSDB does not have a way to
980       express the type ``map from string to one or more <ref
981       table="Physical_Locator"/> records.''
982     </p>
983
984     <column name="locators"/>    
985   </table>
986
987   <table name="Physical_Locator">
988     <p>
989       Identifies an endpoint to which logical switch traffic may be
990       encapsulated and forwarded.
991     </p>
992
993     <p>
994       For the <code>vxlan_over_ipv4</code> encapsulation, the only
995       encapsulation defined so far, all endpoints associated with a given <ref
996       table="Logical_Switch"/> must use a common tunnel key, which is carried
997       in the <ref table="Logical_Switch" column="tunnel_key"/> column of <ref
998       table="Logical_Switch"/>.
999     </p>
1000
1001     <p>
1002       For some encapsulations yet to be defined, we expect <ref
1003       table="Physical_Locator"/> to identify both an endpoint and a tunnel key.
1004       When the first such encapsulation is defined, we expect to add a
1005       ``tunnel_key'' column to <ref table="Physical_Locator"/> to allow the
1006       tunnel key to be defined.
1007     </p>
1008
1009     <p>
1010       See the ``Per Logical-Switch Tunnel Key'' section in the <ref
1011       table="Logical_Switch"/> table for further discussion of the model.
1012     </p>
1013
1014     <column name="encapsulation_type">
1015       The type of tunneling encapsulation.
1016     </column>
1017
1018     <column name="dst_ip">
1019       <p>
1020         For <code>vxlan_over_ipv4</code> encapsulation, the IPv4 address of the
1021         VXLAN tunnel endpoint.
1022       </p>
1023
1024       <p>
1025         We expect that this column could be used for IPv4 or IPv6 addresses in
1026         encapsulations to be introduced later.
1027       </p>
1028     </column>
1029
1030   </table>
1031   <table name="ACL_entry">
1032     <p>
1033       Describes the individual entries that comprise an Access Control List.
1034     </p>
1035     <p>
1036       Each entry in the table is a single rule to match on certain
1037       header fields. While there are a large number of fields that can
1038       be matched on, most hardware cannot match on arbitrary
1039       combinations of fields. It is common to match on either L2
1040       fields (described below in the L2 group of columns) or L3/L4 fields
1041       (the L3/L4 group of columns) but not both. The hardware switch
1042       controller may log an error if an ACL entry requires it to match
1043       on an incompatible mixture of fields.
1044     </p>
1045     <column name="sequence">
1046       <p>
1047         The sequence number for the ACL entry for the purpose of
1048         ordering entries in an ACL. Lower numbered entries are matched
1049         before higher numbered entries.
1050       </p>
1051     </column>
1052     <group title="L2 fields">
1053       <column name="source_mac">
1054         <p>
1055           Source MAC address, in the form
1056           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
1057         </p>
1058       </column>
1059       <column name="dest_mac">
1060         <p>
1061           Destination MAC address, in the form
1062           <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>
1063         </p>
1064       </column>
1065             <column name="ethertype">
1066         <p>
1067           Ethertype in hexadecimal, in the form
1068           <var>0xAAAA</var>
1069         </p>
1070       </column>
1071     </group>
1072     <group title="L3/L4 fields">
1073       <column name="source_ip">
1074         <p>
1075           Source IP address, in the form
1076           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1077           colon-separated hexadecimal notation for IPv6.
1078         </p>
1079       </column>
1080       <column name="source_mask">
1081         <p>
1082           Mask that determines which bits of source_ip to match on, in the form
1083           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1084           colon-separated hexadecimal notation for IPv6.
1085         </p>
1086       </column>
1087       <column name="dest_ip">
1088         <p>
1089           Destination IP address, in the form
1090           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1091           colon-separated hexadecimal notation for IPv6.
1092         </p>
1093       </column>
1094       <column name="dest_mask">
1095         <p>
1096           Mask that determines which bits of dest_ip to match on, in the form
1097           <var>xx.xx.xx.xx</var> for IPv4 or appropriate
1098           colon-separated hexadecimal notation for IPv6.
1099         </p>
1100       </column>
1101       <column name="protocol">
1102         <p>
1103           Protocol number in the IPv4 header, or value of the "next
1104           header" field in the IPv6 header.
1105         </p>
1106       </column>
1107       <column name="source_port_min">
1108         <p>
1109           Lower end of the range of source port values. The value
1110           specified is included in the range.
1111         </p>
1112       </column>
1113       <column name="source_port_max">
1114         <p>
1115           Upper end of the range of source port values. The value
1116           specified is included in the range.
1117         </p>
1118       </column>
1119       <column name="dest_port_min">
1120         <p>
1121           Lower end of the range of destination port values. The value
1122           specified is included in the range.
1123         </p>
1124       </column>
1125       <column name="dest_port_max">
1126         <p>
1127           Upper end of the range of destination port values. The value
1128           specified is included in the range.
1129         </p>
1130       </column>
1131       <column name="tcp_flags">
1132         <p>
1133           Integer representing the value of TCP flags to match. For
1134           example, the SYN flag is the second least significant bit in
1135           the TCP flags. Hence a value of 2 would indicate that the "SYN"
1136           flag should be set (assuming an appropriate mask).
1137         </p>
1138       </column>
1139       <column name="tcp_flags_mask">
1140         <p>
1141           Integer representing the mask to apply when matching TCP
1142           flags. For example, a value of 2 would imply that the "SYN"
1143           flag should be matched and all other flags ignored.
1144         </p>
1145       </column>
1146       <column name="icmp_type">
1147         <p>
1148           ICMP type to be matched.
1149         </p>
1150       </column>
1151       <column name="icmp_code">
1152         <p>
1153           ICMP code to be matched.
1154         </p>
1155       </column>
1156     </group>
1157     <column name="direction">
1158       <p>
1159         Direction of traffic to match on the specified port, either
1160         "ingress" (toward the logical switch or router) or "egress"
1161         (leaving the logical switch or router).
1162       </p>
1163     </column>
1164     <column name="action">
1165       <p>
1166         Action to take for this rule, either "permit" or "deny".
1167       </p>
1168     </column>
1169     <group title="Error Notification">
1170       <p>
1171         An entry in this column indicates to the NVC that the ACL
1172         could not be configured as requested. The switch must clear this column when the error
1173         has been cleared.
1174       </p>
1175       <column name="acle_fault_status" key="invalid_acl_entry">
1176         <p>
1177           Indicates that an ACL entry requested by
1178           the controller could not be instantiated by the switch,
1179           e.g. because it requires an unsupported combination of
1180           fields to be matched.
1181         </p>
1182       </column>
1183       <column name="acle_fault_status" key="unspecified_fault">
1184         <p>
1185           Indicates that an error has occurred in configuring the ACL
1186           entry but no
1187           more specific information is available.
1188         </p>
1189       </column>
1190     </group>
1191   </table>
1192   <table name="ACL">
1193     <p>
1194       Access Control List table. Each ACL is constructed as a set of
1195       entries from the <ref table="ACL_entry"/> table. Packets that
1196       are not matched by any entry in the ACL are allowed by default.
1197     </p>
1198     <column name="acl_entries">
1199       <p>
1200         A set of references to entries in the <ref table="ACL_entry"/> table.
1201       </p>
1202     </column>
1203     <column name="acl_name">
1204       <p>
1205         A human readable name for the ACL, which may (for example) be displayed on
1206         the switch CLI.
1207       </p>
1208     </column>
1209     <group title="Error Notification">
1210       <p>
1211         An entry in this column indicates to the NVC that the ACL
1212         could not be configured as requested. The switch must clear this column when the error
1213         has been cleared.
1214       </p>
1215       <column name="acl_fault_status" key="invalid_acl">
1216         <p>
1217           Indicates that an ACL requested by
1218           the controller could not be instantiated by the switch,
1219           e.g., because it requires an unsupported combination of
1220           fields to be matched.
1221         </p>
1222       </column>
1223       <column name="acl_fault_status" key="resource_shortage">
1224         <p>
1225           Indicates that an ACL requested by
1226           the controller could not be instantiated by the switch due
1227           to a shortage of resources (e.g. TCAM space).
1228         </p>
1229       </column>
1230       <column name="acl_fault_status" key="unspecified_fault">
1231         <p>
1232           Indicates that an error has occurred in configuring the ACL
1233           but no
1234           more specific information is available.
1235         </p>
1236       </column>
1237     </group>
1238   </table>
1239 </database>