]> git.proxmox.com Git - mirror_ovs.git/blame - vswitchd/ovs-vswitchd.8.in
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / vswitchd / ovs-vswitchd.8.in
CommitLineData
7d9809ef 1.\" -*- nroff -*-
6794be1d 2.so lib/ovs.tmac
d2cb6c95 3.TH ovs\-vswitchd 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
812560d7 4.\" This program's name:
064af421
BP
5.ds PN ovs\-vswitchd
6.
7.SH NAME
f30f26be 8ovs\-vswitchd \- Open vSwitch daemon
064af421
BP
9.
10.SH SYNOPSIS
80df177a 11\fBovs\-vswitchd \fR[\fIdatabase\fR]
064af421
BP
12.
13.SH DESCRIPTION
299a244b 14A daemon that manages and controls any number of Open vSwitch switches
f30f26be 15on the local machine.
064af421 16.PP
80df177a 17The \fIdatabase\fR argument specifies how \fBovs\-vswitchd\fR connects
12b84d50
BP
18to \fBovsdb\-server\fR. \fIdatabase\fR may be an OVSDB active or
19passive connection method, as described in \fBovsdb\fR(7). The
20default is \fBunix:@RUNDIR@/db.sock\fR.
064af421 21.PP
76343538
BP
22\fBovs\-vswitchd\fR retrieves its configuration from \fIdatabase\fR at
23startup. It sets up Open vSwitch datapaths and then operates
24switching across each bridge described in its configuration files. As
25the database changes, \fBovs\-vswitchd\fR automatically updates its
26configuration to match.
27.PP
299a244b 28\fBovs\-vswitchd\fR switches may be configured with any of the following
f30f26be 29features:
064af421
BP
30.
31.IP \(bu
32L2 switching with MAC learning.
33.
34.IP \(bu
35NIC bonding with automatic fail-over and source MAC-based TX load
36balancing ("SLB").
37.
38.IP \(bu
39802.1Q VLAN support.
40.
41.IP \(bu
42Port mirroring, with optional VLAN tagging.
43.
44.IP \(bu
45NetFlow v5 flow logging.
46.
47.IP \(bu
d1ae8299 48sFlow(R) monitoring.
72b06300
BP
49.
50.IP \(bu
064af421
BP
51Connectivity to an external OpenFlow controller, such as NOX.
52.
53.PP
54Only a single instance of \fBovs\-vswitchd\fR is intended to run at a time.
f30f26be 55A single \fBovs\-vswitchd\fR can manage any number of switch instances, up
064af421
BP
56to the maximum number of supported Open vSwitch datapaths.
57.PP
f4b72cb4
BP
58\fBovs\-vswitchd\fR does all the necessary management of Open vSwitch
59datapaths itself. Thus, \fBovs\-dpctl\fR(8) (and its userspace
60datapath counterparts accessible via \fBovs\-appctl
61dpctl/\fIcommand\fR) are not needed with \fBovs\-vswitchd\fR and should
62not be used because they can interfere with its operation. These
63tools are still useful for diagnostics.
064af421
BP
64.PP
65An Open vSwitch datapath kernel module must be loaded for \fBovs\-vswitchd\fR
795752a3
SF
66to be useful. Refer to the documentation for instructions on how to build and
67load the Open vSwitch kernel module.
064af421
BP
68.PP
69.SH OPTIONS
4e312e69 70.IP "\fB\-\-mlockall\fR"
86a06318
BP
71Causes \fBovs\-vswitchd\fR to call the \fBmlockall()\fR function, to
72attempt to lock all of its process memory into physical RAM,
73preventing the kernel from paging any of its memory to disk. This
74helps to avoid networking interruptions due to system memory pressure.
75.IP
76Some systems do not support \fBmlockall()\fR at all, and other systems
77only allow privileged users, such as the superuser, to use it.
78\fBovs\-vswitchd\fR emits a log message if \fBmlockall()\fR is
79unavailable or unsuccessful.
80.
d1279464 81.SS "DPDK Options"
49df3c0f
BP
82For details on initializing \fBovs\-vswitchd\fR to use DPDK ports,
83refer to the documentation or \fBovs\-vswitchd.conf.db\fR(5).
42dd41ef 84.SS "Daemon Options"
a7ff9bd7
BP
85.ds DD \
86\fBovs\-vswitchd\fR detaches only after it has connected to the \
87database, retrieved the initial configuration, and set up that \
88configuration.
064af421 89.so lib/daemon.man
42dd41ef
GS
90.SS "Service Options"
91.so lib/service.man
ac300505 92.SS "Public Key Infrastructure Options"
6f61c75b
BP
93.so lib/ssl.man
94.so lib/ssl-bootstrap.man
c33fa581 95.so lib/ssl-peer-ca-cert.man
b3fca241 96.SS "Logging Options"
064af421 97.so lib/vlog.man
8a986a0a
GS
98.SS "Other Options"
99.so lib/unixctl.man
064af421 100.so lib/common.man
064af421 101.
b16fdafe
BP
102.SH "RUNTIME MANAGEMENT COMMANDS"
103\fBovs\-appctl\fR(8) can send commands to a running
104\fBovs\-vswitchd\fR process. The currently supported commands are
105described below. The command descriptions assume an understanding of
76343538 106how to configure Open vSwitch.
9e15c889 107.SS "GENERAL COMMANDS"
fe13ccdc
AZ
108.IP "\fBexit\fR \fI--cleanup\fR"
109Causes \fBovs\-vswitchd\fR to gracefully terminate. If \fI--cleanup\fR
bae24b4e 110is specified, deletes flows from datapaths and releases other datapath
79eadafe
BP
111resources configured by \fBovs\-vswitchd\fR. Otherwise, datapath
112flows and other resources remains undeleted. Resources of datapaths
113that are integrated into \fBovs\-vswitchd\fR (e.g. the \fBnetdev\fR
114datapath type) are always released regardless of \fI--cleanup\fR
115except for ports with \fBinternal\fR type. Use \fI--cleanup\fR to
116release \fBinternal\fR ports too.
fe13ccdc 117.
3d657a0a
IS
118.IP "\fBqos/show-types\fR \fIinterface\fR"
119Queries the interface for a list of Quality of Service types that are
120configurable via Open vSwitch for the given \fIinterface\fR.
e8fe3026
EJ
121.IP "\fBqos/show\fR \fIinterface\fR"
122Queries the kernel for Quality of Service configuration and statistics
123associated with the given \fIinterface\fR.
6d13e6dd
PR
124.IP "\fBbfd/show\fR [\fIinterface\fR]"
125Displays detailed information about Bidirectional Forwarding Detection
126configured on \fIinterface\fR. If \fIinterface\fR is not specified,
127then displays detailed information about all interfaces with BFD
128enabled.
129.IP "\fBbfd/set-forwarding\fR [\fIinterface\fR] \fIstatus\fR"
130Force the fault status of the BFD module on \fIinterface\fR (or all
131interfaces if none is given) to be \fIstatus\fR. \fIstatus\fR can be
132"true", "false", or "normal" which reverts to the standard behavior.
ae75dae3 133.IP "\fBcfm/show\fR [\fIinterface\fR]"
20c8e971 134Displays detailed information about Connectivity Fault Management
ae75dae3
JP
135configured on \fIinterface\fR. If \fIinterface\fR is not specified,
136then displays detailed information about all interfaces with CFM
137enabled.
d7243b93
EJ
138.IP "\fBcfm/set-fault\fR [\fIinterface\fR] \fIstatus\fR"
139Force the fault status of the CFM module on \fIinterface\fR (or all
140interfaces if none is given) to be \fIstatus\fR. \fIstatus\fR can be
141"true", "false", or "normal" which reverts to the standard behavior.
fe4a02e4
EJ
142.IP "\fBstp/tcn\fR [\fIbridge\fR]"
143Forces a topology change event on \fIbridge\fR if it's running STP. This
144may cause it to send Topology Change Notifications to its peers and flush
cc3a32f3 145its MAC table. If no \fIbridge\fR is given, forces a topology change
fe4a02e4 146event on all bridges.
5f206eb6 147.IP "\fBstp/show\fR [\fIbridge\fR]"
148Displays detailed information about spanning tree on the \fIbridge\fR. If
149\fIbridge\fR is not specified, then displays detailed information about all
150bridges with STP enabled.
cc3a32f3 151.IP "\fBrstp/tcn\fR [\fIbridge\fR]"
152Forces a topology change event on \fIbridge\fR if it's running RSTP. This
153may cause it to send Topology Change Notifications to its peers and flush
154its MAC table. If no \fIbridge\fR is given, forces a topology change
155event on all bridges.
156.IP "\fBrstp/show\fR [\fIbridge\fR]"
157Displays detailed information about rapid spanning tree on the \fIbridge\fR.
158If \fIbridge\fR is not specified, then displays detailed information about all
159bridges with RSTP enabled.
b16fdafe
BP
160.SS "BRIDGE COMMANDS"
161These commands manage bridges.
96e466a3
EJ
162.IP "\fBfdb/flush\fR [\fIbridge\fR]"
163Flushes \fIbridge\fR MAC address learning table, or all learning tables
164if no \fIbridge\fR is given.
b16fdafe
BP
165.IP "\fBfdb/show\fR \fIbridge\fR"
166Lists each MAC address/VLAN pair learned by the specified \fIbridge\fR,
08fdcc12
FL
167along with the port on which it was learned and the age of the entry,
168in seconds.
6433e2c7
EC
169.IP "\fBfdb/stats-clear\fR [\fIbridge\fR]"
170Clear \fIbridge\fR MAC address learning table statistics, or all
171statistics if no \fIbridge\fR is given.
172.IP "\fBfdb/stats-show\fR \fIbridge\fR"
173Show MAC address learning table statistics for the specified \fIbridge\fR.
08fdcc12
FL
174.IP "\fBmdb/flush\fR [\fIbridge\fR]"
175Flushes \fIbridge\fR multicast snooping table, or all snooping tables
176if no \fIbridge\fR is given.
177.IP "\fBmdb/show\fR \fIbridge\fR"
178Lists each multicast group/VLAN pair learned by the specified \fIbridge\fR,
b16fdafe
BP
179along with the port on which it was learned and the age of the entry,
180in seconds.
fa05809b
BP
181.IP "\fBbridge/reconnect\fR [\fIbridge\fR]"
182Makes \fIbridge\fR drop all of its OpenFlow controller connections and
183reconnect. If \fIbridge\fR is not specified, then all bridges drop
184their controller connections and reconnect.
185.IP
186This command might be useful for debugging OpenFlow controller issues.
cdd35cff 187.
16441315 188.IP "\fBbridge/dump\-flows\fR [\fB\-\-offload-stats\fR] \fIbridge\fR"
cdd35cff 189Lists all flows in \fIbridge\fR, including those normally hidden to
4e312e69 190commands such as \fBovs\-ofctl dump\-flows\fR. Flows set up by mechanisms
cdd35cff
JP
191such as in-band control and fail-open are hidden from the controller
192since it is not allowed to modify or override them.
16441315 193If \fB\-\-offload-stats\fR are specified then also list statistics for
194offloaded packets and bytes, which are a subset of the total packets and
195bytes.
b16fdafe
BP
196.SS "BOND COMMANDS"
197These commands manage bonded ports on an Open vSwitch's bridges. To
198understand some of these commands, it is important to understand a
be02e7c3
EJ
199detail of the bonding implementation called ``source load balancing''
200(SLB). Instead of directly assigning Ethernet source addresses to
91fc374a 201members, the bonding implementation computes a function that maps an
be02e7c3
EJ
20248-bit Ethernet source addresses into an 8-bit value (a ``MAC hash''
203value). All of the Ethernet addresses that map to a single 8-bit
91fc374a 204value are then assigned to a single member.
b16fdafe 205.IP "\fBbond/list\fR"
91fc374a 206Lists all of the bonds, and their members, on each bridge.
064af421 207.
c33a8a25
EJ
208.IP "\fBbond/show\fR [\fIport\fR]"
209Lists all of the bond-specific information (updelay, downdelay, time
210until the next rebalance) about the given bonded \fIport\fR, or all
211bonded ports if no \fIport\fR is given. Also lists information about
91fc374a 212each members: whether it is enabled or disabled, the time to completion
c33a8a25 213of an updelay or downdelay if one is in progress, whether it is the
91fc374a 214active member, the hashes assigned to the member. Any LACP information
c33a8a25
EJ
215related to this bond may be found using the \fBlacp/show\fR command.
216.
91fc374a
BP
217.IP "\fBbond/migrate\fR \fIport\fR \fIhash\fR \fImember\fR"
218Only valid for SLB bonds. Assigns a given MAC hash to a new member.
be02e7c3 219\fIport\fR specifies the bond port, \fIhash\fR the MAC hash to be
91fc374a
BP
220migrated (as a decimal number between 0 and 255), and \fImember\fR the
221new member to be assigned.
b16fdafe
BP
222.IP
223The reassignment is not permanent: rebalancing or fail-over will
91fc374a 224cause the MAC hash to be shifted to a new member in the usual
b16fdafe
BP
225manner.
226.IP
91fc374a
BP
227A MAC hash cannot be migrated to a disabled member.
228.IP "\fBbond/set\-active\-member\fR \fIport\fR \fImember\fR"
229Sets \fImember\fR as the active member on \fIport\fR. \fImember\fR must
b16fdafe
BP
230currently be enabled.
231.IP
91fc374a
BP
232The setting is not permanent: a new active member will be selected
233if \fImember\fR becomes disabled.
234.IP "\fBbond/enable\-member\fR \fIport\fR \fImember\fR"
235.IQ "\fBbond/disable\-member\fR \fIport\fR \fImember\fR"
236Enables (or disables) \fImember\fR on the given bond \fIport\fR, skipping any
b16fdafe
BP
237updelay (or downdelay).
238.IP
239This setting is not permanent: it persists only until the carrier
91fc374a 240status of \fImember\fR changes.
672d18b2 241.IP "\fBbond/hash\fR \fImac\fR [\fIvlan\fR] [\fIbasis\fR]"
e58de0e3 242Returns the hash value which would be used for \fImac\fR with \fIvlan\fR
672d18b2 243and \fIbasis\fR if specified.
064af421 244.
5dab8ece 245.IP "\fBlacp/show\fR [\fIport\fR]"
6aa74308
EJ
246Lists all of the LACP related information about the given \fIport\fR:
247active or passive, aggregation key, system id, and system priority. Also
91fc374a 248lists information about each member: whether it is enabled or disabled,
6aa74308 249whether it is attached or detached, port id and priority, actor
5dab8ece
JP
250information, and partner information. If \fIport\fR is not specified,
251then displays detailed information about all interfaces with CFM
252enabled.
49b9cad3
NK
253.
254.IP "\fBlacp/stats-show\fR [\fIport\fR]"
255Lists various stats about LACP PDUs (number of RX/TX PDUs, bad PDUs received)
91fc374a 256and member state (number of times its state expired/defaulted and carrier
49b9cad3
NK
257status changed) for the given \fIport\fR. If \fIport\fR is not specified,
258then displays stats of all interfaces with LACP enabled.
fceef209
DDP
259.SS "DPCTL DATAPATH DEBUGGING COMMANDS"
260The primary way to configure \fBovs\-vswitchd\fR is through the Open
261vSwitch database, e.g. using \fBovs\-vsctl\fR(8). These commands
262provide a debugging interface for managing datapaths. They implement
263the same features (and syntax) as \fBovs\-dpctl\fR(8). Unlike
264\fBovs\-dpctl\fR(8), these commands work with datapaths that are
265integrated into \fBovs\-vswitchd\fR (e.g. the \fBnetdev\fR datapath
266type).
267.PP
268.
269.ds DX \fBdpctl/\fR
270.de DO
271\\$2 \\$1 \\$3
272..
273.so lib/dpctl.man
6aa74308 274.
9af9dbce 275.so lib/dpdk-unixctl.man
79f36875 276.so lib/dpif-netdev-unixctl.man
40f185ac 277.so lib/netdev-dpdk-unixctl.man
27022416 278.so ofproto/ofproto-dpif-unixctl.man
7aa697dd 279.so ofproto/ofproto-unixctl.man
b16fdafe 280.so lib/vlog-unixctl.man
149ff68a 281.so lib/memory-unixctl.man
6901e5e2 282.so lib/coverage-unixctl.man
a36de779 283.so ofproto/ofproto-tnl-unixctl.man
7a7708a0 284.
42ed0063
BP
285.SH "OPENFLOW IMPLEMENTATION"
286.
287.PP
288This section documents aspects of OpenFlow for which the OpenFlow
289specification requires documentation.
290.
291.SS "Packet buffering."
292The OpenFlow specification, version 1.2, says:
293.
294.IP
295Switches that implement buffering are expected to expose, through
296documentation, both the amount of available buffering, and the length
297of time before buffers may be reused.
298.
299.PP
c184807c 300Open vSwitch does not maintains any packet buffers.
42ed0063 301.
51bb26fa
JR
302.SS "Bundle lifetime"
303The OpenFlow specification, version 1.4, says:
304.
305.IP
306If the switch does not receive any OFPT_BUNDLE_CONTROL or
307OFPT_BUNDLE_ADD_MESSAGE message for an opened bundle_id for a switch
308defined time greater than 1s, it may send an ofp_error_msg with
309OFPET_BUNDLE_FAILED type and OFPBFC_TIMEOUT code. If the switch does
310not receive any new message in a bundle apart from echo request and
311replies for a switch defined time greater than 1s, it may send an
312ofp_error_msg with OFPET_BUNDLE_FAILED type and OFPBFC_TIMEOUT code.
313.
314.PP
7fdd2082
FL
315Open vSwitch implements default idle bundle lifetime of 10 seconds.
316(This is configurable via \fBother-config:bundle-idle-timeout\fR in
317the \fBOpen_vSwitch\fR table. See \fBovs-vswitchd.conf.db\fR(5)
318for details.)
51bb26fa 319.
7a7708a0
BP
320.SH "LIMITS"
321.
322.PP
323We believe these limits to be accurate as of this writing. These
324limits assume the use of the Linux kernel datapath.
325.
326.IP \(bu
6e587965 327\fBovs\-vswitchd\fR started through \fBovs\-ctl\fR(8) provides a limit of 65535
8ed70321
GS
328file descriptors. The limits on the number of bridges and ports is decided by
329the availability of file descriptors. With the Linux kernel datapath, creation
4224b9cf
BP
330of a single bridge consumes three file descriptors and each port
331consumes one additional file descriptor. Other platforms
6e587965 332may have different limitations.
7a7708a0
BP
333.
334.IP \(bu
4224b9cf 3358,192 MAC learning entries per bridge, by default. (This is
2be9d4f0
BP
336configurable via \fBother\-config:mac\-table\-size\fR in the
337\fBBridge\fR table. See \fBovs\-vswitchd.conf.db\fR(5) for details.)
7a7708a0
BP
338.
339.IP \(bu
340Kernel flows are limited only by memory available to the kernel.
341Performance will degrade beyond 1,048,576 kernel flows per bridge with
342a 32-bit kernel, beyond 262,144 with a 64-bit kernel.
343(\fBovs\-vswitchd\fR should never install anywhere near that many
344flows.)
345.
346.IP \(bu
347OpenFlow flows are limited only by available memory. Performance is
348linear in the number of unique wildcard patterns. That is, an
349OpenFlow table that contains many flows that all match on the same
350fields in the same way has a constant-time lookup, but a table that
351contains many flows that match on different fields requires lookup
352time linear in the number of flows.
353.
354.IP \(bu
355255 ports per bridge participating in 802.1D Spanning Tree Protocol.
356.
357.IP \(bu
35832 mirrors per bridge.
359.
360.IP \(bu
4224b9cf
BP
36115 bytes for the name of a port, for ports implemented in the Linux
362kernel. Ports implemented in userspace, such as patch ports, do not
363have an arbitrary length limitation. OpenFlow also limit port names
364to 15 bytes.
7a7708a0 365.
064af421
BP
366.SH "SEE ALSO"
367.BR ovs\-appctl (8),
795752a3 368.BR ovsdb\-server (1).