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