]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-vsctl.8.in
ofproto: Add pipeline fields support for OF 1.5 packet-out
[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
898dcef1 91reconfigure itself according to the modified database. This
dfbe07ba 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
77c180ce
BM
285interfaces must be named. If the interfaces are DPDK enabled then
286the transaction will need to include operations to explicitly set the
287interface type to 'dpdk'.
b4182c7f 288.IP
18b239f5
BP
289Optional arguments set values of column in the Port record created by
290the command. The syntax is the same as that for the \fBset\fR command
291(see \fBDatabase Commands\fR below).
292.IP
b4182c7f
JP
293With \fB\-\-fake\-iface\fR, a fake interface with the name \fIport\fR is
294created. This should only be used for compatibility with legacy
295software that requires it.
bb1c67c8
BP
296.IP
297Without \fB\-\-may\-exist\fR, attempting to create a port that exists
cefb3cc6
BP
298is an error. With \fB\-\-may\-exist\fR, this command does nothing if
299\fIport\fR already exists on \fIbridge\fR and bonds together exactly
300the specified interfaces.
3b135da3 301.
460aad80 302.IP "[\fB\-\-if\-exists\fR] \fBdel\-port \fR[\fIbridge\fR] \fIport\fR"
3d1b9636
BP
303Deletes \fIport\fR. If \fIbridge\fR is omitted, \fIport\fR is removed
304from whatever bridge contains it; if \fIbridge\fR is specified, it
305must be the real or fake bridge that contains \fIport\fR.
460aad80
BP
306.IP
307Without \fB\-\-if\-exists\fR, attempting to delete a port that does
308not exist is an error. With \fB\-\-if\-exists\fR, attempting to
309delete a port that does not exist has no effect.
3b135da3 310.
7c79588e
BP
311.IP "[\fB\-\-if\-exists\fR] \fB\-\-with\-iface del\-port \fR[\fIbridge\fR] \fIiface\fR"
312Deletes the port named \fIiface\fR or that has an interface named
313\fIiface\fR. If \fIbridge\fR is omitted, the port is removed from
314whatever bridge contains it; if \fIbridge\fR is specified, it must be
315the real or fake bridge that contains the port.
316.IP
317Without \fB\-\-if\-exists\fR, attempting to delete the port for an
318interface that does not exist is an error. With \fB\-\-if\-exists\fR,
319attempting to delete the port for an interface that does not exist has
320no effect.
321.
3b135da3
BP
322.IP "\fBport\-to\-br \fIport\fR"
323Prints the name of the bridge that contains \fIport\fR on standard
324output.
325.
326.SS "Interface Commands"
327.
328These commands examine the interfaces attached to an Open vSwitch
329bridge. These commands treat a bonded port as a collection of two or
330more interfaces, rather than as a single port.
331.
332.IP "\fBlist\-ifaces \fIbridge\fR"
333Lists all of the interfaces within \fIbridge\fR on standard output,
334one per line. The local port \fIbridge\fR is not included in the
335list.
336.
337.IP "\fBiface\-to\-br \fIiface\fR"
338Prints the name of the bridge that contains \fIiface\fR on standard
339output.
457e1eb0 340.
5aa00635
JP
341.SS "OpenFlow Controller Connectivity"
342.
343\fBovs\-vswitchd\fR can perform all configured bridging and switching
c0de82d9
JP
344locally, or it can be configured to communicate with one or more
345external OpenFlow controllers. The switch is typically configured to
346connect to a primary controller that takes charge of the bridge's flow
347table to implement a network policy. In addition, the switch can be
348configured to listen to connections from service controllers. Service
349controllers are typically used for occasional support and maintenance,
350e.g. with \fBovs\-ofctl\fR.
5aa00635 351.
1a048029 352.IP "\fBget\-controller\fR \fIbridge\fR"
5aa00635
JP
353Prints the configured controller target.
354.
1a048029 355.IP "\fBdel\-controller\fR \fIbridge\fR"
5aa00635
JP
356Deletes the configured controller target.
357.
1a048029
JP
358.IP "\fBset\-controller\fR \fIbridge\fR \fItarget\fR\&..."
359Sets the configured controller target or targets. Each \fItarget\fR may
360use any of the following forms:
5aa00635
JP
361.
362.RS
84ee7bcf 363.so lib/vconn-active.man
c0de82d9 364.so lib/vconn-passive.man
5aa00635 365.RE
84ee7bcf 366.
5aa00635 367.ST "Controller Failure Settings"
89365653 368.PP
5aa00635
JP
369When a controller is configured, it is, ordinarily, responsible for
370setting up all flows on the switch. Thus, if the connection to
371the controller fails, no new network connections can be set up. If
372the connection to the controller stays down long enough, no packets
373can pass through the switch at all.
63f08492 374.PP
5aa00635
JP
375If the value is \fBstandalone\fR, or if neither of these settings
376is set, \fBovs\-vswitchd\fR will take over
377responsibility for setting up
378flows when no message has been received from the controller for three
dd1dcc23 379times the inactivity probe interval. In this mode,
5aa00635
JP
380\fBovs\-vswitchd\fR causes the datapath to act like an ordinary
381MAC-learning switch. \fBovs\-vswitchd\fR will continue to retry connecting
382to the controller in the background and, when the connection succeeds,
383it discontinues its standalone behavior.
63f08492 384.PP
5aa00635
JP
385If this option is set to \fBsecure\fR, \fBovs\-vswitchd\fR will not
386set up flows on its own when the controller connection fails.
387.
1a048029 388.IP "\fBget\-fail\-mode\fR \fIbridge\fR"
5aa00635
JP
389Prints the configured failure mode.
390.
1a048029 391.IP "\fBdel\-fail\-mode\fR \fIbridge\fR"
5aa00635
JP
392Deletes the configured failure mode.
393.
1a048029 394.IP "\fBset\-fail\-mode\fR \fIbridge\fR \fBstandalone\fR|\fBsecure\fR"
5aa00635
JP
395Sets the configured failure mode.
396.
24b8b259
AE
397.SS "Manager Connectivity"
398.
289df16d
AE
399These commands manipulate the \fBmanager_options\fR column in the
400\fBOpen_vSwitch\fR table and rows in the \fBManagers\fR table. When
401\fBovsdb\-server\fR is configured to use the \fBmanager_options\fR column for
795752a3
SF
402OVSDB connections (as described in the startup scripts provided with
403Open vSwitch), this allows the administrator to use \fBovs\-vsctl\fR to
404configure database connections.
24b8b259
AE
405.
406.IP "\fBget\-manager\fR"
407Prints the configured manager(s).
408.
409.IP "\fBdel\-manager\fR"
410Deletes the configured manager(s).
411.
412.IP "\fBset\-manager\fR \fItarget\fR\&..."
413Sets the configured manager target or targets. Each \fItarget\fR may
414use any of the following forms:
415.
416.RS
417.so ovsdb/remote-active.man
418.so ovsdb/remote-passive.man
419.RE
420.
dd8ac6fe
JP
421.SS "SSL Configuration"
422When \fBovs\-vswitchd\fR is configured to connect over SSL for management or
423controller connectivity, the following parameters are required:
424.TP
ae9a3235 425\fIprivate-key\fR
dd8ac6fe
JP
426Specifies a PEM file containing the private key used as the virtual
427switch's identity for SSL connections to the controller.
428.TP
ae9a3235 429\fIcertificate\fR
dd8ac6fe
JP
430Specifies a PEM file containing a certificate, signed by the
431certificate authority (CA) used by the controller and manager, that
432certifies the virtual switch's private key, identifying a trustworthy
433switch.
434.TP
ae9a3235 435\fIca-cert\fR
dd8ac6fe
JP
436Specifies a PEM file containing the CA certificate used to verify that
437the virtual switch is connected to a trustworthy controller.
438.PP
439These files are read only once, at \fBovs\-vswitchd\fR startup time. If
440their contents change, \fBovs\-vswitchd\fR must be killed and restarted.
441.PP
442These SSL settings apply to all SSL connections made by the virtual
443switch.
444.
445.IP "\fBget\-ssl\fR"
446Prints the SSL configuration.
447.
448.IP "\fBdel\-ssl\fR"
449Deletes the current SSL configuration.
450.
451.IP "[\fB\-\-bootstrap\fR] \fBset\-ssl\fR \fIprivate-key\fR \fIcertificate\fR \fIca-cert\fR"
99eef98b 452Sets the SSL configuration. The \fB\-\-bootstrap\fR option is described
dd8ac6fe
JP
453below.
454.
455.ST "CA Certificate Bootstrap"
89365653 456.PP
dd8ac6fe 457Ordinarily, all of the files named in the SSL configuration must exist
40a09c8a
BP
458when \fBovs\-vswitchd\fR starts. However, if the \fIca-cert\fR file
459does not exist and the \fB\-\-bootstrap\fR
dd8ac6fe
JP
460option is given, then \fBovs\-vswitchd\fR will attempt to obtain the
461CA certificate from the controller on its first SSL connection and
462save it to the named PEM file. If it is successful, it will
463immediately drop the connection and reconnect, and from then on all
464SSL connections must be authenticated by a certificate signed by the
465CA certificate thus obtained.
466.PP
467\fBThis option exposes the SSL connection to a man-in-the-middle
468attack obtaining the initial CA certificate\fR, but it may be useful
469for bootstrapping.
470.PP
471This option is only useful if the controller sends its CA certificate
472as part of the SSL certificate chain. The SSL protocol does not
1d5aaa61 473require the controller to send the CA certificate.
dd8ac6fe 474.
99eef98b
DF
475.SS "Auto-Attach Commands"
476.
477The IETF Auto-Attach SPBM draft standard describes a compact method of using
478IEEE 802.1AB Link Layer Discovery Protocol (LLDP) together with a IEEE 802.1aq
479Shortest Path Bridging (SPB) network to automatically attach network devices to
480individual services in a SPB network. The intent here is to allow network
481applications and devices using OVS to be able to easily take advantage of
482features offered by industry standard SPB networks. A fundamental element of
483the Auto-Attach feature is to map traditional VLANs onto SPB I_SIDs. These
484commands manage the Auto-Attach I-SID/VLAN mappings.
485.
486.IP "\fBadd\-aa\-mapping \fIbridge i-sid vlan\fR"
487Creates a new Auto-Attach mapping on \fIbridge\fR for \fIi-sid\fR
488and \fIvlan\fR.
489.
490.IP "\fBdel\-aa\-mapping \fIbridge i-sid vlan\fR"
491Deletes an Auto-Attach mapping on \fIbridge\fR for \fIi-sid\fR
492and \fIvlan\fR.
493.IP "\fBget\-aa\-mapping \fIbridge\fR"
494Lists all of the Auto-Attach mappings within \fIbridge\fR on standard output.
495.
ad83bfa6
BP
496.SS "Database Commands"
497.
498These commands query and modify the contents of \fBovsdb\fR tables.
499They are a slight abstraction of the \fBovsdb\fR interface and as such
500they operate at a lower level than other \fBovs\-vsctl\fR commands.
501.PP
502.ST "Identifying Tables, Records, and Columns"
503.PP
504Each of these commands has a \fItable\fR parameter to identify a table
505within the database. Many of them also take a \fIrecord\fR parameter
506that identifies a particular record within a table. The \fIrecord\fR
507parameter may be the UUID for a record, and many tables offer
508additional ways to identify records. Some commands also take
509\fIcolumn\fR parameters that identify a particular field within the
510records in a table.
511.PP
512The following tables are currently defined:
513.IP "\fBOpen_vSwitch\fR"
514Global configuration for an \fBovs\-vswitchd\fR. This table contains
515exactly one record, identified by specifying \fB.\fR as the record
516name.
517.IP "\fBBridge\fR"
518Configuration for a bridge within an Open vSwitch. Records may be
519identified by bridge name.
520.IP "\fBPort\fR"
521A bridge port. Records may be identified by port name.
522.IP "\fBInterface\fR"
523A network device attached to a port. Records may be identified by
524name.
254750ce
BP
525.IP "\fBFlow_Table\fR"
526Configuration for a particular OpenFlow flow table. Records may be
527identified by name.
7b63fa03 528.IP "\fBQoS\fR"
c5f341ab
BP
529Quality-of-service configuration for a \fBPort\fR. Records may be
530identified by port name.
7b63fa03 531.IP "\fBQueue\fR"
c5f341ab
BP
532Configuration for one queue within a \fBQoS\fR configuration. Records
533may only be identified by UUID.
ef1e753e
BP
534.IP "\fBMirror\fR"
535A port mirroring configuration attached to a bridge. Records may be
536identified by mirror name.
ad83bfa6
BP
537.IP "\fBController\fR"
538Configuration for an OpenFlow controller. A controller attached to a
1a048029 539particular bridge may be identified by the bridge's name.
94db5407
BP
540.IP "\fBManager\fR"
541Configuration for an OVSDB connection. Records may be identified
542by target (e.g. \fBtcp:1.2.3.4\fR).
ad83bfa6
BP
543.IP "\fBNetFlow\fR"
544A NetFlow configuration attached to a bridge. Records may be
ef1e753e
BP
545identified by bridge name.
546.IP "\fBSSL\fR"
547The global SSL configuration for \fBovs\-vswitchd\fR. The record
548attached to the \fBOpen_vSwitch\fR table may be identified by
549specifying \fB.\fR as the record name.
550.IP "\fBsFlow\fR"
29089a54 551An sFlow exporter configuration attached to a bridge. Records may be
ad83bfa6 552identified by bridge name.
29089a54
RL
553.IP "\fBIPFIX\fR"
554An IPFIX exporter configuration attached to a bridge. Records may be
555identified by bridge name.
556.IP "\fBFlow_Sample_Collector_Set\fR"
557An IPFIX exporter configuration attached to a bridge for sampling
558packets on a per-flow basis using OpenFlow \fBsample\fR actions.
99eef98b
DF
559.IP "\fBAutoAttach\fR"
560Configuration for Auto Attach within a bridge.
ad83bfa6 561.PP
e111e681 562Record names must be specified in full and with correct
4e3000a0
BP
563capitalization, except that UUIDs may be abbreviated to their first 4
564(or more) hex digits, as long as that is unique within the table.
565Names of tables and columns are not case-sensitive, and \fB\-\fR and
566\fB_\fR are treated interchangeably. Unique abbreviations of table
567and column names are acceptable, e.g. \fBnet\fR or \fBn\fR is
568sufficient to identify the \fBNetFlow\fR table.
ad83bfa6 569.
f6a2e156 570.so lib/db-ctl-base.man
4d14e30f
BP
571.SH "EXAMPLES"
572Create a new bridge named br0 and add port eth0 to it:
573.IP
4e312e69 574.B "ovs\-vsctl add\-br br0"
4d14e30f 575.br
4e312e69 576.B "ovs\-vsctl add\-port br0 eth0"
4d14e30f
BP
577.PP
578Alternatively, perform both operations in a single atomic transaction:
99eef98b 579.IP
4e312e69 580.B "ovs\-vsctl add\-br br0 \-\- add\-port br0 eth0"
460aad80
BP
581.PP
582Delete bridge \fBbr0\fR, reporting an error if it does not exist:
583.IP
584.B "ovs\-vsctl del\-br br0"
585.PP
401d5a6d 586Delete bridge \fBbr0\fR if it exists:
460aad80 587.IP
401d5a6d 588.B "ovs\-vsctl \-\-if\-exists del\-br br0"
ce5a3e38
BP
589.PP
590Set the \fBqos\fR column of the \fBPort\fR record for \fBeth0\fR to
591point to a new \fBQoS\fR record, which in turn points with its queue 0
592to a new \fBQueue\fR record:
593.IP
4e312e69 594.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
595.SH "CONFIGURATION COOKBOOK"
596.SS "Port Configuration"
597.PP
598Add an ``internal port'' \fBvlan10\fR to bridge \fBbr0\fR as a VLAN
599access port for VLAN 10, and configure it with an IP address:
600.IP
601.B "ovs\-vsctl add\-port br0 vlan10 tag=10 \-\- set Interface vlan10 type=internal"
602.IP
603.B "ifconfig vlan10 192.168.0.123"
3b135da3 604.
19a79607
BP
605.PP
606Add a GRE tunnel port \fBgre0\fR to remote IP address 1.2.3.4 to
607bridge \fBbr0\fR:
608.IP
609.B "ovs\-vsctl add\-port br0 gre0 \-\- set Interface gre0 type=gre options:remote_ip=1.2.3.4"
610.
bad973d7
BP
611.SS "Port Mirroring"
612.PP
613Mirror all packets received or sent on \fBeth0\fR or \fBeth1\fR onto
614\fBeth2\fR, assuming that all of those ports exist on bridge \fBbr0\fR
615(as a side-effect this causes any packets received on \fBeth2\fR to be
616ignored):
617.IP
618.B "ovs\-vsctl \-\- set Bridge br0 mirrors=@m \(rs"
619.IP
620.B "\-\- \-\-id=@eth0 get Port eth0 \(rs"
621.IP
622.B "\-\- \-\-id=@eth1 get Port eth1 \(rs"
623.IP
624.B "\-\- \-\-id=@eth2 get Port eth2 \(rs"
625.IP
626.B "\-\- \-\-id=@m create Mirror name=mymirror select-dst-port=@eth0,@eth1 select-src-port=@eth0,@eth1 output-port=@eth2"
627.PP
c5f341ab
BP
628Remove the mirror created above from \fBbr0\fR, which also destroys
629the Mirror record (since it is now unreferenced):
bad973d7 630.IP
9d2e7445
BP
631.B "ovs\-vsctl \-\- \-\-id=@rec get Mirror mymirror \(rs"
632.IP
633.B "\-\- remove Bridge br0 mirrors @rec"
634.PP
635The following simpler command also works:
636.IP
637.B "ovs\-vsctl clear Bridge br0 mirrors"
bad973d7
BP
638.SS "Quality of Service (QoS)"
639.PP
640Create a \fBlinux\-htb\fR QoS record that points to a few queues and
641use it on \fBeth0\fR and \fBeth1\fR:
642.IP
643.B "ovs\-vsctl \-\- set Port eth0 qos=@newqos \(rs"
644.IP
645.B "\-\- set Port eth1 qos=@newqos \(rs"
646.IP
647.B "\-\- \-\-id=@newqos create QoS type=linux\-htb other\-config:max\-rate=1000000000 queues=0=@q0,1=@q1 \(rs"
648.IP
649.B "\-\- \-\-id=@q0 create Queue other\-config:min\-rate=100000000 other\-config:max\-rate=100000000 \(rs"
650.IP
651.B "\-\- \-\-id=@q1 create Queue other\-config:min\-rate=500000000"
652.PP
653Deconfigure the QoS record above from \fBeth1\fR only:
654.IP
655.B "ovs\-vsctl clear Port eth1 qos"
656.PP
657To deconfigure the QoS record from both \fBeth0\fR and \fBeth1\fR and
c5f341ab
BP
658then delete the QoS record (which must be done explicitly because
659unreferenced QoS records are not automatically destroyed):
bad973d7
BP
660.IP
661.B "ovs\-vsctl \-\- destroy QoS eth0 \-\- clear Port eth0 qos \-\- clear Port eth1 qos"
662.PP
663(This command will leave two unreferenced Queue records in the
664database. To delete them, use "\fBovs\-vsctl list Queue\fR" to find
665their UUIDs, then "\fBovs\-vsctl destroy Queue \fIuuid1\fR
eeb8467e
AS
666\fIuuid2\fR" to destroy each of them or use
667"\fBovs\-vsctl -- --all destroy Queue\fR" to delete all records.)
b31bcf60
EJ
668.SS "Connectivity Monitoring"
669.PP
93b8df38 670Monitor connectivity to a remote maintenance point on eth0.
b31bcf60 671.IP
a6e198ea 672.B "ovs\-vsctl set Interface eth0 cfm_mpid=1"
b31bcf60 673.PP
93b8df38 674Deconfigure connectivity monitoring from above:
b31bcf60 675.IP
a6e198ea 676.B "ovs\-vsctl clear Interface eth0 cfm_mpid"
bad973d7
BP
677.SS "NetFlow"
678.PP
679Configure bridge \fBbr0\fR to send NetFlow records to UDP port 5566 on
680host 192.168.0.34, with an active timeout of 30 seconds:
681.IP
682.B "ovs\-vsctl \-\- set Bridge br0 netflow=@nf \(rs"
683.IP
684.B "\-\- \-\-id=@nf create NetFlow targets=\(rs\(dq192.168.0.34:5566\(rs\(dq active\-timeout=30"
685.PP
686Update the NetFlow configuration created by the previous command to
687instead use an active timeout of 60 seconds:
688.IP
689.B "ovs\-vsctl set NetFlow br0 active_timeout=60"
690.PP
c5f341ab
BP
691Deconfigure the NetFlow settings from \fBbr0\fR, which also destroys
692the NetFlow record (since it is now unreferenced):
bad973d7 693.IP
c5f341ab 694.B "ovs\-vsctl clear Bridge br0 netflow"
bad973d7
BP
695.SS "sFlow"
696.PP
697Configure bridge \fBbr0\fR to send sFlow records to a collector on
69810.0.0.1 at port 6343, using \fBeth1\fR\'s IP address as the source,
699with specific sampling parameters:
700.IP
701.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"
702.IP
703.B "\-\- set Bridge br0 sflow=@s"
704.PP
f0f87cbd 705Deconfigure sFlow from \fBbr0\fR, which also destroys the sFlow record
c5f341ab 706(since it is now unreferenced):
bad973d7 707.IP
c5f341ab 708.B "ovs\-vsctl \-\- clear Bridge br0 sflow"
29089a54
RL
709.SS "IPFIX"
710.PP
711Configure bridge \fBbr0\fR to send one IPFIX flow record per packet
712sample to UDP port 4739 on host 192.168.0.34, with Observation Domain
978427a5 713ID 123 and Observation Point ID 456, a flow cache active timeout of 1
8b7ea2d4
WZ
714minute (60 seconds), maximum flow cache size of 13 flows, and flows
715sampled on output port with tunnel info(sampling on input and output
716port is enabled by default if not disabled) :
29089a54
RL
717.IP
718.B "ovs\-vsctl \-\- set Bridge br0 ipfix=@i \(rs"
719.IP
8b7ea2d4
WZ
720.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"
721.IP
722.B "other_config:enable-input-sampling=false other_config:enable-tunnel-sampling=true"
29089a54
RL
723.PP
724Deconfigure the IPFIX settings from \fBbr0\fR, which also destroys the
725IPFIX record (since it is now unreferenced):
726.IP
727.B "ovs\-vsctl clear Bridge br0 ipfix"
21f7563c
JP
728.SS "802.1D Spanning Tree Protocol (STP)"
729.PP
730Configure bridge \fBbr0\fR to participate in an 802.1D spanning tree:
731.IP
732.B "ovs\-vsctl set Bridge br0 stp_enable=true"
733.PP
734Set the bridge priority of \fBbr0\fR to 0x7800:
735.IP
736.B "ovs\-vsctl set Bridge br0 other_config:stp-priority=0x7800"
737.PP
738Set the path cost of port \fBeth0\fR to 10:
739.IP
740.B "ovs\-vsctl set Port eth0 other_config:stp-path-cost=10"
741.PP
742Deconfigure STP from above:
743.IP
69630ea0 744.B "ovs\-vsctl set Bridge br0 stp_enable=false"
21f7563c 745.PP
dc2b70ba
FL
746.SS "Multicast Snooping"
747.PP
748Configure bridge \fBbr0\fR to enable multicast snooping:
749.IP
750.B "ovs\-vsctl set Bridge br0 mcast_snooping_enable=true"
751.PP
752Set the multicast snooping aging time \fBbr0\fR to 300 seconds:
753.IP
754.B "ovs\-vsctl set Bridge br0 other_config:mcast-snooping-aging-time=300"
755.PP
756Set the multicast snooping table size \fBbr0\fR to 2048 entries:
757.IP
758.B "ovs\-vsctl set Bridge br0 other_config:mcast-snooping-table-size=2048"
759.PP
760Disable flooding of unregistered multicast packets to all ports. When
67e8c1ac
JR
761set to \fBtrue\fR, the switch will send unregistered multicast packets only
762to ports connected to multicast routers. When it is set to \fBfalse\fR, the
dc2b70ba
FL
763switch will send them to all ports. This command disables the flood of
764unregistered packets on bridge \fBbr0\fR.
765.IP
766.B "ovs\-vsctl set Bridge br0 other_config:mcast-snooping-disable-flood-unregistered=true"
767.PP
8e04a33f 768Enable flooding of multicast packets (except Reports) on a specific port.
dc2b70ba
FL
769.IP
770.B "ovs\-vsctl set Port eth1 other_config:mcast-snooping-flood=true"
771.PP
8e04a33f
FL
772Enable flooding of Reports on a specific port.
773.IP
774.B "ovs\-vsctl set Port eth1 other_config:mcast-snooping-flood-reports=true"
775.PP
dc2b70ba
FL
776Deconfigure multicasting snooping from above:
777.IP
778.B "ovs\-vsctl set Bridge br0 mcast_snooping_enable=false"
779.PP
9efd308e
DV
780.SS "802.1D-2004 Rapid Spanning Tree Protocol (RSTP)"
781.PP
782Configure bridge \fBbr0\fR to participate in an 802.1D-2004 Rapid Spanning Tree:
783.IP
784.B "ovs\-vsctl set Bridge br0 rstp_enable=true"
785.PP
786Set the bridge address of \fBbr0\fR to 00:aa:aa:aa:aa:aa :
787.IP
788.B "ovs\-vsctl set Bridge br0 other_config:rstp-address=00:aa:aa:aa:aa:aa"
789.PP
790Set the bridge priority of \fBbr0\fR to 0x7000. The value must be specified in
791decimal notation and should be a multiple of 4096 (if not, it is rounded down to
792the nearest multiple of 4096). The default priority value is 0x800 (32768).
793.IP
794.B "ovs\-vsctl set Bridge br0 other_config:rstp-priority=28672"
795.PP
796Set the bridge ageing time of \fBbr0\fR to 1000 s. The ageing time value should be
797between 10 s and 1000000 s. The default value is 300 s.
798.IP
799.B "ovs\-vsctl set Bridge br0 other_config:rstp-ageing-time=1000"
800.PP
801Set the bridge force protocol version of \fBbr0\fR to 0. The force protocol version
802has two acceptable values: 0 (STP compatibility mode) and 2 (normal operation).
803.IP
804.B "ovs\-vsctl set Bridge br0 other_config:rstp-force-protocol-version=0"
805.PP
806Set the bridge max age of \fBbr0\fR to 10 s. The max age value should be between 6 s
807and 40 s. The default value is 20 s.
808.IP
809.B "ovs\-vsctl set Bridge br0 other_config:rstp-max-age=10"
810.PP
811Set the bridge forward delay of \fBbr0\fR to 15 s.
812This value should be between 4 s and 30 s. The default value is 15 s.
813.IP
814.B "ovs\-vsctl set Bridge br0 other_config:rstp-forward-delay=15"
815.PP
816Set the bridge transmit hold count of \fBbr0\fR to 7 s. This value should be between
8171 s and 10 s. The default value is 6 s.
818.IP
819.B "ovs\-vsctl set Bridge br0 other_config:rstp-transmit-hold-count=7"
820.PP
67e8c1ac 821Enable RSTP on the Port \fBeth0\fR:
9efd308e
DV
822.IP
823.B "ovs\-vsctl set Port eth0 other_config:rstp-enable=true"
824.PP
67e8c1ac 825Disable RSTP on the Port \fBeth0\fR:
9efd308e
DV
826.IP
827.B "ovs\-vsctl set Port eth0 other_config:rstp-enable=false"
828.PP
67e8c1ac 829Set the priority of port \fBeth0\fR to 32. The value must be specified in
9efd308e
DV
830decimal notation and should be a multiple of 16 (if not, it is rounded down to the
831nearest multiple of 16). The default priority value is 0x80 (128).
832.IP
833.B "ovs\-vsctl set Port eth0 other_config:rstp-port-priority=32"
834.PP
835Set the port number of port \fBeth0\fR to 3:
836.IP
837.B "ovs\-vsctl set Port eth0 other_config:rstp-port-num=3"
838.PP
839Set the path cost of port \fBeth0\fR to 150:
840.IP
841.B "ovs\-vsctl set Port eth0 other_config:rstp-path-cost=150"
842.PP
843Set the admin edge value of port \fBeth0\fR:
844.IP
845.B "ovs\-vsctl set Port eth0 other_config:rstp-port-admin-edge=true"
846.PP
847Set the auto edge value of port \fBeth0\fR:
848.IP
849.B "ovs\-vsctl set Port eth0 other_config:rstp-port-auto-edge=true"
850.PP
9abdfbef
DV
851Set the admin point to point MAC value of port \fBeth0\fR. Acceptable
852values are \fB0\fR (not point-to-point), \fB1\fR (point-to-point, the
853default value) or \fB2\fR (automatic detection). The auto-detection
854mode is not currently implemented, and the value \fB2\fR has the same
855effect of \fB0\fR (not point-to-point).
67e8c1ac
JR
856.IP
857.B "ovs\-vsctl set Port eth0 other_config:rstp-admin-p2p-mac=1"
858.PP
859Set the admin port state value of port \fBeth0\fR. \fBtrue\fR is the
860default value.
861.IP
862.B "ovs\-vsctl set Port eth0 other_config:rstp-admin-port-state=false"
863.PP
9efd308e
DV
864Set the mcheck value of port \fBeth0\fR:
865.IP
866.B "ovs\-vsctl set Port eth0 other_config:rstp-port-mcheck=true"
867.PP
868Deconfigure RSTP from above:
869.IP
870.B "ovs\-vsctl set Bridge br0 rstp_enable=false"
871.PP
bb8a54f3
IY
872.SS "OpenFlow Version"
873.PP
874Configure bridge \fBbr0\fR to support OpenFlow versions 1.0, 1.2, and
8751.3:
876.IP
cccc12cc 877.B "ovs\-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow12,OpenFlow13"
bb8a54f3 878.
fe5c0d6b 879.SS "Flow Table Configuration"
6a9722fe 880Make flow table 0 on bridge br0 refuse to accept more than 100 flows:
fe5c0d6b
BP
881.IP
882.B "ovs\-vsctl \-\- \-\-id=@ft create Flow_Table flow_limit=100 overflow_policy=refuse \-\- set Bridge br0 flow_tables=0=@ft"
6a9722fe
BP
883.
884.PP
885Make flow table 0 on bridge br0 evict flows, with fairness based on
886the matched ingress port, when there are more than 100:
887.
888.IP
889.B "ovs\-vsctl \-\- \-\-id=@ft create Flow_Table flow_limit=100 overflow_policy=evict groups='\(dqNXM_OF_IN_PORT[]\(dq' \-\- set Bridge br0 flow_tables:0=@ft"
3b135da3
BP
890.SH "EXIT STATUS"
891.IP "0"
892Successful program execution.
893.IP "1"
894Usage, syntax, or configuration file error.
895.IP "2"
896The \fIbridge\fR argument to \fBbr\-exists\fR specified the name of a
897bridge that does not exist.
898.SH "SEE ALSO"
899.
dfbe07ba 900.BR ovsdb\-server (1),
5aa75474
BP
901.BR ovs\-vswitchd (8),
902.BR ovs\-vswitchd.conf.db (5).