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