1 <?xml version="1.0" encoding="utf-8"?>
2 <manpage program="ovn-nbctl" section="8" title="ovn-nbctl">
4 <p>ovn-nbctl -- Open Virtual Network northbound db management utility</p>
7 <p><code>ovn-nbctl</code> [<var>options</var>] <var>command</var> [<var>arg</var>...]</p>
10 <p>This utility can be used to manage the OVN northbound database.</p>
12 <h1>General Commands</h1>
15 <dt><code>show [<var>lswitch</var>]</code></dt>
17 Prints a brief overview of the database contents. If
18 <var>lswitch</var> is provided, only records related to that
19 logical switch are shown.
23 <h1>Logical Switch Commands</h1>
26 <dt><code>lswitch-add</code> [<var>lswitch</var>]</dt>
28 Creates a new logical switch named <var>lswitch</var>. If
29 <var>lswitch</var> is not provided, the switch will not have a
30 name so other commands must refer to this switch by its UUID.
31 Initially the switch will have no ports.
34 <dt><code>lswitch-del</code> <var>lswitch</var></dt>
36 Deletes <var>lswitch</var>.
39 <dt><code>lswitch-list</code></dt>
41 Lists all existing switches on standard output, one per line.
44 <dt><code>lswitch-set-external-id</code> <var>lswitch</var> <var>key</var> [<var>value</var>]</dt>
46 <p>Sets or clears an ``external ID'' value on <var>lswitch</var>.
47 These values are intended to identify entities external to OVN
48 with which <var>lswitch</var> is associated. The OVN Northbound
49 database schema may specify well-known <var>key</var> values,
50 but <var>key</var> and <var>value</var> are otherwise arbitrary
53 <p>If <var>value</var> is specified, then <var>key</var> is set to
54 <var>value</var> for <var>lswitch</var>, overwriting any
55 previous value. If <var>value</var> is omitted, then
56 <var>key</var> is removed from <var>lswitch</var>'s set of
57 external IDs (if it was present.</p>
60 <dt><code>lswitch-get-external-id</code> <var>lswitch</var> [<var>key</var>]</dt>
62 Queries the external IDs on <var>lswitch</var>. If
63 <var>key</var> is specified, the output is the value for that
64 <var>key</var> or the empty string if <var>key</var> is unset.
65 If <var>key</var> is omitted, the output is
66 <var>key</var><code>=</code><var>value</var>, one per line, for
71 <h1>Logical Port Commands</h1>
73 <dt><code>lport-add</code> <var>lswitch</var> <var>lport</var></dt>
75 Creates on <var>lswitch</var> a new logical port named
79 <dt><code>lport-add</code> <var>lswitch</var> <var>lport</var> <var>parent</var> <var>tag</var></dt>
81 Creates on <var>lswitch</var> a logical port named <var>lport</var>
82 that is a child of <var>parent</var> that is identied with
83 <var>tag</var>. This is useful in cases such as virtualized
84 container environments where Open vSwitch does not have a direct
85 connection to the container's port and it must be shared with
86 the virtual machine's port.
89 <dt><code>lport-del</code> <var>lport</var></dt>
91 Deletes <var>lport</var>.
94 <dt><code>lport-list</code> <var>lswitch</var></dt>
96 Lists all the logical ports within <var>lswitch</var> on
97 standard output, one per line.
100 <dt><code>lport-get-parent</code> <var>lport</var></dt>
102 If set, get the parent port of <var>lport</var>. If not set, print
106 <dt><code>lport-get-tag</code> <var>lport</var></dt>
108 If set, get the tag for <var>lport</var> traffic. If not set, print
112 <dt><code>lport-set-external-id</code> <var>lport</var> <var>key</var> [<var>value</var>]</dt>
114 <p>Sets or clears an ``external ID'' value on <var>lport</var>.
115 These values are intended to identify entities external to OVN
116 with which <var>lport</var> is associated. The OVN Northbound
117 database schema may specify well-known <var>key</var> values,
118 but <var>key</var> and <var>value</var> are otherwise arbitrary
121 <p>If <var>value</var> is specified, then <var>key</var> is set to
122 <var>value</var> for <var>lport</var>, overwriting any
123 previous value. If <var>value</var> is omitted, then
124 <var>key</var> is removed from <var>lport</var>'s set of
125 external IDs (if it was present.</p>
128 <dt><code>lport-get-external-id</code> <var>lport</var> [<var>key</var>]</dt>
130 Queries the external IDs on <var>lport</var>. If
131 <var>key</var> is specified, the output is the value for that
132 <var>key</var> or the empty string if <var>key</var> is unset.
133 If <var>key</var> is omitted, the output is
134 <var>key</var><code>=</code><var>value</var>, one per line, for
138 <dt><code>lport-set-macs</code> <var>lport</var> [<var>mac</var>]...</dt>
140 Sets the MACs associated with <var>lport</var> to
141 <var>mac</var>. Multiple MACs may be sets by using multiple
142 <var>mac</var> arguments. If no <var>mac</var> argument is
143 given, <var>lport</var> will have no MACs associated with it.
146 <dt><code>lport-get-macs</code> <var>lport</var></dt>
148 Lists all the MACs associated with <var>lport</var> on standard
149 output, one per line.
152 <dt><code>lport-set-port-security</code> <var>lport</var> [<var>addrs</var>]...</dt>
155 Sets the port security addresses associated with <var>lport</var> to
156 <var>addrs</var>. Multiple sets of addresses may be set by using
157 multiple <var>addrs</var> arguments. If no <var>addrs</var> argument
158 is given, <var>lport</var> will not have port security enabled.
162 Port security limits the addresses from which a logical port may send
163 packets and to which it may receive packets. See the
164 <code>ovn-nb</code>(5) documentation for the <ref
165 column="port_security" table="Logical_Port"/> column in the <ref
166 table="Logical_Port"/> table for details.
170 <dt><code>lport-get-port-security</code> <var>lport</var></dt>
172 Lists all the port security addresses associated with <var>lport</var>
173 on standard output, one per line.
176 <dt><code>lport-get-up</code> <var>lport</var></dt>
178 Prints the state of <var>lport</var>, either <code>up</code> or
185 <p><code>-d</code> <var>database</var> | <code>--db</code> <var>database</var></p>
186 <p><code>-h</code> | <code>--help</code></p>
187 <p><code>-o</code> | <code>--options</code></p>
188 <p><code>-V</code> | <code>--version</code></p>
190 <h1>Logging options</h1>
191 <p><code>-v</code><var>spec</var>, <code>--verbose=</code><var>spec</var></p>
192 <p><code>-v</code>, <code>--verbose</code></p>
193 <p><code>--log-file</code>[<code>=</code><var>file</var>]</p>
194 <p><code>--syslog-target=</code><var>host</var><code>:</code><var>port</var></p>
196 <h1>PKI configuration (required to use SSL)</h1>
197 <p><code>-p</code>, <code>--private-key=</code><var>file</var> file with private key</p>
198 <p><code>-c</code>, <code>--certificate=</code><var>file</var> file with certificate for private key</p>
199 <p><code>-C</code>, <code>--ca-cert=</code><var>file</var> file with peer CA certificate</p>