]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-vsctl.8.in
mcast-snoop: Add support to control Reports forwarding
[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 151.so lib/vlog.man
77d9e0eb 152.so lib/common.man
dfbe07ba 153.
3b135da3
BP
154.SH COMMANDS
155The commands implemented by \fBovs\-vsctl\fR are described in the
156sections below.
524555d1
BP
157.SS "Open vSwitch Commands"
158These commands work with an Open vSwitch as a whole.
159.
160.IP "\fBinit\fR"
161Initializes the Open vSwitch database, if it is empty. If the
162database has already been initialized, this command has no effect.
163.IP
164Any successful \fBovs\-vsctl\fR command automatically initializes the
165Open vSwitch database if it is empty. This command is provided to
166initialize the database without executing any other command.
3b135da3 167.
9b1735a7
BP
168.IP "\fBshow\fR"
169Prints a brief overview of the database contents.
170.
18ee958b 171.IP "\fBemer\-reset\fR"
26b31540
BP
172Reset the configuration into a clean state. It deconfigures OpenFlow
173controllers, OVSDB servers, and SSL, and deletes port mirroring,
29089a54
RL
174\fBfail_mode\fR, NetFlow, sFlow, and IPFIX configuration. This
175command also removes all \fBother\-config\fR keys from all database
176records, except that \fBother\-config:hwaddr\fR is preserved if it is
177present in a Bridge record. Other networking configuration is left
178as-is.
18ee958b 179.
3b135da3
BP
180.SS "Bridge Commands"
181These commands examine and manipulate Open vSwitch bridges.
182.
aeee85aa 183.IP "[\fB\-\-may\-exist\fR] \fBadd\-br \fIbridge\fR"
3b135da3
BP
184Creates a new bridge named \fIbridge\fR. Initially the bridge will
185have no ports (other than \fIbridge\fR itself).
aeee85aa
BP
186.IP
187Without \fB\-\-may\-exist\fR, attempting to create a bridge that
cefb3cc6
BP
188exists is an error. With \fB\-\-may\-exist\fR, this command does
189nothing if \fIbridge\fR already exists as a real bridge.
3b135da3 190.
aeee85aa 191.IP "[\fB\-\-may\-exist\fR] \fBadd\-br \fIbridge parent vlan\fR"
3b135da3
BP
192Creates a ``fake bridge'' named \fIbridge\fR within the existing Open
193vSwitch bridge \fIparent\fR, which must already exist and must not
194itself be a fake bridge. The new fake bridge will be on 802.1Q VLAN
5dd9826c
BP
195\fIvlan\fR, which must be an integer between 0 and 4095. The parent
196bridge must not already have a fake bridge for \fIvlan\fR. Initially
3b135da3 197\fIbridge\fR will have no ports (other than \fIbridge\fR itself).
aeee85aa
BP
198.IP
199Without \fB\-\-may\-exist\fR, attempting to create a bridge that
cefb3cc6
BP
200exists is an error. With \fB\-\-may\-exist\fR, this command does
201nothing if \fIbridge\fR already exists as a VLAN bridge under
202\fIparent\fR for \fIvlan\fR.
3b135da3 203.
460aad80 204.IP "[\fB\-\-if\-exists\fR] \fBdel\-br \fIbridge\fR"
3b135da3
BP
205Deletes \fIbridge\fR and all of its ports. If \fIbridge\fR is a real
206bridge, this command also deletes any fake bridges that were created
207with \fIbridge\fR as parent, including all of their ports.
460aad80
BP
208.IP
209Without \fB\-\-if\-exists\fR, attempting to delete a bridge that does
210not exist is an error. With \fB\-\-if\-exists\fR, attempting to
211delete a bridge that does not exist has no effect.
3b135da3 212.
515d830a 213.IP "[\fB\-\-real\fR|\fB\-\-fake\fR] \fBlist\-br\fR"
3b135da3 214Lists all existing real and fake bridges on standard output, one per
515d830a
JP
215line. With \fB\-\-real\fR or \fB\-\-fake\fR, only bridges of that type
216are returned.
3b135da3
BP
217.
218.IP "\fBbr\-exists \fIbridge\fR"
219Tests whether \fIbridge\fR exists as a real or fake bridge. If so,
220\fBovs\-vsctl\fR exits successfully with exit code 0. If not,
221\fBovs\-vsctl\fR exits unsuccessfully with exit code 2.
222.
8e58fa9a
BP
223.IP "\fBbr\-to\-vlan \fIbridge\fR"
224If \fIbridge\fR is a fake bridge, prints the bridge's 802.1Q VLAN as a
225decimal integer. If \fIbridge\fR is a real bridge, prints 0.
226.
227.IP "\fBbr\-to\-parent \fIbridge\fR"
228If \fIbridge\fR is a fake bridge, prints the name of its parent
229bridge. If \fIbridge\fR is a real bridge, print \fIbridge\fR.
230.
457e1eb0
BP
231.IP "\fBbr\-set\-external\-id \fIbridge key\fR [\fIvalue\fR]"
232Sets or clears an ``external ID'' value on \fIbridge\fR. These values
233are intended to identify entities external to Open vSwitch with which
234\fIbridge\fR is associated, e.g. the bridge's identifier in a
235virtualization management platform. The Open vSwitch database schema
236specifies well-known \fIkey\fR values, but \fIkey\fR and \fIvalue\fR
237are otherwise arbitrary strings.
238.IP
239If \fIvalue\fR is specified, then \fIkey\fR is set to \fIvalue\fR for
240\fIbridge\fR, overwriting any previous value. If \fIvalue\fR is
241omitted, then \fIkey\fR is removed from \fIbridge\fR's set of external
242IDs (if it was present).
e328faad
BP
243.IP
244For real bridges, the effect of this command is similar to that of a
245\fBset\fR or \fBremove\fR command in the \fBexternal\-ids\fR column of
246the \fBBridge\fR table. For fake bridges, it actually modifies keys
247with names prefixed by \fBfake\-bridge\-\fR in the \fBPort\fR table.
457e1eb0
BP
248.
249.IP "\fBbr\-get\-external\-id \fIbridge\fR [\fIkey\fR]"
250Queries the external IDs on \fIbridge\fR. If \fIkey\fR is specified,
251the output is the value for that \fIkey\fR or the empty string if
252\fIkey\fR is unset. If \fIkey\fR is omitted, the output is
253\fIkey\fB=\fIvalue\fR, one per line, for each key-value pair.
e328faad
BP
254.IP
255For real bridges, the effect of this command is similar to that of a
256\fBget\fR command in the \fBexternal\-ids\fR column of the
257\fBBridge\fR table. For fake bridges, it queries keys with names
258prefixed by \fBfake\-bridge\-\fR in the \fBPort\fR table.
457e1eb0 259.
3b135da3
BP
260.SS "Port Commands"
261.
262These commands examine and manipulate Open vSwitch ports. These
263commands treat a bonded port as a single entity.
264.
265.IP "\fBlist\-ports \fIbridge\fR"
266Lists all of the ports within \fIbridge\fR on standard output, one per
267line. The local port \fIbridge\fR is not included in the list.
268.
18b239f5 269.IP "[\fB\-\-may\-exist\fR] \fBadd\-port \fIbridge port \fR[\fIcolumn\fR[\fB:\fIkey\fR]\fR=\fIvalue\fR]\&...\fR"
3b135da3
BP
270Creates on \fIbridge\fR a new port named \fIport\fR from the network
271device of the same name.
bb1c67c8 272.IP
18b239f5
BP
273Optional arguments set values of column in the Port record created by
274the command. For example, \fBtag=9\fR would make the port an access
275port for VLAN 9. The syntax is the same as that for the \fBset\fR
276command (see \fBDatabase Commands\fR below).
277.IP
bb1c67c8 278Without \fB\-\-may\-exist\fR, attempting to create a port that exists
cefb3cc6
BP
279is an error. With \fB\-\-may\-exist\fR, this command does nothing if
280\fIport\fR already exists on \fIbridge\fR and is not a bonded port.
3b135da3 281.
18b239f5 282.IP "[\fB\-\-fake\-iface\fR] \fBadd\-bond \fIbridge port iface\fR\&... [\fIcolumn\fR[\fB:\fIkey\fR]\fR=\fIvalue\fR]\&...\fR"
3b135da3
BP
283Creates on \fIbridge\fR a new port named \fIport\fR that bonds
284together the network devices given as each \fIiface\fR. At least two
285interfaces must be named.
b4182c7f 286.IP
18b239f5
BP
287Optional arguments set values of column in the Port record created by
288the command. The syntax is the same as that for the \fBset\fR command
289(see \fBDatabase Commands\fR below).
290.IP
b4182c7f
JP
291With \fB\-\-fake\-iface\fR, a fake interface with the name \fIport\fR is
292created. This should only be used for compatibility with legacy
293software that requires it.
bb1c67c8
BP
294.IP
295Without \fB\-\-may\-exist\fR, attempting to create a port that exists
cefb3cc6
BP
296is an error. With \fB\-\-may\-exist\fR, this command does nothing if
297\fIport\fR already exists on \fIbridge\fR and bonds together exactly
298the specified interfaces.
3b135da3 299.
460aad80 300.IP "[\fB\-\-if\-exists\fR] \fBdel\-port \fR[\fIbridge\fR] \fIport\fR"
3d1b9636
BP
301Deletes \fIport\fR. If \fIbridge\fR is omitted, \fIport\fR is removed
302from whatever bridge contains it; if \fIbridge\fR is specified, it
303must be the real or fake bridge that contains \fIport\fR.
460aad80
BP
304.IP
305Without \fB\-\-if\-exists\fR, attempting to delete a port that does
306not exist is an error. With \fB\-\-if\-exists\fR, attempting to
307delete a port that does not exist has no effect.
3b135da3 308.
7c79588e
BP
309.IP "[\fB\-\-if\-exists\fR] \fB\-\-with\-iface del\-port \fR[\fIbridge\fR] \fIiface\fR"
310Deletes the port named \fIiface\fR or that has an interface named
311\fIiface\fR. If \fIbridge\fR is omitted, the port is removed from
312whatever bridge contains it; if \fIbridge\fR is specified, it must be
313the real or fake bridge that contains the port.
314.IP
315Without \fB\-\-if\-exists\fR, attempting to delete the port for an
316interface that does not exist is an error. With \fB\-\-if\-exists\fR,
317attempting to delete the port for an interface that does not exist has
318no effect.
319.
3b135da3
BP
320.IP "\fBport\-to\-br \fIport\fR"
321Prints the name of the bridge that contains \fIport\fR on standard
322output.
323.
324.SS "Interface Commands"
325.
326These commands examine the interfaces attached to an Open vSwitch
327bridge. These commands treat a bonded port as a collection of two or
328more interfaces, rather than as a single port.
329.
330.IP "\fBlist\-ifaces \fIbridge\fR"
331Lists all of the interfaces within \fIbridge\fR on standard output,
332one per line. The local port \fIbridge\fR is not included in the
333list.
334.
335.IP "\fBiface\-to\-br \fIiface\fR"
336Prints the name of the bridge that contains \fIiface\fR on standard
337output.
457e1eb0 338.
5aa00635
JP
339.SS "OpenFlow Controller Connectivity"
340.
341\fBovs\-vswitchd\fR can perform all configured bridging and switching
c0de82d9
JP
342locally, or it can be configured to communicate with one or more
343external OpenFlow controllers. The switch is typically configured to
344connect to a primary controller that takes charge of the bridge's flow
345table to implement a network policy. In addition, the switch can be
346configured to listen to connections from service controllers. Service
347controllers are typically used for occasional support and maintenance,
348e.g. with \fBovs\-ofctl\fR.
5aa00635 349.
1a048029 350.IP "\fBget\-controller\fR \fIbridge\fR"
5aa00635
JP
351Prints the configured controller target.
352.
1a048029 353.IP "\fBdel\-controller\fR \fIbridge\fR"
5aa00635
JP
354Deletes the configured controller target.
355.
1a048029
JP
356.IP "\fBset\-controller\fR \fIbridge\fR \fItarget\fR\&..."
357Sets the configured controller target or targets. Each \fItarget\fR may
358use any of the following forms:
5aa00635
JP
359.
360.RS
84ee7bcf 361.so lib/vconn-active.man
c0de82d9 362.so lib/vconn-passive.man
5aa00635 363.RE
84ee7bcf 364.
5aa00635 365.ST "Controller Failure Settings"
89365653 366.PP
5aa00635
JP
367When a controller is configured, it is, ordinarily, responsible for
368setting up all flows on the switch. Thus, if the connection to
369the controller fails, no new network connections can be set up. If
370the connection to the controller stays down long enough, no packets
371can pass through the switch at all.
63f08492 372.PP
5aa00635
JP
373If the value is \fBstandalone\fR, or if neither of these settings
374is set, \fBovs\-vswitchd\fR will take over
375responsibility for setting up
376flows when no message has been received from the controller for three
dd1dcc23 377times the inactivity probe interval. In this mode,
5aa00635
JP
378\fBovs\-vswitchd\fR causes the datapath to act like an ordinary
379MAC-learning switch. \fBovs\-vswitchd\fR will continue to retry connecting
380to the controller in the background and, when the connection succeeds,
381it discontinues its standalone behavior.
63f08492 382.PP
5aa00635
JP
383If this option is set to \fBsecure\fR, \fBovs\-vswitchd\fR will not
384set up flows on its own when the controller connection fails.
385.
1a048029 386.IP "\fBget\-fail\-mode\fR \fIbridge\fR"
5aa00635
JP
387Prints the configured failure mode.
388.
1a048029 389.IP "\fBdel\-fail\-mode\fR \fIbridge\fR"
5aa00635
JP
390Deletes the configured failure mode.
391.
1a048029 392.IP "\fBset\-fail\-mode\fR \fIbridge\fR \fBstandalone\fR|\fBsecure\fR"
5aa00635
JP
393Sets the configured failure mode.
394.
24b8b259
AE
395.SS "Manager Connectivity"
396.
289df16d
AE
397These commands manipulate the \fBmanager_options\fR column in the
398\fBOpen_vSwitch\fR table and rows in the \fBManagers\fR table. When
399\fBovsdb\-server\fR is configured to use the \fBmanager_options\fR column for
400OVSDB connections (as described in \fBINSTALL.Linux\fR and in the startup
401scripts provided with Open vSwitch), this allows the administrator to use
24b8b259
AE
402\fBovs\-vsctl\fR to configure database connections.
403.
404.IP "\fBget\-manager\fR"
405Prints the configured manager(s).
406.
407.IP "\fBdel\-manager\fR"
408Deletes the configured manager(s).
409.
410.IP "\fBset\-manager\fR \fItarget\fR\&..."
411Sets the configured manager target or targets. Each \fItarget\fR may
412use any of the following forms:
413.
414.RS
415.so ovsdb/remote-active.man
416.so ovsdb/remote-passive.man
417.RE
418.
dd8ac6fe
JP
419.SS "SSL Configuration"
420When \fBovs\-vswitchd\fR is configured to connect over SSL for management or
421controller connectivity, the following parameters are required:
422.TP
ae9a3235 423\fIprivate-key\fR
dd8ac6fe
JP
424Specifies a PEM file containing the private key used as the virtual
425switch's identity for SSL connections to the controller.
426.TP
ae9a3235 427\fIcertificate\fR
dd8ac6fe
JP
428Specifies a PEM file containing a certificate, signed by the
429certificate authority (CA) used by the controller and manager, that
430certifies the virtual switch's private key, identifying a trustworthy
431switch.
432.TP
ae9a3235 433\fIca-cert\fR
dd8ac6fe
JP
434Specifies a PEM file containing the CA certificate used to verify that
435the virtual switch is connected to a trustworthy controller.
436.PP
437These files are read only once, at \fBovs\-vswitchd\fR startup time. If
438their contents change, \fBovs\-vswitchd\fR must be killed and restarted.
439.PP
440These SSL settings apply to all SSL connections made by the virtual
441switch.
442.
443.IP "\fBget\-ssl\fR"
444Prints the SSL configuration.
445.
446.IP "\fBdel\-ssl\fR"
447Deletes the current SSL configuration.
448.
449.IP "[\fB\-\-bootstrap\fR] \fBset\-ssl\fR \fIprivate-key\fR \fIcertificate\fR \fIca-cert\fR"
450Sets the SSL configuration. The \fB\-\-bootstrap\fR option is described
451below.
452.
453.ST "CA Certificate Bootstrap"
89365653 454.PP
dd8ac6fe 455Ordinarily, all of the files named in the SSL configuration must exist
40a09c8a
BP
456when \fBovs\-vswitchd\fR starts. However, if the \fIca-cert\fR file
457does not exist and the \fB\-\-bootstrap\fR
dd8ac6fe
JP
458option is given, then \fBovs\-vswitchd\fR will attempt to obtain the
459CA certificate from the controller on its first SSL connection and
460save it to the named PEM file. If it is successful, it will
461immediately drop the connection and reconnect, and from then on all
462SSL connections must be authenticated by a certificate signed by the
463CA certificate thus obtained.
464.PP
465\fBThis option exposes the SSL connection to a man-in-the-middle
466attack obtaining the initial CA certificate\fR, but it may be useful
467for bootstrapping.
468.PP
469This option is only useful if the controller sends its CA certificate
470as part of the SSL certificate chain. The SSL protocol does not
1d5aaa61 471require the controller to send the CA certificate.
dd8ac6fe 472.
ad83bfa6
BP
473.SS "Database Commands"
474.
475These commands query and modify the contents of \fBovsdb\fR tables.
476They are a slight abstraction of the \fBovsdb\fR interface and as such
477they operate at a lower level than other \fBovs\-vsctl\fR commands.
478.PP
479.ST "Identifying Tables, Records, and Columns"
480.PP
481Each of these commands has a \fItable\fR parameter to identify a table
482within the database. Many of them also take a \fIrecord\fR parameter
483that identifies a particular record within a table. The \fIrecord\fR
484parameter may be the UUID for a record, and many tables offer
485additional ways to identify records. Some commands also take
486\fIcolumn\fR parameters that identify a particular field within the
487records in a table.
488.PP
489The following tables are currently defined:
490.IP "\fBOpen_vSwitch\fR"
491Global configuration for an \fBovs\-vswitchd\fR. This table contains
492exactly one record, identified by specifying \fB.\fR as the record
493name.
494.IP "\fBBridge\fR"
495Configuration for a bridge within an Open vSwitch. Records may be
496identified by bridge name.
497.IP "\fBPort\fR"
498A bridge port. Records may be identified by port name.
499.IP "\fBInterface\fR"
500A network device attached to a port. Records may be identified by
501name.
254750ce
BP
502.IP "\fBFlow_Table\fR"
503Configuration for a particular OpenFlow flow table. Records may be
504identified by name.
7b63fa03 505.IP "\fBQoS\fR"
c5f341ab
BP
506Quality-of-service configuration for a \fBPort\fR. Records may be
507identified by port name.
7b63fa03 508.IP "\fBQueue\fR"
c5f341ab
BP
509Configuration for one queue within a \fBQoS\fR configuration. Records
510may only be identified by UUID.
ef1e753e
BP
511.IP "\fBMirror\fR"
512A port mirroring configuration attached to a bridge. Records may be
513identified by mirror name.
ad83bfa6
BP
514.IP "\fBController\fR"
515Configuration for an OpenFlow controller. A controller attached to a
1a048029 516particular bridge may be identified by the bridge's name.
94db5407
BP
517.IP "\fBManager\fR"
518Configuration for an OVSDB connection. Records may be identified
519by target (e.g. \fBtcp:1.2.3.4\fR).
ad83bfa6
BP
520.IP "\fBNetFlow\fR"
521A NetFlow configuration attached to a bridge. Records may be
ef1e753e
BP
522identified by bridge name.
523.IP "\fBSSL\fR"
524The global SSL configuration for \fBovs\-vswitchd\fR. The record
525attached to the \fBOpen_vSwitch\fR table may be identified by
526specifying \fB.\fR as the record name.
527.IP "\fBsFlow\fR"
29089a54 528An sFlow exporter configuration attached to a bridge. Records may be
ad83bfa6 529identified by bridge name.
29089a54
RL
530.IP "\fBIPFIX\fR"
531An IPFIX exporter configuration attached to a bridge. Records may be
532identified by bridge name.
533.IP "\fBFlow_Sample_Collector_Set\fR"
534An IPFIX exporter configuration attached to a bridge for sampling
535packets on a per-flow basis using OpenFlow \fBsample\fR actions.
ad83bfa6 536.PP
e111e681
BP
537Record names must be specified in full and with correct
538capitalization. Names of tables and columns are not case-sensitive,
539and \fB\-\-\fR and \fB_\fR are treated interchangeably. Unique
5de48440 540abbreviations are acceptable, e.g. \fBnet\fR or \fBn\fR is sufficient
ad83bfa6
BP
541to identify the \fBNetFlow\fR table.
542.
543.ST "Database Values"
89365653 544.PP
ad83bfa6
BP
545Each column in the database accepts a fixed type of data. The
546currently defined basic types, and their representations, are:
547.IP "integer"
548A decimal integer in the range \-2**63 to 2**63\-1, inclusive.
549.IP "real"
550A floating-point number.
551.IP "Boolean"
552True or false, written \fBtrue\fR or \fBfalse\fR, respectively.
553.IP "string"
554An arbitrary Unicode string, except that null bytes are not allowed.
555Quotes are optional for most strings that begin with an English letter
556or underscore and consist only of letters, underscores, hyphens, and
557periods. However, \fBtrue\fR and \fBfalse\fR and strings that match
558the syntax of UUIDs (see below) must be enclosed in double quotes to
559distinguish them from other basic types. When double quotes are used,
560the syntax is that of strings in JSON, e.g. backslashes may be used to
561escape special characters. The empty string must be represented as a
562pair of double quotes (\fB""\fR).
563.IP "UUID"
ce5a3e38
BP
564Either a universally unique identifier in the style of RFC 4122,
565e.g. \fBf81d4fae\-7dec\-11d0\-a765\-00a0c91e6bf6\fR, or an \fB@\fIname\fR
aed133bf 566defined by a \fBget\fR or \fBcreate\fR command within the same \fBovs\-vsctl\fR
ce5a3e38 567invocation.
ad83bfa6
BP
568.PP
569Multiple values in a single column may be separated by spaces or a
570single comma. When multiple values are present, duplicates are not
571allowed, and order is not important. Conversely, some database
572columns can have an empty set of values, represented as \fB[]\fR, and
573square brackets may optionally enclose other non-empty sets or single
574values as well.
575.PP
576A few database columns are ``maps'' of key-value pairs, where the key
577and the value are each some fixed database type. These are specified
578in the form \fIkey\fB=\fIvalue\fR, where \fIkey\fR and \fIvalue\fR
579follow the syntax for the column's key type and value type,
580respectively. When multiple pairs are present (separated by spaces or
581a comma), duplicate keys are not allowed, and again the order is not
582important. Duplicate values are allowed. An empty map is represented
424202bc
BP
583as \fB{}\fR. Curly braces may optionally enclose non-empty maps as
584well (but use quotes to prevent the shell from expanding
585\fBother-config={0=x,1=y}\fR into \fBother-config=0=x
586other-config=1=y\fR, which may not have the desired effect).
ad83bfa6
BP
587.
588.ST "Database Command Syntax"
e99d41f7
BP
589.
590.IP "[\fB\-\-if\-exists\fR] [\fB\-\-columns=\fIcolumn\fR[\fB,\fIcolumn\fR]...] \fBlist \fItable \fR[\fIrecord\fR]..."
9591fefe 591Lists the data in each specified \fIrecord\fR. If no
ad83bfa6 592records are specified, lists all the records in \fItable\fR.
3ef917b5 593.IP
9591fefe
BP
594If \fB\-\-columns\fR is specified, only the requested columns are
595listed, in the specified order. Otherwise, all columns are listed, in
596alphabetical order by column name.
e99d41f7
BP
597.IP
598Without \fB\-\-if-exists\fR, it is an error if any specified
599\fIrecord\fR does not exist. With \fB\-\-if-exists\fR, the command
600ignores any \fIrecord\fR that does not exist, without producing any
601output.
9591fefe 602.
0a140468
BP
603.IP "[\fB\-\-columns=\fIcolumn\fR[\fB,\fIcolumn\fR]...] \fBfind \fItable \fR[\fIcolumn\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR]..."
604Lists the data in each record in \fItable\fR whose \fIcolumn\fR equals
605\fIvalue\fR or, if \fIkey\fR is specified, whose \fIcolumn\fR contains
2a9537e2
BP
606a \fIkey\fR with the specified \fIvalue\fR. The following operators
607may be used where \fB=\fR is written in the syntax summary:
608.RS
609.IP "\fB= != < > <= >=\fR"
610Selects records in which \fIcolumn\fR[\fB:\fIkey\fR] equals, does not
611equal, is less than, is greater than, is less than or equal to, or is
612greater than or equal to \fIvalue\fR, respectively.
613.IP
614Consider \fIcolumn\fR[\fB:\fIkey\fR] and \fIvalue\fR as sets of
615elements. Identical sets are considered equal. Otherwise, if the
616sets have different numbers of elements, then the set with more
617elements is considered to be larger. Otherwise, consider a element
618from each set pairwise, in increasing order within each set. The
619first pair that differs determines the result. (For a column that
620contains key-value pairs, first all the keys are compared, and values
621are considered only if the two sets contain identical keys.)
622.IP "\fB{=} {!=}\fR"
623Test for set equality or inequality, respectively.
624.IP "\fB{<=}\fR"
625Selects records in which \fIcolumn\fR[\fB:\fIkey\fR] is a subset of
626\fIvalue\fR. For example, \fBflood-vlans{<=}1,2\fR selects records in
627which the \fBflood-vlans\fR column is the empty set or contains 1 or 2
628or both.
629.IP "\fB{<}\fR"
630Selects records in which \fIcolumn\fR[\fB:\fIkey\fR] is a proper
631subset of \fIvalue\fR. For example, \fBflood-vlans{<}1,2\fR selects
632records in which the \fBflood-vlans\fR column is the empty set or
633contains 1 or 2 but not both.
634.IP "\fB{>=} {>}\fR"
635Same as \fB{<=}\fR and \fB{<}\fR, respectively, except that the
636relationship is reversed. For example, \fBflood-vlans{>=}1,2\fR
637selects records in which the \fBflood-vlans\fR column contains both 1
638and 2.
639.RE
640.IP
641For arithmetic operators (\fB= != < > <= >=\fR), when \fIkey\fR is
642specified but a particular record's \fIcolumn\fR does not contain
643\fIkey\fR, the record is always omitted from the results. Thus, the
644condition \fBother-config:mtu!=1500\fR matches records that have a
645\fBmtu\fR key whose value is not 1500, but not those that lack an
646\fBmtu\fR key.
647.IP
648For the set operators, when \fIkey\fR is specified but a particular
649record's \fIcolumn\fR does not contain \fIkey\fR, the comparison is
650done against an empty set. Thus, the condition
651\fBother-config:mtu{!=}1500\fR matches records that have a \fBmtu\fR
652key whose value is not 1500 and those that lack an \fBmtu\fR key.
653.IP
654Don't forget to escape \fB<\fR or \fB>\fR from interpretation by the
655shell.
0a140468
BP
656.IP
657If \fB\-\-columns\fR is specified, only the requested columns are
658listed, in the specified order. Otherwise all columns are listed, in
659alphabetical order by column name.
9591fefe 660.IP
3ef917b5
BP
661The UUIDs shown for rows created in the same \fBovs\-vsctl\fR
662invocation will be wrong.
ad83bfa6 663.
e99d41f7 664.IP "[\fB\-\-if\-exists\fR] [\fB\-\-id=@\fIname\fR] \fBget \fItable record \fR[\fIcolumn\fR[\fB:\fIkey\fR]]..."
ad83bfa6
BP
665Prints the value of each specified \fIcolumn\fR in the given
666\fIrecord\fR in \fItable\fR. For map columns, a \fIkey\fR may
667optionally be specified, in which case the value associated with
668\fIkey\fR in the column is printed, instead of the entire map.
870aeb4a 669.IP
e99d41f7
BP
670Without \fB\-\-if\-exists\fR, it is an error if \fIrecord\fR does not
671exist or \fIkey\fR is specified, if \fIkey\fR does not exist in
672\fIrecord\fR. With \fB\-\-if\-exists\fR, a missing \fIrecord\fR
673yields no output and a missing \fIkey\fR prints a blank line.
aed133bf
BP
674.IP
675If \fB@\fIname\fR is specified, then the UUID for \fIrecord\fR may be
676referred to by that name later in the same \fBovs\-vsctl\fR
677invocation in contexts where a UUID is expected.
6d5abe94
BP
678.IP
679Both \fB\-\-id\fR and the \fIcolumn\fR arguments are optional, but
680usually at least one or the other should be specified. If both are
681omitted, then \fBget\fR has no effect except to verify that
682\fIrecord\fR exists in \fItable\fR.
e99d41f7
BP
683.IP
684\fB\-\-id\fR and \fB\-\-if\-exists\fR cannot be used together.
ad83bfa6 685.
e99d41f7 686.IP "[\fB\-\-if\-exists\fR] \fBset \fItable record column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
ad83bfa6
BP
687Sets the value of each specified \fIcolumn\fR in the given
688\fIrecord\fR in \fItable\fR to \fIvalue\fR. For map columns, a
689\fIkey\fR may optionally be specified, in which case the value
690associated with \fIkey\fR in that column is changed (or added, if none
691exists), instead of the entire map.
e99d41f7
BP
692.IP
693Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
694exist. With \fB\-\-if-exists\fR, this command does nothing if
695\fIrecord\fR does not exist.
ad83bfa6 696.
e99d41f7 697.IP "[\fB\-\-if\-exists\fR] \fBadd \fItable record column \fR[\fIkey\fB=\fR]\fIvalue\fR..."
ad83bfa6
BP
698Adds the specified value or key-value pair to \fIcolumn\fR in
699\fIrecord\fR in \fItable\fR. If \fIcolumn\fR is a map, then \fIkey\fR
700is required, otherwise it is prohibited. If \fIkey\fR already exists
701in a map column, then the current \fIvalue\fR is not replaced (use the
702\fBset\fR command to replace an existing value).
e99d41f7
BP
703.IP
704Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
705exist. With \fB\-\-if-exists\fR, this command does nothing if
706\fIrecord\fR does not exist.
90c4bd00 707.
e99d41f7
BP
708.IP "[\fB\-\-if\-exists\fR] \fBremove \fItable record column \fR\fIvalue\fR..."
709.IQ "[\fB\-\-if\-exists\fR] \fBremove \fItable record column \fR\fIkey\fR..."
710.IQ "[\fB\-\-if\-exists\fR] \fBremove \fItable record column \fR\fIkey\fB=\fR\fIvalue\fR..."
90c4bd00
BP
711Removes the specified values or key-value pairs from \fIcolumn\fR in
712\fIrecord\fR in \fItable\fR. The first form applies to columns that
713are not maps: each specified \fIvalue\fR is removed from the column.
714The second and third forms apply to map columns: if only a \fIkey\fR
715is specified, then any key-value pair with the given \fIkey\fR is
716removed, regardless of its value; if a \fIvalue\fR is given then a
717pair is removed only if both key and value match.
718.IP
719It is not an error if the column does not contain the specified key or
720value or pair.
e99d41f7
BP
721.IP
722Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
723exist. With \fB\-\-if-exists\fR, this command does nothing if
724\fIrecord\fR does not exist.
90c4bd00 725.
e99d41f7 726.IP "[\fB\-\-if\-exists\fR] \fBclear\fR \fItable record column\fR..."
90c4bd00
BP
727Sets each \fIcolumn\fR in \fIrecord\fR in \fItable\fR to the empty set
728or empty map, as appropriate. This command applies only to columns
729that are allowed to be empty.
e99d41f7
BP
730.IP
731Without \fB\-\-if-exists\fR, it is an error if \fIrecord\fR does not
732exist. With \fB\-\-if-exists\fR, this command does nothing if
733\fIrecord\fR does not exist.
90c4bd00 734.
4e312e69 735.IP "[\fB\-\-id=@\fIname\fR] \fBcreate\fR \fItable column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
557e3718
BP
736Creates a new record in \fItable\fR and sets the initial values of
737each \fIcolumn\fR. Columns not explicitly set will receive their
3ef917b5 738default values. Outputs the UUID of the new row.
ce5a3e38
BP
739.IP
740If \fB@\fIname\fR is specified, then the UUID for the new row may be
741referred to by that name elsewhere in the same \fBovs\-vsctl\fR
742invocation in contexts where a UUID is expected. Such references may
743precede or follow the \fBcreate\fR command.
c5f341ab
BP
744.IP
745Records in the Open vSwitch database are significant only when they
746can be reached directly or indirectly from the \fBOpen_vSwitch\fR
747table. Except for records in the \fBQoS\fR or \fBQueue\fR tables,
748records that are not reachable from the \fBOpen_vSwitch\fR table are
749automatically deleted from the database. This deletion happens
750immediately, without waiting for additional \fBovs\-vsctl\fR commands
751or other database activity. Thus, a \fBcreate\fR command must
752generally be accompanied by additional commands \fIwithin the same
753\fBovs\-vsctl\fI invocation\fR to add a chain of references to the
754newly created record from the top-level \fBOpen_vSwitch\fR record.
755The \fBEXAMPLES\fR section gives some examples that show how to do
756this.
b7f74b6f 757.
0d0f05b9 758.IP "\fR[\fB\-\-if\-exists\fR] \fBdestroy \fItable record\fR..."
b7f74b6f
BP
759Deletes each specified \fIrecord\fR from \fItable\fR. Unless
760\fB\-\-if\-exists\fR is specified, each \fIrecord\fRs must exist.
eeb8467e
AS
761.IP "\fB\-\-all destroy \fItable\fR"
762Deletes all records from the \fItable\fR.
c5f341ab 763.IP
dcd1dbc5
BP
764The \fBdestroy\fR command is only useful for records in the \fBQoS\fR
765or \fBQueue\fR tables. Records in other tables are automatically
766deleted from the database when they become unreachable from the
767\fBOpen_vSwitch\fR table. This means that deleting the last reference
768to a record is sufficient for deleting the record itself. For records
769in these tables, \fBdestroy\fR is silently ignored. See the
770\fBEXAMPLES\fR section below for more information.
7db03f7c
BP
771.
772.IP "\fBwait\-until \fItable record \fR[\fIcolumn\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR]..."
773Waits until \fItable\fR contains a record named \fIrecord\fR whose
774\fIcolumn\fR equals \fIvalue\fR or, if \fIkey\fR is specified, whose
775\fIcolumn\fR contains a \fIkey\fR with the specified \fIvalue\fR. Any
776of the operators \fB!=\fR, \fB<\fR, \fB>\fR, \fB<=\fR, or \fB>=\fR may
777be substituted for \fB=\fR to test for inequality, less than, greater
778than, less than or equal to, or greater than or equal to,
779respectively. (Don't forget to escape \fB<\fR or \fB>\fR from
780interpretation by the shell.)
781.IP
782If no \fIcolumn\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR arguments are given,
783this command waits only until \fIrecord\fR exists. If more than one
784such argument is given, the command waits until all of them are
785satisfied.
786.IP
787Usually \fBwait\-until\fR should be placed at the beginning of a set
788of \fBovs\-vsctl\fR commands. For example, \fBwait\-until bridge br0
789\-\- get bridge br0 datapath_id\fR waits until a bridge named
790\fBbr0\fR is created, then prints its \fBdatapath_id\fR column,
791whereas \fBget bridge br0 datapath_id \-\- wait\-until bridge br0\fR
792will abort if no bridge named \fBbr0\fR exists when \fBovs\-vsctl\fR
793initially connects to the database.
794.IP
7db03f7c
BP
795Consider specifying \fB\-\-timeout=0\fR along with
796\fB\-\-wait\-until\fR, to prevent \fBovs\-vsctl\fR from terminating
797after waiting only at most 5 seconds.
ffd66ea9
BP
798.IP "\fBcomment \fR[\fIarg\fR]..."
799This command has no effect on behavior, but any database log record
800created by the command will include the command and its arguments.
4d14e30f
BP
801.SH "EXAMPLES"
802Create a new bridge named br0 and add port eth0 to it:
803.IP
4e312e69 804.B "ovs\-vsctl add\-br br0"
4d14e30f 805.br
4e312e69 806.B "ovs\-vsctl add\-port br0 eth0"
4d14e30f
BP
807.PP
808Alternatively, perform both operations in a single atomic transaction:
809.IP
4e312e69 810.B "ovs\-vsctl add\-br br0 \-\- add\-port br0 eth0"
460aad80
BP
811.PP
812Delete bridge \fBbr0\fR, reporting an error if it does not exist:
813.IP
814.B "ovs\-vsctl del\-br br0"
815.PP
401d5a6d 816Delete bridge \fBbr0\fR if it exists:
460aad80 817.IP
401d5a6d 818.B "ovs\-vsctl \-\-if\-exists del\-br br0"
ce5a3e38
BP
819.PP
820Set the \fBqos\fR column of the \fBPort\fR record for \fBeth0\fR to
821point to a new \fBQoS\fR record, which in turn points with its queue 0
822to a new \fBQueue\fR record:
823.IP
4e312e69 824.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
825.SH "CONFIGURATION COOKBOOK"
826.SS "Port Configuration"
827.PP
828Add an ``internal port'' \fBvlan10\fR to bridge \fBbr0\fR as a VLAN
829access port for VLAN 10, and configure it with an IP address:
830.IP
831.B "ovs\-vsctl add\-port br0 vlan10 tag=10 \-\- set Interface vlan10 type=internal"
832.IP
833.B "ifconfig vlan10 192.168.0.123"
3b135da3 834.
19a79607
BP
835.PP
836Add a GRE tunnel port \fBgre0\fR to remote IP address 1.2.3.4 to
837bridge \fBbr0\fR:
838.IP
839.B "ovs\-vsctl add\-port br0 gre0 \-\- set Interface gre0 type=gre options:remote_ip=1.2.3.4"
840.
bad973d7
BP
841.SS "Port Mirroring"
842.PP
843Mirror all packets received or sent on \fBeth0\fR or \fBeth1\fR onto
844\fBeth2\fR, assuming that all of those ports exist on bridge \fBbr0\fR
845(as a side-effect this causes any packets received on \fBeth2\fR to be
846ignored):
847.IP
848.B "ovs\-vsctl \-\- set Bridge br0 mirrors=@m \(rs"
849.IP
850.B "\-\- \-\-id=@eth0 get Port eth0 \(rs"
851.IP
852.B "\-\- \-\-id=@eth1 get Port eth1 \(rs"
853.IP
854.B "\-\- \-\-id=@eth2 get Port eth2 \(rs"
855.IP
856.B "\-\- \-\-id=@m create Mirror name=mymirror select-dst-port=@eth0,@eth1 select-src-port=@eth0,@eth1 output-port=@eth2"
857.PP
c5f341ab
BP
858Remove the mirror created above from \fBbr0\fR, which also destroys
859the Mirror record (since it is now unreferenced):
bad973d7 860.IP
9d2e7445
BP
861.B "ovs\-vsctl \-\- \-\-id=@rec get Mirror mymirror \(rs"
862.IP
863.B "\-\- remove Bridge br0 mirrors @rec"
864.PP
865The following simpler command also works:
866.IP
867.B "ovs\-vsctl clear Bridge br0 mirrors"
bad973d7
BP
868.SS "Quality of Service (QoS)"
869.PP
870Create a \fBlinux\-htb\fR QoS record that points to a few queues and
871use it on \fBeth0\fR and \fBeth1\fR:
872.IP
873.B "ovs\-vsctl \-\- set Port eth0 qos=@newqos \(rs"
874.IP
875.B "\-\- set Port eth1 qos=@newqos \(rs"
876.IP
877.B "\-\- \-\-id=@newqos create QoS type=linux\-htb other\-config:max\-rate=1000000000 queues=0=@q0,1=@q1 \(rs"
878.IP
879.B "\-\- \-\-id=@q0 create Queue other\-config:min\-rate=100000000 other\-config:max\-rate=100000000 \(rs"
880.IP
881.B "\-\- \-\-id=@q1 create Queue other\-config:min\-rate=500000000"
882.PP
883Deconfigure the QoS record above from \fBeth1\fR only:
884.IP
885.B "ovs\-vsctl clear Port eth1 qos"
886.PP
887To deconfigure the QoS record from both \fBeth0\fR and \fBeth1\fR and
c5f341ab
BP
888then delete the QoS record (which must be done explicitly because
889unreferenced QoS records are not automatically destroyed):
bad973d7
BP
890.IP
891.B "ovs\-vsctl \-\- destroy QoS eth0 \-\- clear Port eth0 qos \-\- clear Port eth1 qos"
892.PP
893(This command will leave two unreferenced Queue records in the
894database. To delete them, use "\fBovs\-vsctl list Queue\fR" to find
895their UUIDs, then "\fBovs\-vsctl destroy Queue \fIuuid1\fR
eeb8467e
AS
896\fIuuid2\fR" to destroy each of them or use
897"\fBovs\-vsctl -- --all destroy Queue\fR" to delete all records.)
b31bcf60
EJ
898.SS "Connectivity Monitoring"
899.PP
93b8df38 900Monitor connectivity to a remote maintenance point on eth0.
b31bcf60 901.IP
a6e198ea 902.B "ovs\-vsctl set Interface eth0 cfm_mpid=1"
b31bcf60 903.PP
93b8df38 904Deconfigure connectivity monitoring from above:
b31bcf60 905.IP
a6e198ea 906.B "ovs\-vsctl clear Interface eth0 cfm_mpid"
bad973d7
BP
907.SS "NetFlow"
908.PP
909Configure bridge \fBbr0\fR to send NetFlow records to UDP port 5566 on
910host 192.168.0.34, with an active timeout of 30 seconds:
911.IP
912.B "ovs\-vsctl \-\- set Bridge br0 netflow=@nf \(rs"
913.IP
914.B "\-\- \-\-id=@nf create NetFlow targets=\(rs\(dq192.168.0.34:5566\(rs\(dq active\-timeout=30"
915.PP
916Update the NetFlow configuration created by the previous command to
917instead use an active timeout of 60 seconds:
918.IP
919.B "ovs\-vsctl set NetFlow br0 active_timeout=60"
920.PP
c5f341ab
BP
921Deconfigure the NetFlow settings from \fBbr0\fR, which also destroys
922the NetFlow record (since it is now unreferenced):
bad973d7 923.IP
c5f341ab 924.B "ovs\-vsctl clear Bridge br0 netflow"
bad973d7
BP
925.SS "sFlow"
926.PP
927Configure bridge \fBbr0\fR to send sFlow records to a collector on
92810.0.0.1 at port 6343, using \fBeth1\fR\'s IP address as the source,
929with specific sampling parameters:
930.IP
931.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"
932.IP
933.B "\-\- set Bridge br0 sflow=@s"
934.PP
f0f87cbd 935Deconfigure sFlow from \fBbr0\fR, which also destroys the sFlow record
c5f341ab 936(since it is now unreferenced):
bad973d7 937.IP
c5f341ab 938.B "ovs\-vsctl \-\- clear Bridge br0 sflow"
29089a54
RL
939.SS "IPFIX"
940.PP
941Configure bridge \fBbr0\fR to send one IPFIX flow record per packet
942sample to UDP port 4739 on host 192.168.0.34, with Observation Domain
978427a5 943ID 123 and Observation Point ID 456, a flow cache active timeout of 1
8b7ea2d4
WZ
944minute (60 seconds), maximum flow cache size of 13 flows, and flows
945sampled on output port with tunnel info(sampling on input and output
946port is enabled by default if not disabled) :
29089a54
RL
947.IP
948.B "ovs\-vsctl \-\- set Bridge br0 ipfix=@i \(rs"
949.IP
8b7ea2d4
WZ
950.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 \(rs"
951.IP
952.B "other_config:enable-input-sampling=false other_config:enable-tunnel-sampling=true"
29089a54
RL
953.PP
954Deconfigure the IPFIX settings from \fBbr0\fR, which also destroys the
955IPFIX record (since it is now unreferenced):
956.IP
957.B "ovs\-vsctl clear Bridge br0 ipfix"
21f7563c
JP
958.SS "802.1D Spanning Tree Protocol (STP)"
959.PP
960Configure bridge \fBbr0\fR to participate in an 802.1D spanning tree:
961.IP
962.B "ovs\-vsctl set Bridge br0 stp_enable=true"
963.PP
964Set the bridge priority of \fBbr0\fR to 0x7800:
965.IP
966.B "ovs\-vsctl set Bridge br0 other_config:stp-priority=0x7800"
967.PP
968Set the path cost of port \fBeth0\fR to 10:
969.IP
970.B "ovs\-vsctl set Port eth0 other_config:stp-path-cost=10"
971.PP
972Deconfigure STP from above:
973.IP
69630ea0 974.B "ovs\-vsctl set Bridge br0 stp_enable=false"
21f7563c 975.PP
dc2b70ba
FL
976.SS "Multicast Snooping"
977.PP
978Configure bridge \fBbr0\fR to enable multicast snooping:
979.IP
980.B "ovs\-vsctl set Bridge br0 mcast_snooping_enable=true"
981.PP
982Set the multicast snooping aging time \fBbr0\fR to 300 seconds:
983.IP
984.B "ovs\-vsctl set Bridge br0 other_config:mcast-snooping-aging-time=300"
985.PP
986Set the multicast snooping table size \fBbr0\fR to 2048 entries:
987.IP
988.B "ovs\-vsctl set Bridge br0 other_config:mcast-snooping-table-size=2048"
989.PP
990Disable flooding of unregistered multicast packets to all ports. When
67e8c1ac
JR
991set to \fBtrue\fR, the switch will send unregistered multicast packets only
992to ports connected to multicast routers. When it is set to \fBfalse\fR, the
dc2b70ba
FL
993switch will send them to all ports. This command disables the flood of
994unregistered packets on bridge \fBbr0\fR.
995.IP
996.B "ovs\-vsctl set Bridge br0 other_config:mcast-snooping-disable-flood-unregistered=true"
997.PP
8e04a33f 998Enable flooding of multicast packets (except Reports) on a specific port.
dc2b70ba
FL
999.IP
1000.B "ovs\-vsctl set Port eth1 other_config:mcast-snooping-flood=true"
1001.PP
8e04a33f
FL
1002Enable flooding of Reports on a specific port.
1003.IP
1004.B "ovs\-vsctl set Port eth1 other_config:mcast-snooping-flood-reports=true"
1005.PP
dc2b70ba
FL
1006Deconfigure multicasting snooping from above:
1007.IP
1008.B "ovs\-vsctl set Bridge br0 mcast_snooping_enable=false"
1009.PP
9efd308e
DV
1010.SS "802.1D-2004 Rapid Spanning Tree Protocol (RSTP)"
1011.PP
1012Configure bridge \fBbr0\fR to participate in an 802.1D-2004 Rapid Spanning Tree:
1013.IP
1014.B "ovs\-vsctl set Bridge br0 rstp_enable=true"
1015.PP
1016Set the bridge address of \fBbr0\fR to 00:aa:aa:aa:aa:aa :
1017.IP
1018.B "ovs\-vsctl set Bridge br0 other_config:rstp-address=00:aa:aa:aa:aa:aa"
1019.PP
1020Set the bridge priority of \fBbr0\fR to 0x7000. The value must be specified in
1021decimal notation and should be a multiple of 4096 (if not, it is rounded down to
1022the nearest multiple of 4096). The default priority value is 0x800 (32768).
1023.IP
1024.B "ovs\-vsctl set Bridge br0 other_config:rstp-priority=28672"
1025.PP
1026Set the bridge ageing time of \fBbr0\fR to 1000 s. The ageing time value should be
1027between 10 s and 1000000 s. The default value is 300 s.
1028.IP
1029.B "ovs\-vsctl set Bridge br0 other_config:rstp-ageing-time=1000"
1030.PP
1031Set the bridge force protocol version of \fBbr0\fR to 0. The force protocol version
1032has two acceptable values: 0 (STP compatibility mode) and 2 (normal operation).
1033.IP
1034.B "ovs\-vsctl set Bridge br0 other_config:rstp-force-protocol-version=0"
1035.PP
1036Set the bridge max age of \fBbr0\fR to 10 s. The max age value should be between 6 s
1037and 40 s. The default value is 20 s.
1038.IP
1039.B "ovs\-vsctl set Bridge br0 other_config:rstp-max-age=10"
1040.PP
1041Set the bridge forward delay of \fBbr0\fR to 15 s.
1042This value should be between 4 s and 30 s. The default value is 15 s.
1043.IP
1044.B "ovs\-vsctl set Bridge br0 other_config:rstp-forward-delay=15"
1045.PP
1046Set the bridge transmit hold count of \fBbr0\fR to 7 s. This value should be between
10471 s and 10 s. The default value is 6 s.
1048.IP
1049.B "ovs\-vsctl set Bridge br0 other_config:rstp-transmit-hold-count=7"
1050.PP
67e8c1ac 1051Enable RSTP on the Port \fBeth0\fR:
9efd308e
DV
1052.IP
1053.B "ovs\-vsctl set Port eth0 other_config:rstp-enable=true"
1054.PP
67e8c1ac 1055Disable RSTP on the Port \fBeth0\fR:
9efd308e
DV
1056.IP
1057.B "ovs\-vsctl set Port eth0 other_config:rstp-enable=false"
1058.PP
67e8c1ac 1059Set the priority of port \fBeth0\fR to 32. The value must be specified in
9efd308e
DV
1060decimal notation and should be a multiple of 16 (if not, it is rounded down to the
1061nearest multiple of 16). The default priority value is 0x80 (128).
1062.IP
1063.B "ovs\-vsctl set Port eth0 other_config:rstp-port-priority=32"
1064.PP
1065Set the port number of port \fBeth0\fR to 3:
1066.IP
1067.B "ovs\-vsctl set Port eth0 other_config:rstp-port-num=3"
1068.PP
1069Set the path cost of port \fBeth0\fR to 150:
1070.IP
1071.B "ovs\-vsctl set Port eth0 other_config:rstp-path-cost=150"
1072.PP
1073Set the admin edge value of port \fBeth0\fR:
1074.IP
1075.B "ovs\-vsctl set Port eth0 other_config:rstp-port-admin-edge=true"
1076.PP
1077Set the auto edge value of port \fBeth0\fR:
1078.IP
1079.B "ovs\-vsctl set Port eth0 other_config:rstp-port-auto-edge=true"
1080.PP
9abdfbef
DV
1081Set the admin point to point MAC value of port \fBeth0\fR. Acceptable
1082values are \fB0\fR (not point-to-point), \fB1\fR (point-to-point, the
1083default value) or \fB2\fR (automatic detection). The auto-detection
1084mode is not currently implemented, and the value \fB2\fR has the same
1085effect of \fB0\fR (not point-to-point).
67e8c1ac
JR
1086.IP
1087.B "ovs\-vsctl set Port eth0 other_config:rstp-admin-p2p-mac=1"
1088.PP
1089Set the admin port state value of port \fBeth0\fR. \fBtrue\fR is the
1090default value.
1091.IP
1092.B "ovs\-vsctl set Port eth0 other_config:rstp-admin-port-state=false"
1093.PP
9efd308e
DV
1094Set the mcheck value of port \fBeth0\fR:
1095.IP
1096.B "ovs\-vsctl set Port eth0 other_config:rstp-port-mcheck=true"
1097.PP
1098Deconfigure RSTP from above:
1099.IP
1100.B "ovs\-vsctl set Bridge br0 rstp_enable=false"
1101.PP
bb8a54f3
IY
1102.SS "OpenFlow Version"
1103.PP
1104Configure bridge \fBbr0\fR to support OpenFlow versions 1.0, 1.2, and
11051.3:
1106.IP
cccc12cc 1107.B "ovs\-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow12,OpenFlow13"
bb8a54f3 1108.
fe5c0d6b
BP
1109.SS "Flow Table Configuration"
1110Limit flow table 0 on bridge br0 to a maximum of 100 flows:
1111.IP
1112.B "ovs\-vsctl \-\- \-\-id=@ft create Flow_Table flow_limit=100 overflow_policy=refuse \-\- set Bridge br0 flow_tables=0=@ft"
3b135da3
BP
1113.SH "EXIT STATUS"
1114.IP "0"
1115Successful program execution.
1116.IP "1"
1117Usage, syntax, or configuration file error.
1118.IP "2"
1119The \fIbridge\fR argument to \fBbr\-exists\fR specified the name of a
1120bridge that does not exist.
1121.SH "SEE ALSO"
1122.
dfbe07ba 1123.BR ovsdb\-server (1),
5aa75474
BP
1124.BR ovs\-vswitchd (8),
1125.BR ovs\-vswitchd.conf.db (5).