]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-vsctl.8.in
vtep-ctl: Print schema version when called with "--version".
[mirror_ovs.git] / utilities / ovs-vsctl.8.in
CommitLineData
3b135da3
BP
1.\" -*- nroff -*-
2.de IQ
3. br
4. ns
5. IP "\\$1"
6..
5aa00635
JP
7.de ST
8. PP
9. RS -0.15in
10. I "\\$1"
11. RE
5aa00635 12..
d2cb6c95 13.TH ovs\-vsctl 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
812560d7 14.\" This program's name:
3b135da3
BP
15.ds PN ovs\-vsctl
16.
17.SH NAME
18ovs\-vsctl \- utility for querying and configuring \fBovs\-vswitchd\fR
19.
20.SH SYNOPSIS
204bad29
BP
21\fBovs\-vsctl\fR [\fIoptions\fR] \fB\-\-\fR [\fIoptions\fR] \fIcommand
22\fR[\fIargs\fR] [\fB\-\-\fR [\fIoptions\fR] \fIcommand \fR[\fIargs\fR]]...
3b135da3
BP
23.
24.SH DESCRIPTION
dfbe07ba 25The \fBovs\-vsctl\fR program configures \fBovs\-vswitchd\fR(8) by
5aa75474
BP
26providing a high\-level interface to its configuration database.
27See \fBovs\-vswitchd.conf.db\fR(5) for comprehensive documentation of
28the database schema.
29.PP
30\fBovs\-vsctl\fR connects to an \fBovsdb\-server\fR process that
31maintains an Open vSwitch configuration database. Using this
32connection, it queries and possibly applies changes to the database,
33depending on the supplied commands. Then, if it applied any changes,
34by default it waits until \fBovs\-vswitchd\fR has finished
35reconfiguring itself before it exits. (If you use \fBovs\-vsctl\fR
36when \fBovs\-vswitchd\fR is not running, use \fB\-\-no\-wait\fR.)
460aad80
BP
37.PP
38\fBovs\-vsctl\fR can perform any number of commands in a single run,
39implemented as a single atomic transaction against the database.
204bad29
BP
40.PP
41The \fBovs\-vsctl\fR command line begins with global options (see
42\fBOPTIONS\fR below for details). The global options are followed by
43one or more commands. Each command should begin with \fB\-\-\fR by
401d5a6d
BP
44itself as a command-line argument, to separate it from the following
45commands. (The \fB\-\-\fR before the first command is optional.) The
46command
204bad29
BP
47itself starts with command-specific options, if any, followed by the
48command name and any arguments. See \fBEXAMPLES\fR below for syntax
49examples.
3b135da3
BP
50.
51.SS "Linux VLAN Bridging Compatibility"
52The \fBovs\-vsctl\fR program supports the model of a bridge
53implemented by Open vSwitch, in which a single bridge supports ports
54on multiple VLANs. In this model, each port on a bridge is either a
55trunk port that potentially passes packets tagged with 802.1Q headers
56that designate VLANs or it is assigned a single implicit VLAN that is
57never tagged with an 802.1Q header.
58.PP
59For compatibility with software designed for the Linux bridge,
60\fBovs\-vsctl\fR also supports a model in which traffic associated
61with a given 802.1Q VLAN is segregated into a separate bridge. A
62special form of the \fBadd\-br\fR command (see below) creates a ``fake
63bridge'' within an Open vSwitch bridge to simulate this behavior.
64When such a ``fake bridge'' is active, \fBovs\-vsctl\fR will treat it
65much like a bridge separate from its ``parent bridge,'' but the actual
66implementation in Open vSwitch uses only a single bridge, with ports on
67the fake bridge assigned the implicit VLAN of the fake bridge of which
5341d046
BP
68they are members. (A fake bridge for VLAN 0 receives packets that
69have no 802.1Q tag or a tag with VLAN 0.)
3b135da3
BP
70.
71.SH OPTIONS
72.
460aad80
BP
73The following options affect the behavior \fBovs\-vsctl\fR as a whole.
74Some individual commands also accept their own options, which are
75given just before the command name. If the first command on the
76command line has options, then those options must be separated from
77the global options by \fB\-\-\fR.
3b135da3 78.
dfbe07ba
BP
79.IP "\fB\-\-db=\fIserver\fR"
80Sets \fIserver\fR as the database server that \fBovs\-vsctl\fR
81contacts to query or modify configuration. The default is
bc391960 82\fBunix:@RUNDIR@/db.sock\fR. \fIserver\fR must take one of the
dfbe07ba
BP
83following forms:
84.RS
9467fe62 85.so ovsdb/remote-active.man
c9f3f37a 86.so ovsdb/remote-passive.man
dfbe07ba 87.RE
9467fe62 88.
dfbe07ba
BP
89.IP "\fB\-\-no\-wait\fR"
90Prevents \fBovs\-vsctl\fR from waiting for \fBovs\-vswitchd\fR to
91reconfigure itself according to the the modified database. This
92option should be used if \fBovs\-vswitchd\fR is not running;
4e312e69 93otherwise, \fBovs\-vsctl\fR will not exit until \fBovs\-vswitchd\fR
dfbe07ba 94starts.
3b135da3 95.IP
dfbe07ba
BP
96This option has no effect if the commands specified do not change the
97database.
3b135da3 98.
37c84020
BP
99.IP "\fB\-\-no\-syslog\fR"
100By default, \fBovs\-vsctl\fR logs its arguments and the details of any
101changes that it makes to the system log. This option disables this
102logging.
dfbe07ba 103.IP
ae9a3235 104This option is equivalent to \fB\-\-verbose=vsctl:syslog:warn\fR.
dfbe07ba 105.
2792c2ad 106.IP "\fB\-\-oneline\fR"
4d14e30f 107Modifies the output format so that the output for each command is printed
2792c2ad 108on a single line. New-line characters that would otherwise separate
4d14e30f 109lines are printed as \fB\\n\fR, and any instances of \fB\\\fR that
2792c2ad 110would otherwise appear in the output are doubled.
4d14e30f 111Prints a blank line for each command that has no output.
e051b42c
BP
112This option does not affect the formatting of output from the
113\fBlist\fR or \fBfind\fR commands; see \fBTable Formatting Options\fR
114below.
37c84020 115.
577aebdf
BP
116.IP "\fB\-\-dry\-run\fR"
117Prevents \fBovs\-vsctl\fR from actually modifying the database.
118.
4e312e69
BP
119.IP "\fB\-t \fIsecs\fR"
120.IQ "\fB\-\-timeout=\fIsecs\fR"
6b7b9d34
BP
121By default, or with a \fIsecs\fR of \fB0\fR, \fBovs\-vsctl\fR waits
122forever for a response from the database. This option limits runtime
123to approximately \fIsecs\fR seconds. If the timeout expires,
124\fBovs\-vsctl\fR will exit with a \fBSIGALRM\fR signal. (A timeout
125would normally happen only if the database cannot be contacted, or if
126the system is overloaded.)
342045e1 127.
fba6bd1d
BP
128.IP "\fB\-\-retry\fR"
129Without this option, if \fBovs\-vsctl\fR connects outward to the
130database server (the default) then \fBovs\-vsctl\fR will try to
131connect once and exit with an error if the connection fails (which
132usually means that \fBovsdb\-server\fR is not running).
133.IP
134With this option, or if \fB\-\-db\fR specifies that \fBovs\-vsctl\fR
135should listen for an incoming connection from the database server,
136then \fBovs\-vsctl\fR will wait for a connection to the database
137forever.
138.IP
139Regardless of this setting, \fB\-\-timeout\fR always limits how long
140\fBovs\-vsctl\fR will wait.
141.
e051b42c
BP
142.SS "Table Formatting Options"
143These options control the format of output from the \fBlist\fR and
144\fBfind\fR commands.
145.so lib/table.man
146.
ac300505 147.SS "Public Key Infrastructure Options"
84ee7bcf 148.so lib/ssl.man
812560d7
BP
149.so lib/ssl-bootstrap.man
150.so lib/ssl-peer-ca-cert.man
dfbe07ba
BP
151.so lib/vlog.man
152.
3b135da3
BP
153.SH COMMANDS
154The commands implemented by \fBovs\-vsctl\fR are described in the
155sections below.
524555d1
BP
156.SS "Open vSwitch Commands"
157These commands work with an Open vSwitch as a whole.
158.
159.IP "\fBinit\fR"
160Initializes the Open vSwitch database, if it is empty. If the
161database has already been initialized, this command has no effect.
162.IP
163Any successful \fBovs\-vsctl\fR command automatically initializes the
164Open vSwitch database if it is empty. This command is provided to
165initialize the database without executing any other command.
3b135da3 166.
9b1735a7
BP
167.IP "\fBshow\fR"
168Prints a brief overview of the database contents.
169.
18ee958b 170.IP "\fBemer\-reset\fR"
26b31540
BP
171Reset the configuration into a clean state. It deconfigures OpenFlow
172controllers, OVSDB servers, and SSL, and deletes port mirroring,
29089a54
RL
173\fBfail_mode\fR, NetFlow, sFlow, and IPFIX configuration. This
174command also removes all \fBother\-config\fR keys from all database
175records, except that \fBother\-config:hwaddr\fR is preserved if it is
176present in a Bridge record. Other networking configuration is left
177as-is.
18ee958b 178.
3b135da3
BP
179.SS "Bridge Commands"
180These commands examine and manipulate Open vSwitch bridges.
181.
aeee85aa 182.IP "[\fB\-\-may\-exist\fR] \fBadd\-br \fIbridge\fR"
3b135da3
BP
183Creates a new bridge named \fIbridge\fR. Initially the bridge will
184have no ports (other than \fIbridge\fR itself).
aeee85aa
BP
185.IP
186Without \fB\-\-may\-exist\fR, attempting to create a bridge that
cefb3cc6
BP
187exists is an error. With \fB\-\-may\-exist\fR, this command does
188nothing if \fIbridge\fR already exists as a real bridge.
3b135da3 189.
aeee85aa 190.IP "[\fB\-\-may\-exist\fR] \fBadd\-br \fIbridge parent vlan\fR"
3b135da3
BP
191Creates a ``fake bridge'' named \fIbridge\fR within the existing Open
192vSwitch bridge \fIparent\fR, which must already exist and must not
193itself be a fake bridge. The new fake bridge will be on 802.1Q VLAN
5341d046 194\fIvlan\fR, which must be an integer between 0 and 4095. Initially
3b135da3 195\fIbridge\fR will have no ports (other than \fIbridge\fR itself).
aeee85aa
BP
196.IP
197Without \fB\-\-may\-exist\fR, attempting to create a bridge that
cefb3cc6
BP
198exists is an error. With \fB\-\-may\-exist\fR, this command does
199nothing if \fIbridge\fR already exists as a VLAN bridge under
200\fIparent\fR for \fIvlan\fR.
3b135da3 201.
460aad80 202.IP "[\fB\-\-if\-exists\fR] \fBdel\-br \fIbridge\fR"
3b135da3
BP
203Deletes \fIbridge\fR and all of its ports. If \fIbridge\fR is a real
204bridge, this command also deletes any fake bridges that were created
205with \fIbridge\fR as parent, including all of their ports.
460aad80
BP
206.IP
207Without \fB\-\-if\-exists\fR, attempting to delete a bridge that does
208not exist is an error. With \fB\-\-if\-exists\fR, attempting to
209delete a bridge that does not exist has no effect.
3b135da3 210.
515d830a 211.IP "[\fB\-\-real\fR|\fB\-\-fake\fR] \fBlist\-br\fR"
3b135da3 212Lists all existing real and fake bridges on standard output, one per
515d830a
JP
213line. With \fB\-\-real\fR or \fB\-\-fake\fR, only bridges of that type
214are returned.
3b135da3
BP
215.
216.IP "\fBbr\-exists \fIbridge\fR"
217Tests whether \fIbridge\fR exists as a real or fake bridge. If so,
218\fBovs\-vsctl\fR exits successfully with exit code 0. If not,
219\fBovs\-vsctl\fR exits unsuccessfully with exit code 2.
220.
8e58fa9a
BP
221.IP "\fBbr\-to\-vlan \fIbridge\fR"
222If \fIbridge\fR is a fake bridge, prints the bridge's 802.1Q VLAN as a
223decimal integer. If \fIbridge\fR is a real bridge, prints 0.
224.
225.IP "\fBbr\-to\-parent \fIbridge\fR"
226If \fIbridge\fR is a fake bridge, prints the name of its parent
227bridge. If \fIbridge\fR is a real bridge, print \fIbridge\fR.
228.
457e1eb0
BP
229.IP "\fBbr\-set\-external\-id \fIbridge key\fR [\fIvalue\fR]"
230Sets or clears an ``external ID'' value on \fIbridge\fR. These values
231are intended to identify entities external to Open vSwitch with which
232\fIbridge\fR is associated, e.g. the bridge's identifier in a
233virtualization management platform. The Open vSwitch database schema
234specifies well-known \fIkey\fR values, but \fIkey\fR and \fIvalue\fR
235are otherwise arbitrary strings.
236.IP
237If \fIvalue\fR is specified, then \fIkey\fR is set to \fIvalue\fR for
238\fIbridge\fR, overwriting any previous value. If \fIvalue\fR is
239omitted, then \fIkey\fR is removed from \fIbridge\fR's set of external
240IDs (if it was present).
e328faad
BP
241.IP
242For real bridges, the effect of this command is similar to that of a
243\fBset\fR or \fBremove\fR command in the \fBexternal\-ids\fR column of
244the \fBBridge\fR table. For fake bridges, it actually modifies keys
245with names prefixed by \fBfake\-bridge\-\fR in the \fBPort\fR table.
457e1eb0
BP
246.
247.IP "\fBbr\-get\-external\-id \fIbridge\fR [\fIkey\fR]"
248Queries the external IDs on \fIbridge\fR. If \fIkey\fR is specified,
249the output is the value for that \fIkey\fR or the empty string if
250\fIkey\fR is unset. If \fIkey\fR is omitted, the output is
251\fIkey\fB=\fIvalue\fR, one per line, for each key-value pair.
e328faad
BP
252.IP
253For real bridges, the effect of this command is similar to that of a
254\fBget\fR command in the \fBexternal\-ids\fR column of the
255\fBBridge\fR table. For fake bridges, it queries keys with names
256prefixed by \fBfake\-bridge\-\fR in the \fBPort\fR table.
457e1eb0 257.
3b135da3
BP
258.SS "Port Commands"
259.
260These commands examine and manipulate Open vSwitch ports. These
261commands treat a bonded port as a single entity.
262.
263.IP "\fBlist\-ports \fIbridge\fR"
264Lists all of the ports within \fIbridge\fR on standard output, one per
265line. The local port \fIbridge\fR is not included in the list.
266.
18b239f5 267.IP "[\fB\-\-may\-exist\fR] \fBadd\-port \fIbridge port \fR[\fIcolumn\fR[\fB:\fIkey\fR]\fR=\fIvalue\fR]\&...\fR"
3b135da3
BP
268Creates on \fIbridge\fR a new port named \fIport\fR from the network
269device of the same name.
bb1c67c8 270.IP
18b239f5
BP
271Optional arguments set values of column in the Port record created by
272the command. For example, \fBtag=9\fR would make the port an access
273port for VLAN 9. The syntax is the same as that for the \fBset\fR
274command (see \fBDatabase Commands\fR below).
275.IP
bb1c67c8 276Without \fB\-\-may\-exist\fR, attempting to create a port that exists
cefb3cc6
BP
277is an error. With \fB\-\-may\-exist\fR, this command does nothing if
278\fIport\fR already exists on \fIbridge\fR and is not a bonded port.
3b135da3 279.
18b239f5 280.IP "[\fB\-\-fake\-iface\fR] \fBadd\-bond \fIbridge port iface\fR\&... [\fIcolumn\fR[\fB:\fIkey\fR]\fR=\fIvalue\fR]\&...\fR"
3b135da3
BP
281Creates on \fIbridge\fR a new port named \fIport\fR that bonds
282together the network devices given as each \fIiface\fR. At least two
283interfaces must be named.
b4182c7f 284.IP
18b239f5
BP
285Optional arguments set values of column in the Port record created by
286the command. The syntax is the same as that for the \fBset\fR command
287(see \fBDatabase Commands\fR below).
288.IP
b4182c7f
JP
289With \fB\-\-fake\-iface\fR, a fake interface with the name \fIport\fR is
290created. This should only be used for compatibility with legacy
291software that requires it.
bb1c67c8
BP
292.IP
293Without \fB\-\-may\-exist\fR, attempting to create a port that exists
cefb3cc6
BP
294is an error. With \fB\-\-may\-exist\fR, this command does nothing if
295\fIport\fR already exists on \fIbridge\fR and bonds together exactly
296the specified interfaces.
3b135da3 297.
460aad80 298.IP "[\fB\-\-if\-exists\fR] \fBdel\-port \fR[\fIbridge\fR] \fIport\fR"
3d1b9636
BP
299Deletes \fIport\fR. If \fIbridge\fR is omitted, \fIport\fR is removed
300from whatever bridge contains it; if \fIbridge\fR is specified, it
301must be the real or fake bridge that contains \fIport\fR.
460aad80
BP
302.IP
303Without \fB\-\-if\-exists\fR, attempting to delete a port that does
304not exist is an error. With \fB\-\-if\-exists\fR, attempting to
305delete a port that does not exist has no effect.
3b135da3 306.
7c79588e
BP
307.IP "[\fB\-\-if\-exists\fR] \fB\-\-with\-iface del\-port \fR[\fIbridge\fR] \fIiface\fR"
308Deletes the port named \fIiface\fR or that has an interface named
309\fIiface\fR. If \fIbridge\fR is omitted, the port is removed from
310whatever bridge contains it; if \fIbridge\fR is specified, it must be
311the real or fake bridge that contains the port.
312.IP
313Without \fB\-\-if\-exists\fR, attempting to delete the port for an
314interface that does not exist is an error. With \fB\-\-if\-exists\fR,
315attempting to delete the port for an interface that does not exist has
316no effect.
317.
3b135da3
BP
318.IP "\fBport\-to\-br \fIport\fR"
319Prints the name of the bridge that contains \fIport\fR on standard
320output.
321.
322.SS "Interface Commands"
323.
324These commands examine the interfaces attached to an Open vSwitch
325bridge. These commands treat a bonded port as a collection of two or
326more interfaces, rather than as a single port.
327.
328.IP "\fBlist\-ifaces \fIbridge\fR"
329Lists all of the interfaces within \fIbridge\fR on standard output,
330one per line. The local port \fIbridge\fR is not included in the
331list.
332.
333.IP "\fBiface\-to\-br \fIiface\fR"
334Prints the name of the bridge that contains \fIiface\fR on standard
335output.
457e1eb0 336.
5aa00635
JP
337.SS "OpenFlow Controller Connectivity"
338.
339\fBovs\-vswitchd\fR can perform all configured bridging and switching
c0de82d9
JP
340locally, or it can be configured to communicate with one or more
341external OpenFlow controllers. The switch is typically configured to
342connect to a primary controller that takes charge of the bridge's flow
343table to implement a network policy. In addition, the switch can be
344configured to listen to connections from service controllers. Service
345controllers are typically used for occasional support and maintenance,
346e.g. with \fBovs\-ofctl\fR.
5aa00635 347.
1a048029 348.IP "\fBget\-controller\fR \fIbridge\fR"
5aa00635
JP
349Prints the configured controller target.
350.
1a048029 351.IP "\fBdel\-controller\fR \fIbridge\fR"
5aa00635
JP
352Deletes the configured controller target.
353.
1a048029
JP
354.IP "\fBset\-controller\fR \fIbridge\fR \fItarget\fR\&..."
355Sets the configured controller target or targets. Each \fItarget\fR may
356use any of the following forms:
5aa00635
JP
357.
358.RS
84ee7bcf 359.so lib/vconn-active.man
c0de82d9 360.so lib/vconn-passive.man
5aa00635 361.RE
84ee7bcf 362.
5aa00635 363.ST "Controller Failure Settings"
89365653 364.PP
5aa00635
JP
365When a controller is configured, it is, ordinarily, responsible for
366setting up all flows on the switch. Thus, if the connection to
367the controller fails, no new network connections can be set up. If
368the connection to the controller stays down long enough, no packets
369can pass through the switch at all.
63f08492 370.PP
5aa00635
JP
371If the value is \fBstandalone\fR, or if neither of these settings
372is set, \fBovs\-vswitchd\fR will take over
373responsibility for setting up
374flows when no message has been received from the controller for three
dd1dcc23 375times the inactivity probe interval. In this mode,
5aa00635
JP
376\fBovs\-vswitchd\fR causes the datapath to act like an ordinary
377MAC-learning switch. \fBovs\-vswitchd\fR will continue to retry connecting
378to the controller in the background and, when the connection succeeds,
379it discontinues its standalone behavior.
63f08492 380.PP
5aa00635
JP
381If this option is set to \fBsecure\fR, \fBovs\-vswitchd\fR will not
382set up flows on its own when the controller connection fails.
383.
1a048029 384.IP "\fBget\-fail\-mode\fR \fIbridge\fR"
5aa00635
JP
385Prints the configured failure mode.
386.
1a048029 387.IP "\fBdel\-fail\-mode\fR \fIbridge\fR"
5aa00635
JP
388Deletes the configured failure mode.
389.
1a048029 390.IP "\fBset\-fail\-mode\fR \fIbridge\fR \fBstandalone\fR|\fBsecure\fR"
5aa00635
JP
391Sets the configured failure mode.
392.
24b8b259
AE
393.SS "Manager Connectivity"
394.
289df16d
AE
395These commands manipulate the \fBmanager_options\fR column in the
396\fBOpen_vSwitch\fR table and rows in the \fBManagers\fR table. When
397\fBovsdb\-server\fR is configured to use the \fBmanager_options\fR column for
398OVSDB connections (as described in \fBINSTALL.Linux\fR and in the startup
399scripts provided with Open vSwitch), this allows the administrator to use
24b8b259
AE
400\fBovs\-vsctl\fR to configure database connections.
401.
402.IP "\fBget\-manager\fR"
403Prints the configured manager(s).
404.
405.IP "\fBdel\-manager\fR"
406Deletes the configured manager(s).
407.
408.IP "\fBset\-manager\fR \fItarget\fR\&..."
409Sets the configured manager target or targets. Each \fItarget\fR may
410use any of the following forms:
411.
412.RS
413.so ovsdb/remote-active.man
414.so ovsdb/remote-passive.man
415.RE
416.
dd8ac6fe
JP
417.SS "SSL Configuration"
418When \fBovs\-vswitchd\fR is configured to connect over SSL for management or
419controller connectivity, the following parameters are required:
420.TP
ae9a3235 421\fIprivate-key\fR
dd8ac6fe
JP
422Specifies a PEM file containing the private key used as the virtual
423switch's identity for SSL connections to the controller.
424.TP
ae9a3235 425\fIcertificate\fR
dd8ac6fe
JP
426Specifies a PEM file containing a certificate, signed by the
427certificate authority (CA) used by the controller and manager, that
428certifies the virtual switch's private key, identifying a trustworthy
429switch.
430.TP
ae9a3235 431\fIca-cert\fR
dd8ac6fe
JP
432Specifies a PEM file containing the CA certificate used to verify that
433the virtual switch is connected to a trustworthy controller.
434.PP
435These files are read only once, at \fBovs\-vswitchd\fR startup time. If
436their contents change, \fBovs\-vswitchd\fR must be killed and restarted.
437.PP
438These SSL settings apply to all SSL connections made by the virtual
439switch.
440.
441.IP "\fBget\-ssl\fR"
442Prints the SSL configuration.
443.
444.IP "\fBdel\-ssl\fR"
445Deletes the current SSL configuration.
446.
447.IP "[\fB\-\-bootstrap\fR] \fBset\-ssl\fR \fIprivate-key\fR \fIcertificate\fR \fIca-cert\fR"
448Sets the SSL configuration. The \fB\-\-bootstrap\fR option is described
449below.
450.
451.ST "CA Certificate Bootstrap"
89365653 452.PP
dd8ac6fe 453Ordinarily, all of the files named in the SSL configuration must exist
40a09c8a
BP
454when \fBovs\-vswitchd\fR starts. However, if the \fIca-cert\fR file
455does not exist and the \fB\-\-bootstrap\fR
dd8ac6fe
JP
456option is given, then \fBovs\-vswitchd\fR will attempt to obtain the
457CA certificate from the controller on its first SSL connection and
458save it to the named PEM file. If it is successful, it will
459immediately drop the connection and reconnect, and from then on all
460SSL connections must be authenticated by a certificate signed by the
461CA certificate thus obtained.
462.PP
463\fBThis option exposes the SSL connection to a man-in-the-middle
464attack obtaining the initial CA certificate\fR, but it may be useful
465for bootstrapping.
466.PP
467This option is only useful if the controller sends its CA certificate
468as part of the SSL certificate chain. The SSL protocol does not
1d5aaa61 469require the controller to send the CA certificate.
dd8ac6fe 470.
ad83bfa6
BP
471.SS "Database Commands"
472.
473These commands query and modify the contents of \fBovsdb\fR tables.
474They are a slight abstraction of the \fBovsdb\fR interface and as such
475they operate at a lower level than other \fBovs\-vsctl\fR commands.
476.PP
477.ST "Identifying Tables, Records, and Columns"
478.PP
479Each of these commands has a \fItable\fR parameter to identify a table
480within the database. Many of them also take a \fIrecord\fR parameter
481that identifies a particular record within a table. The \fIrecord\fR
482parameter may be the UUID for a record, and many tables offer
483additional ways to identify records. Some commands also take
484\fIcolumn\fR parameters that identify a particular field within the
485records in a table.
486.PP
487The following tables are currently defined:
488.IP "\fBOpen_vSwitch\fR"
489Global configuration for an \fBovs\-vswitchd\fR. This table contains
490exactly one record, identified by specifying \fB.\fR as the record
491name.
492.IP "\fBBridge\fR"
493Configuration for a bridge within an Open vSwitch. Records may be
494identified by bridge name.
495.IP "\fBPort\fR"
496A bridge port. Records may be identified by port name.
497.IP "\fBInterface\fR"
498A network device attached to a port. Records may be identified by
499name.
254750ce
BP
500.IP "\fBFlow_Table\fR"
501Configuration for a particular OpenFlow flow table. Records may be
502identified by name.
7b63fa03 503.IP "\fBQoS\fR"
c5f341ab
BP
504Quality-of-service configuration for a \fBPort\fR. Records may be
505identified by port name.
7b63fa03 506.IP "\fBQueue\fR"
c5f341ab
BP
507Configuration for one queue within a \fBQoS\fR configuration. Records
508may only be identified by UUID.
ef1e753e
BP
509.IP "\fBMirror\fR"
510A port mirroring configuration attached to a bridge. Records may be
511identified by mirror name.
ad83bfa6
BP
512.IP "\fBController\fR"
513Configuration for an OpenFlow controller. A controller attached to a
1a048029 514particular bridge may be identified by the bridge's name.
94db5407
BP
515.IP "\fBManager\fR"
516Configuration for an OVSDB connection. Records may be identified
517by target (e.g. \fBtcp:1.2.3.4\fR).
ad83bfa6
BP
518.IP "\fBNetFlow\fR"
519A NetFlow configuration attached to a bridge. Records may be
ef1e753e
BP
520identified by bridge name.
521.IP "\fBSSL\fR"
522The global SSL configuration for \fBovs\-vswitchd\fR. The record
523attached to the \fBOpen_vSwitch\fR table may be identified by
524specifying \fB.\fR as the record name.
525.IP "\fBsFlow\fR"
29089a54 526An sFlow exporter configuration attached to a bridge. Records may be
ad83bfa6 527identified by bridge name.
29089a54
RL
528.IP "\fBIPFIX\fR"
529An IPFIX exporter configuration attached to a bridge. Records may be
530identified by bridge name.
531.IP "\fBFlow_Sample_Collector_Set\fR"
532An IPFIX exporter configuration attached to a bridge for sampling
533packets on a per-flow basis using OpenFlow \fBsample\fR actions.
ad83bfa6 534.PP
e111e681
BP
535Record names must be specified in full and with correct
536capitalization. Names of tables and columns are not case-sensitive,
537and \fB\-\-\fR and \fB_\fR are treated interchangeably. Unique
5de48440 538abbreviations are acceptable, e.g. \fBnet\fR or \fBn\fR is sufficient
ad83bfa6
BP
539to identify the \fBNetFlow\fR table.
540.
541.ST "Database Values"
89365653 542.PP
ad83bfa6
BP
543Each column in the database accepts a fixed type of data. The
544currently defined basic types, and their representations, are:
545.IP "integer"
546A decimal integer in the range \-2**63 to 2**63\-1, inclusive.
547.IP "real"
548A floating-point number.
549.IP "Boolean"
550True or false, written \fBtrue\fR or \fBfalse\fR, respectively.
551.IP "string"
552An arbitrary Unicode string, except that null bytes are not allowed.
553Quotes are optional for most strings that begin with an English letter
554or underscore and consist only of letters, underscores, hyphens, and
555periods. However, \fBtrue\fR and \fBfalse\fR and strings that match
556the syntax of UUIDs (see below) must be enclosed in double quotes to
557distinguish them from other basic types. When double quotes are used,
558the syntax is that of strings in JSON, e.g. backslashes may be used to
559escape special characters. The empty string must be represented as a
560pair of double quotes (\fB""\fR).
561.IP "UUID"
ce5a3e38
BP
562Either a universally unique identifier in the style of RFC 4122,
563e.g. \fBf81d4fae\-7dec\-11d0\-a765\-00a0c91e6bf6\fR, or an \fB@\fIname\fR
aed133bf 564defined by a \fBget\fR or \fBcreate\fR command within the same \fBovs\-vsctl\fR
ce5a3e38 565invocation.
ad83bfa6
BP
566.PP
567Multiple values in a single column may be separated by spaces or a
568single comma. When multiple values are present, duplicates are not
569allowed, and order is not important. Conversely, some database
570columns can have an empty set of values, represented as \fB[]\fR, and
571square brackets may optionally enclose other non-empty sets or single
572values as well.
573.PP
574A few database columns are ``maps'' of key-value pairs, where the key
575and the value are each some fixed database type. These are specified
576in the form \fIkey\fB=\fIvalue\fR, where \fIkey\fR and \fIvalue\fR
577follow the syntax for the column's key type and value type,
578respectively. When multiple pairs are present (separated by spaces or
579a comma), duplicate keys are not allowed, and again the order is not
580important. Duplicate values are allowed. An empty map is represented
424202bc
BP
581as \fB{}\fR. Curly braces may optionally enclose non-empty maps as
582well (but use quotes to prevent the shell from expanding
583\fBother-config={0=x,1=y}\fR into \fBother-config=0=x
584other-config=1=y\fR, which may not have the desired effect).
ad83bfa6
BP
585.
586.ST "Database Command Syntax"
e99d41f7
BP
587.
588.IP "[\fB\-\-if\-exists\fR] [\fB\-\-columns=\fIcolumn\fR[\fB,\fIcolumn\fR]...] \fBlist \fItable \fR[\fIrecord\fR]..."
9591fefe 589Lists the data in each specified \fIrecord\fR. If no
ad83bfa6 590records are specified, lists all the records in \fItable\fR.
3ef917b5 591.IP
9591fefe
BP
592If \fB\-\-columns\fR is specified, only the requested columns are
593listed, in the specified order. Otherwise, all columns are listed, in
594alphabetical order by column name.
e99d41f7
BP
595.IP
596Without \fB\-\-if-exists\fR, it is an error if any specified
597\fIrecord\fR does not exist. With \fB\-\-if-exists\fR, the command
598ignores any \fIrecord\fR that does not exist, without producing any
599output.
9591fefe 600.
0a140468
BP
601.IP "[\fB\-\-columns=\fIcolumn\fR[\fB,\fIcolumn\fR]...] \fBfind \fItable \fR[\fIcolumn\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR]..."
602Lists the data in each record in \fItable\fR whose \fIcolumn\fR equals
603\fIvalue\fR or, if \fIkey\fR is specified, whose \fIcolumn\fR contains
2a9537e2
BP
604a \fIkey\fR with the specified \fIvalue\fR. The following operators
605may be used where \fB=\fR is written in the syntax summary:
606.RS
607.IP "\fB= != < > <= >=\fR"
608Selects records in which \fIcolumn\fR[\fB:\fIkey\fR] equals, does not
609equal, is less than, is greater than, is less than or equal to, or is
610greater than or equal to \fIvalue\fR, respectively.
611.IP
612Consider \fIcolumn\fR[\fB:\fIkey\fR] and \fIvalue\fR as sets of
613elements. Identical sets are considered equal. Otherwise, if the
614sets have different numbers of elements, then the set with more
615elements is considered to be larger. Otherwise, consider a element
616from each set pairwise, in increasing order within each set. The
617first pair that differs determines the result. (For a column that
618contains key-value pairs, first all the keys are compared, and values
619are considered only if the two sets contain identical keys.)
620.IP "\fB{=} {!=}\fR"
621Test for set equality or inequality, respectively.
622.IP "\fB{<=}\fR"
623Selects records in which \fIcolumn\fR[\fB:\fIkey\fR] is a subset of
624\fIvalue\fR. For example, \fBflood-vlans{<=}1,2\fR selects records in
625which the \fBflood-vlans\fR column is the empty set or contains 1 or 2
626or both.
627.IP "\fB{<}\fR"
628Selects records in which \fIcolumn\fR[\fB:\fIkey\fR] is a proper
629subset of \fIvalue\fR. For example, \fBflood-vlans{<}1,2\fR selects
630records in which the \fBflood-vlans\fR column is the empty set or
631contains 1 or 2 but not both.
632.IP "\fB{>=} {>}\fR"
633Same as \fB{<=}\fR and \fB{<}\fR, respectively, except that the
634relationship is reversed. For example, \fBflood-vlans{>=}1,2\fR
635selects records in which the \fBflood-vlans\fR column contains both 1
636and 2.
637.RE
638.IP
639For arithmetic operators (\fB= != < > <= >=\fR), when \fIkey\fR is
640specified but a particular record's \fIcolumn\fR does not contain
641\fIkey\fR, the record is always omitted from the results. Thus, the
642condition \fBother-config:mtu!=1500\fR matches records that have a
643\fBmtu\fR key whose value is not 1500, but not those that lack an
644\fBmtu\fR key.
645.IP
646For the set operators, when \fIkey\fR is specified but a particular
647record's \fIcolumn\fR does not contain \fIkey\fR, the comparison is
648done against an empty set. Thus, the condition
649\fBother-config:mtu{!=}1500\fR matches records that have a \fBmtu\fR
650key whose value is not 1500 and those that lack an \fBmtu\fR key.
651.IP
652Don't forget to escape \fB<\fR or \fB>\fR from interpretation by the
653shell.
0a140468
BP
654.IP
655If \fB\-\-columns\fR is specified, only the requested columns are
656listed, in the specified order. Otherwise all columns are listed, in
657alphabetical order by column name.
9591fefe 658.IP
3ef917b5
BP
659The UUIDs shown for rows created in the same \fBovs\-vsctl\fR
660invocation will be wrong.
ad83bfa6 661.
e99d41f7 662.IP "[\fB\-\-if\-exists\fR] [\fB\-\-id=@\fIname\fR] \fBget \fItable record \fR[\fIcolumn\fR[\fB:\fIkey\fR]]..."
ad83bfa6
BP
663Prints the value of each specified \fIcolumn\fR in the given
664\fIrecord\fR in \fItable\fR. For map columns, a \fIkey\fR may
665optionally be specified, in which case the value associated with
666\fIkey\fR in the column is printed, instead of the entire map.
870aeb4a 667.IP
e99d41f7
BP
668Without \fB\-\-if\-exists\fR, it is an error if \fIrecord\fR does not
669exist or \fIkey\fR is specified, if \fIkey\fR does not exist in
670\fIrecord\fR. With \fB\-\-if\-exists\fR, a missing \fIrecord\fR
671yields no output and a missing \fIkey\fR prints a blank line.
aed133bf
BP
672.IP
673If \fB@\fIname\fR is specified, then the UUID for \fIrecord\fR may be
674referred to by that name later in the same \fBovs\-vsctl\fR
675invocation in contexts where a UUID is expected.
6d5abe94
BP
676.IP
677Both \fB\-\-id\fR and the \fIcolumn\fR arguments are optional, but
678usually at least one or the other should be specified. If both are
679omitted, then \fBget\fR has no effect except to verify that
680\fIrecord\fR exists in \fItable\fR.
e99d41f7
BP
681.IP
682\fB\-\-id\fR and \fB\-\-if\-exists\fR cannot be used together.
ad83bfa6 683.
e99d41f7 684.IP "[\fB\-\-if\-exists\fR] \fBset \fItable record column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
ad83bfa6
BP
685Sets the value of each specified \fIcolumn\fR in the given
686\fIrecord\fR in \fItable\fR to \fIvalue\fR. For map columns, a
687\fIkey\fR may optionally be specified, in which case the value
688associated with \fIkey\fR in that column is changed (or added, if none
689exists), instead of the entire map.
e99d41f7
BP
690.IP
691Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
692exist. With \fB\-\-if-exists\fR, this command does nothing if
693\fIrecord\fR does not exist.
ad83bfa6 694.
e99d41f7 695.IP "[\fB\-\-if\-exists\fR] \fBadd \fItable record column \fR[\fIkey\fB=\fR]\fIvalue\fR..."
ad83bfa6
BP
696Adds the specified value or key-value pair to \fIcolumn\fR in
697\fIrecord\fR in \fItable\fR. If \fIcolumn\fR is a map, then \fIkey\fR
698is required, otherwise it is prohibited. If \fIkey\fR already exists
699in a map column, then the current \fIvalue\fR is not replaced (use the
700\fBset\fR command to replace an existing value).
e99d41f7
BP
701.IP
702Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
703exist. With \fB\-\-if-exists\fR, this command does nothing if
704\fIrecord\fR does not exist.
90c4bd00 705.
e99d41f7
BP
706.IP "[\fB\-\-if\-exists\fR] \fBremove \fItable record column \fR\fIvalue\fR..."
707.IQ "[\fB\-\-if\-exists\fR] \fBremove \fItable record column \fR\fIkey\fR..."
708.IQ "[\fB\-\-if\-exists\fR] \fBremove \fItable record column \fR\fIkey\fB=\fR\fIvalue\fR..."
90c4bd00
BP
709Removes the specified values or key-value pairs from \fIcolumn\fR in
710\fIrecord\fR in \fItable\fR. The first form applies to columns that
711are not maps: each specified \fIvalue\fR is removed from the column.
712The second and third forms apply to map columns: if only a \fIkey\fR
713is specified, then any key-value pair with the given \fIkey\fR is
714removed, regardless of its value; if a \fIvalue\fR is given then a
715pair is removed only if both key and value match.
716.IP
717It is not an error if the column does not contain the specified key or
718value or pair.
e99d41f7
BP
719.IP
720Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
721exist. With \fB\-\-if-exists\fR, this command does nothing if
722\fIrecord\fR does not exist.
90c4bd00 723.
e99d41f7 724.IP "[\fB\-\-if\-exists\fR] \fBclear\fR \fItable record column\fR..."
90c4bd00
BP
725Sets each \fIcolumn\fR in \fIrecord\fR in \fItable\fR to the empty set
726or empty map, as appropriate. This command applies only to columns
727that are allowed to be empty.
e99d41f7
BP
728.IP
729Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
730exist. With \fB\-\-if-exists\fR, this command does nothing if
731\fIrecord\fR does not exist.
90c4bd00 732.
4e312e69 733.IP "[\fB\-\-id=@\fIname\fR] \fBcreate\fR \fItable column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
557e3718
BP
734Creates a new record in \fItable\fR and sets the initial values of
735each \fIcolumn\fR. Columns not explicitly set will receive their
3ef917b5 736default values. Outputs the UUID of the new row.
ce5a3e38
BP
737.IP
738If \fB@\fIname\fR is specified, then the UUID for the new row may be
739referred to by that name elsewhere in the same \fBovs\-vsctl\fR
740invocation in contexts where a UUID is expected. Such references may
741precede or follow the \fBcreate\fR command.
c5f341ab
BP
742.IP
743Records in the Open vSwitch database are significant only when they
744can be reached directly or indirectly from the \fBOpen_vSwitch\fR
745table. Except for records in the \fBQoS\fR or \fBQueue\fR tables,
746records that are not reachable from the \fBOpen_vSwitch\fR table are
747automatically deleted from the database. This deletion happens
748immediately, without waiting for additional \fBovs\-vsctl\fR commands
749or other database activity. Thus, a \fBcreate\fR command must
750generally be accompanied by additional commands \fIwithin the same
751\fBovs\-vsctl\fI invocation\fR to add a chain of references to the
752newly created record from the top-level \fBOpen_vSwitch\fR record.
753The \fBEXAMPLES\fR section gives some examples that show how to do
754this.
b7f74b6f 755.
0d0f05b9 756.IP "\fR[\fB\-\-if\-exists\fR] \fBdestroy \fItable record\fR..."
b7f74b6f
BP
757Deletes each specified \fIrecord\fR from \fItable\fR. Unless
758\fB\-\-if\-exists\fR is specified, each \fIrecord\fRs must exist.
eeb8467e
AS
759.IP "\fB\-\-all destroy \fItable\fR"
760Deletes all records from the \fItable\fR.
c5f341ab 761.IP
dcd1dbc5
BP
762The \fBdestroy\fR command is only useful for records in the \fBQoS\fR
763or \fBQueue\fR tables. Records in other tables are automatically
764deleted from the database when they become unreachable from the
765\fBOpen_vSwitch\fR table. This means that deleting the last reference
766to a record is sufficient for deleting the record itself. For records
767in these tables, \fBdestroy\fR is silently ignored. See the
768\fBEXAMPLES\fR section below for more information.
7db03f7c
BP
769.
770.IP "\fBwait\-until \fItable record \fR[\fIcolumn\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR]..."
771Waits until \fItable\fR contains a record named \fIrecord\fR whose
772\fIcolumn\fR equals \fIvalue\fR or, if \fIkey\fR is specified, whose
773\fIcolumn\fR contains a \fIkey\fR with the specified \fIvalue\fR. Any
774of the operators \fB!=\fR, \fB<\fR, \fB>\fR, \fB<=\fR, or \fB>=\fR may
775be substituted for \fB=\fR to test for inequality, less than, greater
776than, less than or equal to, or greater than or equal to,
777respectively. (Don't forget to escape \fB<\fR or \fB>\fR from
778interpretation by the shell.)
779.IP
780If no \fIcolumn\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR arguments are given,
781this command waits only until \fIrecord\fR exists. If more than one
782such argument is given, the command waits until all of them are
783satisfied.
784.IP
785Usually \fBwait\-until\fR should be placed at the beginning of a set
786of \fBovs\-vsctl\fR commands. For example, \fBwait\-until bridge br0
787\-\- get bridge br0 datapath_id\fR waits until a bridge named
788\fBbr0\fR is created, then prints its \fBdatapath_id\fR column,
789whereas \fBget bridge br0 datapath_id \-\- wait\-until bridge br0\fR
790will abort if no bridge named \fBbr0\fR exists when \fBovs\-vsctl\fR
791initially connects to the database.
792.IP
7db03f7c
BP
793Consider specifying \fB\-\-timeout=0\fR along with
794\fB\-\-wait\-until\fR, to prevent \fBovs\-vsctl\fR from terminating
795after waiting only at most 5 seconds.
ffd66ea9
BP
796.IP "\fBcomment \fR[\fIarg\fR]..."
797This command has no effect on behavior, but any database log record
798created by the command will include the command and its arguments.
4d14e30f
BP
799.SH "EXAMPLES"
800Create a new bridge named br0 and add port eth0 to it:
801.IP
4e312e69 802.B "ovs\-vsctl add\-br br0"
4d14e30f 803.br
4e312e69 804.B "ovs\-vsctl add\-port br0 eth0"
4d14e30f
BP
805.PP
806Alternatively, perform both operations in a single atomic transaction:
807.IP
4e312e69 808.B "ovs\-vsctl add\-br br0 \-\- add\-port br0 eth0"
460aad80
BP
809.PP
810Delete bridge \fBbr0\fR, reporting an error if it does not exist:
811.IP
812.B "ovs\-vsctl del\-br br0"
813.PP
401d5a6d 814Delete bridge \fBbr0\fR if it exists:
460aad80 815.IP
401d5a6d 816.B "ovs\-vsctl \-\-if\-exists del\-br br0"
ce5a3e38
BP
817.PP
818Set the \fBqos\fR column of the \fBPort\fR record for \fBeth0\fR to
819point to a new \fBQoS\fR record, which in turn points with its queue 0
820to a new \fBQueue\fR record:
821.IP
4e312e69 822.B "ovs\-vsctl \-\- set port eth0 qos=@newqos \-\- \-\-id=@newqos create qos type=linux\-htb other\-config:max\-rate=1000000 queues:0=@newqueue \-\- \-\-id=@newqueue create queue other\-config:min\-rate=1000000 other\-config:max\-rate=1000000"
bad973d7
BP
823.SH "CONFIGURATION COOKBOOK"
824.SS "Port Configuration"
825.PP
826Add an ``internal port'' \fBvlan10\fR to bridge \fBbr0\fR as a VLAN
827access port for VLAN 10, and configure it with an IP address:
828.IP
829.B "ovs\-vsctl add\-port br0 vlan10 tag=10 \-\- set Interface vlan10 type=internal"
830.IP
831.B "ifconfig vlan10 192.168.0.123"
3b135da3 832.
19a79607
BP
833.PP
834Add a GRE tunnel port \fBgre0\fR to remote IP address 1.2.3.4 to
835bridge \fBbr0\fR:
836.IP
837.B "ovs\-vsctl add\-port br0 gre0 \-\- set Interface gre0 type=gre options:remote_ip=1.2.3.4"
838.
bad973d7
BP
839.SS "Port Mirroring"
840.PP
841Mirror all packets received or sent on \fBeth0\fR or \fBeth1\fR onto
842\fBeth2\fR, assuming that all of those ports exist on bridge \fBbr0\fR
843(as a side-effect this causes any packets received on \fBeth2\fR to be
844ignored):
845.IP
846.B "ovs\-vsctl \-\- set Bridge br0 mirrors=@m \(rs"
847.IP
848.B "\-\- \-\-id=@eth0 get Port eth0 \(rs"
849.IP
850.B "\-\- \-\-id=@eth1 get Port eth1 \(rs"
851.IP
852.B "\-\- \-\-id=@eth2 get Port eth2 \(rs"
853.IP
854.B "\-\- \-\-id=@m create Mirror name=mymirror select-dst-port=@eth0,@eth1 select-src-port=@eth0,@eth1 output-port=@eth2"
855.PP
c5f341ab
BP
856Remove the mirror created above from \fBbr0\fR, which also destroys
857the Mirror record (since it is now unreferenced):
bad973d7 858.IP
9d2e7445
BP
859.B "ovs\-vsctl \-\- \-\-id=@rec get Mirror mymirror \(rs"
860.IP
861.B "\-\- remove Bridge br0 mirrors @rec"
862.PP
863The following simpler command also works:
864.IP
865.B "ovs\-vsctl clear Bridge br0 mirrors"
bad973d7
BP
866.SS "Quality of Service (QoS)"
867.PP
868Create a \fBlinux\-htb\fR QoS record that points to a few queues and
869use it on \fBeth0\fR and \fBeth1\fR:
870.IP
871.B "ovs\-vsctl \-\- set Port eth0 qos=@newqos \(rs"
872.IP
873.B "\-\- set Port eth1 qos=@newqos \(rs"
874.IP
875.B "\-\- \-\-id=@newqos create QoS type=linux\-htb other\-config:max\-rate=1000000000 queues=0=@q0,1=@q1 \(rs"
876.IP
877.B "\-\- \-\-id=@q0 create Queue other\-config:min\-rate=100000000 other\-config:max\-rate=100000000 \(rs"
878.IP
879.B "\-\- \-\-id=@q1 create Queue other\-config:min\-rate=500000000"
880.PP
881Deconfigure the QoS record above from \fBeth1\fR only:
882.IP
883.B "ovs\-vsctl clear Port eth1 qos"
884.PP
885To deconfigure the QoS record from both \fBeth0\fR and \fBeth1\fR and
c5f341ab
BP
886then delete the QoS record (which must be done explicitly because
887unreferenced QoS records are not automatically destroyed):
bad973d7
BP
888.IP
889.B "ovs\-vsctl \-\- destroy QoS eth0 \-\- clear Port eth0 qos \-\- clear Port eth1 qos"
890.PP
891(This command will leave two unreferenced Queue records in the
892database. To delete them, use "\fBovs\-vsctl list Queue\fR" to find
893their UUIDs, then "\fBovs\-vsctl destroy Queue \fIuuid1\fR
eeb8467e
AS
894\fIuuid2\fR" to destroy each of them or use
895"\fBovs\-vsctl -- --all destroy Queue\fR" to delete all records.)
b31bcf60
EJ
896.SS "Connectivity Monitoring"
897.PP
93b8df38 898Monitor connectivity to a remote maintenance point on eth0.
b31bcf60 899.IP
a6e198ea 900.B "ovs\-vsctl set Interface eth0 cfm_mpid=1"
b31bcf60 901.PP
93b8df38 902Deconfigure connectivity monitoring from above:
b31bcf60 903.IP
a6e198ea 904.B "ovs\-vsctl clear Interface eth0 cfm_mpid"
bad973d7
BP
905.SS "NetFlow"
906.PP
907Configure bridge \fBbr0\fR to send NetFlow records to UDP port 5566 on
908host 192.168.0.34, with an active timeout of 30 seconds:
909.IP
910.B "ovs\-vsctl \-\- set Bridge br0 netflow=@nf \(rs"
911.IP
912.B "\-\- \-\-id=@nf create NetFlow targets=\(rs\(dq192.168.0.34:5566\(rs\(dq active\-timeout=30"
913.PP
914Update the NetFlow configuration created by the previous command to
915instead use an active timeout of 60 seconds:
916.IP
917.B "ovs\-vsctl set NetFlow br0 active_timeout=60"
918.PP
c5f341ab
BP
919Deconfigure the NetFlow settings from \fBbr0\fR, which also destroys
920the NetFlow record (since it is now unreferenced):
bad973d7 921.IP
c5f341ab 922.B "ovs\-vsctl clear Bridge br0 netflow"
bad973d7
BP
923.SS "sFlow"
924.PP
925Configure bridge \fBbr0\fR to send sFlow records to a collector on
92610.0.0.1 at port 6343, using \fBeth1\fR\'s IP address as the source,
927with specific sampling parameters:
928.IP
929.B "ovs\-vsctl \-\- \-\-id=@s create sFlow agent=eth1 target=\(rs\(dq10.0.0.1:6343\(rs\(dq header=128 sampling=64 polling=10 \(rs"
930.IP
931.B "\-\- set Bridge br0 sflow=@s"
932.PP
f0f87cbd 933Deconfigure sFlow from \fBbr0\fR, which also destroys the sFlow record
c5f341ab 934(since it is now unreferenced):
bad973d7 935.IP
c5f341ab 936.B "ovs\-vsctl \-\- clear Bridge br0 sflow"
29089a54
RL
937.SS "IPFIX"
938.PP
939Configure bridge \fBbr0\fR to send one IPFIX flow record per packet
940sample to UDP port 4739 on host 192.168.0.34, with Observation Domain
978427a5
RL
941ID 123 and Observation Point ID 456, a flow cache active timeout of 1
942minute (60 seconds), and a maximum flow cache size of 13 flows:
29089a54
RL
943.IP
944.B "ovs\-vsctl \-\- set Bridge br0 ipfix=@i \(rs"
945.IP
978427a5 946.B "\-\- \-\-id=@i create IPFIX targets=\(rs\(dq192.168.0.34:4739\(rs\(dq obs_domain_id=123 obs_point_id=456 cache_active_timeout=60 cache_max_flows=13"
29089a54
RL
947.PP
948Deconfigure the IPFIX settings from \fBbr0\fR, which also destroys the
949IPFIX record (since it is now unreferenced):
950.IP
951.B "ovs\-vsctl clear Bridge br0 ipfix"
21f7563c
JP
952.SS "802.1D Spanning Tree Protocol (STP)"
953.PP
954Configure bridge \fBbr0\fR to participate in an 802.1D spanning tree:
955.IP
956.B "ovs\-vsctl set Bridge br0 stp_enable=true"
957.PP
958Set the bridge priority of \fBbr0\fR to 0x7800:
959.IP
960.B "ovs\-vsctl set Bridge br0 other_config:stp-priority=0x7800"
961.PP
962Set the path cost of port \fBeth0\fR to 10:
963.IP
964.B "ovs\-vsctl set Port eth0 other_config:stp-path-cost=10"
965.PP
966Deconfigure STP from above:
967.IP
69630ea0 968.B "ovs\-vsctl set Bridge br0 stp_enable=false"
21f7563c 969.PP
bb8a54f3
IY
970.SS "OpenFlow Version"
971.PP
972Configure bridge \fBbr0\fR to support OpenFlow versions 1.0, 1.2, and
9731.3:
974.IP
975.B "ovs\-vsctl set bridge br0 protocols=openflow10,openflow12,openflow13"
976.
3b135da3
BP
977.SH "EXIT STATUS"
978.IP "0"
979Successful program execution.
980.IP "1"
981Usage, syntax, or configuration file error.
982.IP "2"
983The \fIbridge\fR argument to \fBbr\-exists\fR specified the name of a
984bridge that does not exist.
985.SH "SEE ALSO"
986.
dfbe07ba 987.BR ovsdb\-server (1),
5aa75474
BP
988.BR ovs\-vswitchd (8),
989.BR ovs\-vswitchd.conf.db (5).