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