ovs-vsctl: ovs-vswitchd management utility
usage: ovs-vsctl [OPTIONS] COMMAND [ARG...]
Open vSwitch commands:
init initialize database, if not yet initialized
show print overview of database contents
emer-reset reset configuration to clean state
Bridge commands:
add-br BRIDGE create a new bridge named BRIDGE
add-br BRIDGE PARENT VLAN create new fake BRIDGE in PARENT on VLAN
del-br BRIDGE delete BRIDGE and all of its ports
list-br print the names of all the bridges
br-exists BRIDGE exit 2 if BRIDGE does not exist
br-to-vlan BRIDGE print the VLAN which BRIDGE is on
br-to-parent BRIDGE print the parent of BRIDGE
br-set-external-id BRIDGE KEY VALUE set KEY on BRIDGE to VALUE
br-set-external-id BRIDGE KEY unset KEY on BRIDGE
br-get-external-id BRIDGE KEY print value of KEY on BRIDGE
br-get-external-id BRIDGE list key-value pairs on BRIDGE
Port commands (a bond is considered to be a single port):
list-ports BRIDGE print the names of all the ports on BRIDGE
add-port BRIDGE PORT add network device PORT to BRIDGE
add-bond BRIDGE PORT IFACE... add bonded port PORT in BRIDGE from IFACES
del-port [BRIDGE] PORT delete PORT (which may be bonded) from BRIDGE
port-to-br PORT print name of bridge that contains PORT
Interface commands (a bond consists of multiple interfaces):
list-ifaces BRIDGE print the names of all interfaces on BRIDGE
iface-to-br IFACE print name of bridge that contains IFACE
Controller commands:
get-controller BRIDGE print the controllers for BRIDGE
del-controller BRIDGE delete the controllers for BRIDGE
[--inactivity-probe=MSECS]
set-controller BRIDGE TARGET... set the controllers for BRIDGE
get-fail-mode BRIDGE print the fail-mode for BRIDGE
del-fail-mode BRIDGE delete the fail-mode for BRIDGE
set-fail-mode BRIDGE MODE set the fail-mode for BRIDGE to MODE
Manager commands:
get-manager print the managers
del-manager delete the managers
[--inactivity-probe=MSECS]
set-manager TARGET... set the list of managers to TARGET...
SSL/TLS commands:
get-ssl print the SSL/TLS configuration
del-ssl delete the SSL/TLS configuration
set-ssl PRIV-KEY CERT CA-CERT set the SSL/TLS configuration
Auto Attach commands:
add-aa-mapping BRIDGE I-SID VLAN add Auto Attach mapping to BRIDGE
del-aa-mapping BRIDGE I-SID VLAN delete Auto Attach mapping VLAN from BRIDGE
get-aa-mapping BRIDGE get Auto Attach mappings from BRIDGE
Switch commands:
emer-reset reset switch to known good state
Connection Tracking commands:
set-zone-limit DATAPATH ZONE|default LIMIT
set CT LIMIT for ZONE|default on DATAPATH
del-zone-limit DATAPATH ZONE|default
delete CT limit for ZONE|default on DATAPATH
list-zone-limits DATAPATH list all limits configured on DATAPATH
Database commands:
list TBL [REC] list RECord (or all records) in TBL
find TBL CONDITION... list records satisfying CONDITION in TBL
get TBL REC COL[:KEY] print values of COLumns in RECord in TBL
set TBL REC COL[:KEY]=VALUE set COLumn values in RECord in TBL
add TBL REC COL [KEY=]VALUE add (KEY=)VALUE to COLumn in RECord in TBL
remove TBL REC COL [KEY=]VALUE remove (KEY=)VALUE from COLumn
clear TBL REC COL clear values from COLumn in RECord in TBL
create TBL COL[:KEY]=VALUE create and initialize new record
destroy TBL REC delete RECord from TBL
wait-until TBL REC [COL[:KEY]=VALUE] wait until condition is true
Potentially unsafe database commands require --force option.
Database commands may reference a row in each table in the following ways:
AutoAttach:
by UUID
via "auto_attach" of Bridge with matching "name"
Bridge:
by UUID
by "name"
CT_Timeout_Policy:
by UUID
CT_Zone:
by UUID
Controller:
by UUID
via "controller" of Bridge with matching "name"
Datapath:
by UUID
Flow_Sample_Collector_Set:
by UUID
by "id"
Flow_Table:
by UUID
by "name"
IPFIX:
by UUID
via "ipfix" of Bridge with matching "name"
Interface:
by UUID
by "name"
Manager:
by UUID
by "target"
Mirror:
by UUID
by "name"
NetFlow:
by UUID
via "netflow" of Bridge with matching "name"
Open_vSwitch:
by UUID
as "."
Port:
by UUID
by "name"
QoS:
by UUID
via "qos" of Port with matching "name"
Queue:
by UUID
SSL:
by UUID
as "."
sFlow:
by UUID
via "sflow" of Bridge with matching "name"
Options:
--db=DATABASE connect to DATABASE
(default: unix:/run/openvswitch/db.sock)
--no-wait do not wait for ovs-vswitchd to reconfigure
--retry keep trying to connect to server forever
-t, --timeout=SECS wait at most SECS seconds for ovs-vswitchd
--dry-run do not commit changes to database
--oneline print exactly one line of output per command
Output formatting options:
-f, --format=FORMAT set output formatting to FORMAT
("table", "html", "csv", or "json")
-d, --data=FORMAT set table cell output formatting to
FORMAT ("string", "bare", or "json")
--no-headings omit table heading row
--pretty pretty-print JSON in output
--bare equivalent to "--format=list --data=bare --no-headings"
Logging options:
-vSPEC, --verbose=SPEC set logging levels
-v, --verbose set maximum verbosity level
--log-file[=FILE] enable logging to specified FILE
(default: /var/log/openvswitch/ovs-vsctl.log)
--syslog-method=(libc|unix:file|udp:ip:port)
specify how to send messages to syslog daemon
--syslog-target=HOST:PORT also send syslog msgs to HOST:PORT via UDP
--no-syslog equivalent to --verbose=vsctl:syslog:warn
Active database connection methods:
tcp:HOST:PORT PORT at remote HOST
ssl:HOST:PORT SSL/TLS PORT at remote HOST
unix:FILE Unix domain socket named FILE
Passive database connection methods:
ptcp:PORT[:IP] listen to TCP PORT on IP
pssl:PORT[:IP] listen for SSL/TLS on PORT on IP
punix:FILE listen on Unix domain socket FILE
PKI configuration (required to use SSL/TLS):
-p, --private-key=FILE file with private key
-c, --certificate=FILE file with certificate for private key
-C, --ca-cert=FILE file with peer CA certificate
--bootstrap-ca-cert=FILE file with peer CA certificate to read or create
SSL/TLS options:
--ssl-protocols=PROTOS range of SSL/TLS protocols to enable
--ssl-ciphers=CIPHERS list of SSL/TLS ciphers to enable
with TLSv1.2
--ssl-ciphersuites=SUITES list of SSL/TLS ciphersuites to
enable with TLSv1.3 and later
Other options:
-h, --help display this help message
-V, --version display version information
Options (27)
| Option | Description | Source |
|---|---|---|
--db DATABASE | Sets server as the database server that ovs-vsctl contacts to query or modify configuration. | help + man |
--no-wait | Prevents ovs-vsctl from waiting for ovs-vswitchd to reconfigure itself according to the modified database. | help + man |
--retry | Without this option, if ovs-vsctl connects outward to the database server (the default) then ovs-vsctl will try to connect once and exit with an error if the connection fails (which usually means… | help + man |
-t, --timeout SECS | By default, or with a secs of 0, ovs-vsctl waits forever for a response from the database. | help + man + man |
--dry-run | Prevents ovs-vsctl from actually modifying the database. | help + man |
--oneline | Modifies the output format so that the output for each command is printed on a single line. | help + man |
-f, --format FORMAT | set output formatting to FORMAT ("table", "html", "csv", or "json") | help + man + man |
-d, --data FORMAT | Sets the formatting for cells within output tables unless the table format is set to json, in which case json formatting is always used when formatting cells. | help + man + man |
--no-headings | This option suppresses the heading row that otherwise appears in the first row of table output. | help + man |
--pretty | By default, JSON in output is printed as compactly as possible. | help + man |
--bare | equivalent to "--format=list --data=bare --no-headings" | help + man |
-vSPEC, --verbose SPEC | Sets the maximum logging verbosity level, equivalent to --verbose=dbg. | help + man |
--log-file FILE | enable logging to specified FILE (default: /var/log/openvswitch/ovs-vsctl.log) | help |
--syslog-method (libc|unix:file|udp:ip:port) | Specify method how syslog messages should be sent to syslog daemon. | help + man |
--syslog-target HOST:PORT | Send syslog messages to UDP port on host, in addition to the system syslog. | help + man |
--no-syslog | By default, ovs-vsctl logs its arguments and the details of any changes that it makes to the system log. | help + man |
-p, --private-key FILE | Specifies a PEM file containing the private key used as ovs-vsctl's identity for outgoing SSL/TLS connections. | help + man + man |
-c, --certificate FILE | Specifies a PEM file containing a certificate that certifies the private key specified on -p or --private-key to be trustworthy. | help + man + man |
-C, --ca-cert FILE | Specifies a PEM file containing the CA certificate that ovs-vsctl should use to verify certificates presented to it by SSL/TLS peers. | help + man + man |
--bootstrap-ca-cert FILE | When cacert.pem exists, this option has the same effect as -C or --ca-cert. | help + man |
--ssl-protocols PROTOS | range of SSL/TLS protocols to enable | help |
--ssl-ciphers CIPHERS | list of SSL/TLS ciphers to enable with TLSv1.2 | help |
-h, --help | Prints a brief help message to the console. | help + man + man |
-V, --version | Prints version information to the console. | help + man + man |
--max-column-width n | For table output only, limits the width of any column in the output to n columns. (in the manual page but not in --help) | man |
--peer-ca-cert peer-cacert.pem | Specifies a PEM file that contains one or more additional certificates to send to SSL/TLS peers. (in the manual page but not in --help) | man |
-v | (in the manual page but not in --help) | man |
Exit status (3) from the manual page
0 | Successful program execution. |
1 | Usage, syntax, or configuration file error. |
2 | The bridge argument to br-exists specified the name of a bridge that does not exist. |