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