]> git.proxmox.com Git - mirror_ovs.git/blame - vswitchd/ovs-vswitchd.8.in
ofproto: Do not delete datapath flows on exit by default.
[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
79eadafe
BP
110is specified, deletes flows from datpaths and releases other datapath
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
201slaves, the bonding implementation computes a function that maps an
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
204value are then assigned to a single slave.
b16fdafe
BP
205.IP "\fBbond/list\fR"
206Lists all of the bonds, and their slaves, 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
212each slave: whether it is enabled or disabled, the time to completion
213of an updelay or downdelay if one is in progress, whether it is the
214active slave, the hashes assigned to the slave. Any LACP information
215related to this bond may be found using the \fBlacp/show\fR command.
216.
b16fdafe 217.IP "\fBbond/migrate\fR \fIport\fR \fIhash\fR \fIslave\fR"
be02e7c3
EJ
218Only valid for SLB bonds. Assigns a given MAC hash to a new slave.
219\fIport\fR specifies the bond port, \fIhash\fR the MAC hash to be
220migrated (as a decimal number between 0 and 255), and \fIslave\fR the
221new slave to be assigned.
b16fdafe
BP
222.IP
223The reassignment is not permanent: rebalancing or fail-over will
224cause the MAC hash to be shifted to a new slave in the usual
225manner.
226.IP
227A MAC hash cannot be migrated to a disabled slave.
4e312e69 228.IP "\fBbond/set\-active\-slave\fR \fIport\fR \fIslave\fR"
b16fdafe
BP
229Sets \fIslave\fR as the active slave on \fIport\fR. \fIslave\fR must
230currently be enabled.
231.IP
232The setting is not permanent: a new active slave will be selected
233if \fIslave\fR becomes disabled.
4e312e69
BP
234.IP "\fBbond/enable\-slave\fR \fIport\fR \fIslave\fR"
235.IQ "\fBbond/disable\-slave\fR \fIport\fR \fIslave\fR"
b16fdafe
BP
236Enables (or disables) \fIslave\fR on the given bond \fIport\fR, skipping any
237updelay (or downdelay).
238.IP
239This setting is not permanent: it persists only until the carrier
240status of \fIslave\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
248lists information about each slave: whether it is enabled or disabled,
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)
256and slave state (number of time slave's state expired/defaulted and carrier
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.
79f36875 275.so lib/dpif-netdev-unixctl.man
40f185ac 276.so lib/netdev-dpdk-unixctl.man
27022416 277.so ofproto/ofproto-dpif-unixctl.man
7aa697dd 278.so ofproto/ofproto-unixctl.man
b16fdafe 279.so lib/vlog-unixctl.man
149ff68a 280.so lib/memory-unixctl.man
6901e5e2 281.so lib/coverage-unixctl.man
a36de779 282.so ofproto/ofproto-tnl-unixctl.man
7a7708a0 283.
42ed0063
BP
284.SH "OPENFLOW IMPLEMENTATION"
285.
286.PP
287This section documents aspects of OpenFlow for which the OpenFlow
288specification requires documentation.
289.
290.SS "Packet buffering."
291The OpenFlow specification, version 1.2, says:
292.
293.IP
294Switches that implement buffering are expected to expose, through
295documentation, both the amount of available buffering, and the length
296of time before buffers may be reused.
297.
298.PP
c184807c 299Open vSwitch does not maintains any packet buffers.
42ed0063 300.
51bb26fa
JR
301.SS "Bundle lifetime"
302The OpenFlow specification, version 1.4, says:
303.
304.IP
305If the switch does not receive any OFPT_BUNDLE_CONTROL or
306OFPT_BUNDLE_ADD_MESSAGE message for an opened bundle_id for a switch
307defined time greater than 1s, it may send an ofp_error_msg with
308OFPET_BUNDLE_FAILED type and OFPBFC_TIMEOUT code. If the switch does
309not receive any new message in a bundle apart from echo request and
310replies for a switch defined time greater than 1s, it may send an
311ofp_error_msg with OFPET_BUNDLE_FAILED type and OFPBFC_TIMEOUT code.
312.
313.PP
7fdd2082
FL
314Open vSwitch implements default idle bundle lifetime of 10 seconds.
315(This is configurable via \fBother-config:bundle-idle-timeout\fR in
316the \fBOpen_vSwitch\fR table. See \fBovs-vswitchd.conf.db\fR(5)
317for details.)
51bb26fa 318.
7a7708a0
BP
319.SH "LIMITS"
320.
321.PP
322We believe these limits to be accurate as of this writing. These
323limits assume the use of the Linux kernel datapath.
324.
325.IP \(bu
6e587965 326\fBovs\-vswitchd\fR started through \fBovs\-ctl\fR(8) provides a limit of 65535
8ed70321
GS
327file descriptors. The limits on the number of bridges and ports is decided by
328the availability of file descriptors. With the Linux kernel datapath, creation
4224b9cf
BP
329of a single bridge consumes three file descriptors and each port
330consumes one additional file descriptor. Other platforms
6e587965 331may have different limitations.
7a7708a0
BP
332.
333.IP \(bu
4224b9cf 3348,192 MAC learning entries per bridge, by default. (This is
2be9d4f0
BP
335configurable via \fBother\-config:mac\-table\-size\fR in the
336\fBBridge\fR table. See \fBovs\-vswitchd.conf.db\fR(5) for details.)
7a7708a0
BP
337.
338.IP \(bu
339Kernel flows are limited only by memory available to the kernel.
340Performance will degrade beyond 1,048,576 kernel flows per bridge with
341a 32-bit kernel, beyond 262,144 with a 64-bit kernel.
342(\fBovs\-vswitchd\fR should never install anywhere near that many
343flows.)
344.
345.IP \(bu
346OpenFlow flows are limited only by available memory. Performance is
347linear in the number of unique wildcard patterns. That is, an
348OpenFlow table that contains many flows that all match on the same
349fields in the same way has a constant-time lookup, but a table that
350contains many flows that match on different fields requires lookup
351time linear in the number of flows.
352.
353.IP \(bu
354255 ports per bridge participating in 802.1D Spanning Tree Protocol.
355.
356.IP \(bu
35732 mirrors per bridge.
358.
359.IP \(bu
4224b9cf
BP
36015 bytes for the name of a port, for ports implemented in the Linux
361kernel. Ports implemented in userspace, such as patch ports, do not
362have an arbitrary length limitation. OpenFlow also limit port names
363to 15 bytes.
7a7708a0 364.
064af421
BP
365.SH "SEE ALSO"
366.BR ovs\-appctl (8),
795752a3 367.BR ovsdb\-server (1).