]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-openflowd.8.in
ofproto: Improve terminology.
[mirror_ovs.git] / utilities / ovs-openflowd.8.in
CommitLineData
8cd4882f
BP
1.TH ovs\-openflowd 8 "March 2009" "Open vSwitch" "Open vSwitch Manual"
2.ds PN ovs\-openflowd
a9b4a41a 3.
064af421 4.SH NAME
8cd4882f 5ovs\-openflowd \- OpenFlow switch implementation
a9b4a41a 6.
064af421 7.SH SYNOPSIS
8cd4882f 8.B ovs\-openflowd
76ce9432 9[\fIoptions\fR] \fIdatapath\fR [\fIcontroller\fR\&...]
a9b4a41a 10.
064af421 11.SH DESCRIPTION
8cd4882f 12The \fBovs\-openflowd\fR program implements an OpenFlow switch using a
76ce9432
BP
13flow-based datapath. \fBovs\-openflowd\fR connects to one or more
14OpenFlow controllers over TCP or SSL.
a9b4a41a 15.PP
064af421
BP
16The mandatory \fIdatapath\fR argument argument specifies the local datapath
17to relay. It takes one of the following forms:
a9b4a41a 18.
064af421 19.so lib/dpif.man
a9b4a41a 20.
064af421 21.PP
76ce9432 22The optional \fIcontroller\fR arguments specify how to connect to
064af421 23the OpenFlow controller. It takes one of the following forms:
84ee7bcf
BP
24.
25.so lib/vconn-active.man
26.
064af421 27.PP
76ce9432
BP
28If no \fIcontroller\fR is specified, \fBovs\-openflowd\fR attempts to
29discover the location of a controller automatically (see below).
a9b4a41a 30.
76ce9432
BP
31.SS "Contacting Controllers"
32The OpenFlow switch must be able to contact the OpenFlow controllers
064af421 33over the network. It can do so in one of two ways:
a9b4a41a 34.
064af421
BP
35.IP out-of-band
36In this configuration, OpenFlow traffic uses a network separate from
37the data traffic that it controls, that is, the switch does not use
38any of the network devices added to the datapath with \fBovs\-dpctl
39add\-if\fR in its communication with the controller.
a9b4a41a 40.IP
8cd4882f 41To use \fBovs\-openflowd\fR in a network with out-of-band control, specify
4e312e69 42\fB\-\-out\-of\-band\fR on the \fBovs\-openflowd\fR command line. The control
8cd4882f 43network must be configured separately, before or after \fBovs\-openflowd\fR
064af421 44is started.
a9b4a41a 45.
064af421
BP
46.IP in-band
47In this configuration, a single network is used for OpenFlow traffic
48and other data traffic, that is, the switch contacts the controller
49over one of the network devices added to the datapath with \fBovs\-dpctl
50add\-if\fR. This configuration is often more convenient than
51out-of-band control, because it is not necessary to maintain two
52independent networks.
a9b4a41a 53.IP
8cd4882f 54In-band control is the default for \fBovs\-openflowd\fR, so no special
064af421 55command-line option is required.
a9b4a41a 56.IP
064af421
BP
57With in-band control, the location of the controller can be configured
58manually or discovered automatically:
a9b4a41a 59.
064af421
BP
60.RS
61.IP "controller discovery"
8cd4882f 62To make \fBovs\-openflowd\fR discover the location of the controller
76ce9432
BP
63automatically, do not specify a controller on the \fBovs\-openflowd\fR
64command line.
a9b4a41a 65.IP
8cd4882f 66In this mode, \fBovs\-openflowd\fR will broadcast a DHCP request with vendor
064af421
BP
67class identifier \fBOpenFlow\fR across the network devices added to
68the datapath with \fBovs\-dpctl add\-if\fR. It will accept any valid DHCP
69reply that has the same vendor class identifier and includes a
70vendor-specific option with code 1 whose contents are a string
71specifying the location of the controller in the same format used on
8cd4882f 72the \fBovs\-openflowd\fR command line (e.g. \fBssl:192.168.0.1\fR).
a9b4a41a 73.IP
064af421
BP
74The DHCP reply may also, optionally, include a vendor-specific option
75with code 2 whose contents are a string specifying the URI to the base
76of the OpenFlow PKI (e.g. \fBhttp://192.168.0.1/openflow/pki\fR).
77This URI is used only for bootstrapping the OpenFlow PKI at initial
8cd4882f 78switch setup; \fBovs\-openflowd\fR does not use it at all.
a9b4a41a 79.IP
064af421
BP
80The following ISC DHCP server configuration file assigns the IP
81address range 192.168.0.20 through 192.168.0.30 to OpenFlow switches
82that follow the switch protocol and addresses 192.168.0.1 through
83192.168.0.10 to all other DHCP clients:
a9b4a41a 84.IP
4e312e69 85default\-lease\-time 600;
064af421 86.br
4e312e69 87max\-lease\-time 7200;
064af421
BP
88.br
89option space openflow;
90.br
4e312e69 91option openflow.controller\-vconn code 1 = text;
064af421 92.br
4e312e69 93option openflow.pki\-uri code 2 = text;
064af421
BP
94.br
95class "OpenFlow" {
96.br
4e312e69 97 match if option vendor\-class\-identifier = "OpenFlow";
064af421 98.br
4e312e69 99 vendor\-option\-space openflow;
064af421 100.br
4e312e69 101 option openflow.controller\-vconn "tcp:192.168.0.10";
064af421 102.br
4e312e69 103 option openflow.pki\-uri "http://192.168.0.10/openflow/pki";
064af421 104.br
4e312e69 105 option vendor\-class\-identifier "OpenFlow";
064af421
BP
106.br
107}
108.br
109subnet 192.168.0.0 netmask 255.255.255.0 {
110.br
111 pool {
112.br
113 allow members of "OpenFlow";
114.br
115 range 192.168.0.20 192.168.0.30;
116.br
117 }
118.br
119 pool {
120.br
121 deny members of "OpenFlow";
122.br
123 range 192.168.0.1 192.168.0.10;
124.br
125 }
126.br
127}
128.br
a9b4a41a 129.
064af421
BP
130.IP "manual configuration"
131To configure in-band control manually, specify the location of the
8cd4882f 132controller on the \fBovs\-openflowd\fR command line as the \fIcontroller\fR
064af421 133argument. You must also configure the network device for the OpenFlow
8cd4882f
BP
134``local port'' to allow \fBovs\-openflowd\fR to connect to that controller.
135The OpenFlow local port is a virtual network port that \fBovs\-openflowd\fR
064af421
BP
136bridges to the physical switch ports. The name of the local port for
137a given \fIdatapath\fR may be seen by running \fBovs\-dpctl show
138\fIdatapath\fR; the local port is listed as port 0 in \fBshow\fR's
139output.
a9b4a41a 140.
064af421 141.IP
8cd4882f 142Before \fBovs\-openflowd\fR starts, the local port network device is not
064af421
BP
143bridged to any physical network, so the next step depends on whether
144connectivity is required to configure the device's IP address. If the
145switch has a static IP address, you may configure its IP address now
146with a command such as
147.B ifconfig of0 192.168.1.1
8cd4882f 148and then invoke \fBovs\-openflowd\fR.
a9b4a41a 149.IP
064af421
BP
150On the other hand, if the switch does not have a static IP address,
151e.g. it obtains its IP address dynamically via DHCP, the DHCP client
8cd4882f
BP
152will not be able to contact the DHCP server until the OpenFlow switch
153has started up. Thus, start \fBovs\-openflowd\fR without configuring
064af421
BP
154the local port network device, and start the DHCP client afterward.
155.RE
a9b4a41a 156.
064af421 157.SH OPTIONS
0c30c8f1
JP
158.SS "OpenFlow Options"
159.TP
4e312e69 160\fB\-\-datapath\-id=\fIdpid\fR
0c30c8f1 161Sets \fIdpid\fR, which must consist of exactly 16 hexadecimal digits,
76ce9432
BP
162as the datapath ID that the switch will use to identify itself to
163OpenFlow controllers.
a9b4a41a 164.IP
0c30c8f1
JP
165If this option is omitted, the default datapath ID is taken from the
166Ethernet address of the datapath's local port (which is typically
167randomly generated) in the lower 48 bits and zeros in the upper 16.
a9b4a41a 168.
0c30c8f1 169.TP
4e312e69 170\fB\-\-mfr\-desc=\fIdesc\fR
0c30c8f1
JP
171Set the description of the switch's manufacturer to \fIdesc\fR, which
172may contain up to 255 ASCII characters.
a9b4a41a 173.
0c30c8f1 174.TP
4e312e69 175\fB\-\-hw\-desc=\fIdesc\fR
0c30c8f1
JP
176Set the description of the switch's hardware revision to \fIdesc\fR, which
177may contain up to 255 ASCII characters.
a9b4a41a 178.
0c30c8f1 179.TP
4e312e69 180\fB\-\-sw\-desc=\fIdesc\fR
0c30c8f1
JP
181Set the description of the switch's software revision to \fIdesc\fR, which
182may contain up to 255 ASCII characters.
a9b4a41a 183.
0c30c8f1 184.TP
4e312e69 185\fB\-\-serial\-desc=\fIdesc\fR
0c30c8f1
JP
186Set the description of the switch's serial number to \fIdesc\fR, which
187may contain up to 31 ASCII characters.
a9b4a41a 188.
0c30c8f1 189.TP
4e312e69 190\fB\-\-dp\-desc=\fIdesc\fR
0c30c8f1
JP
191Set the description of the datapath to \fIdesc\fR, which may contain up to
192255 ASCII characters. Note that this field is intended for debugging
193purposes and is not guaranteed to be unique and should not be used as
194the primary identifier of the datapath.
a9b4a41a 195.
064af421
BP
196.SS "Controller Discovery Options"
197.TP
4e312e69 198\fB\-\-accept\-vconn=\fIregex\fR
8cd4882f 199When \fBovs\-openflowd\fR performs controller discovery (see \fBContacting
064af421
BP
200the Controller\fR, above, for more information about controller
201discovery), it validates the controller location obtained via DHCP
202with a POSIX extended regular expression. Only controllers whose
203names match the regular expression will be accepted.
a9b4a41a 204.IP
064af421
BP
205The default regular expression is \fBssl:.*\fR (meaning that only SSL
206controller connections will be accepted) when any of the SSL
4e312e69
BP
207configuration options \fB\-\-private\-key\fR, \fB\-\-certificate\fR, or
208\fB\-\-ca\-cert\fR is specified. The default is \fB^tcp:.*\fR otherwise
12fb742b 209(meaning that only TCP controller connections will be accepted).
a9b4a41a 210.IP
064af421
BP
211The \fIregex\fR is implicitly anchored at the beginning of the
212controller location string, as if it begins with \fB^\fR.
a9b4a41a 213.IP
064af421 214When controller discovery is not performed, this option has no effect.
a9b4a41a 215.
064af421 216.TP
4e312e69 217\fB\-\-no\-resolv\-conf\fR
8cd4882f 218When \fBovs\-openflowd\fR performs controller discovery (see \fBContacting
064af421
BP
219the Controller\fR, above, for more information about controller
220discovery), by default it overwrites the system's
221\fB/etc/resolv.conf\fR with domain information and DNS servers
222obtained via DHCP. If the location of the controller is specified
223using a hostname, rather than an IP address, and the network's DNS
224servers ever change, this behavior is essential. But because it also
225interferes with any administrator or process that manages
8cd4882f 226\fB/etc/resolv.conf\fR, when this option is specified, \fBovs\-openflowd\fR
064af421 227will not modify \fB/etc/resolv.conf\fR.
a9b4a41a 228.IP
8cd4882f 229\fBovs\-openflowd\fR will only modify \fBresolv.conf\fR if the DHCP response
064af421 230that it receives specifies one or more DNS servers.
a9b4a41a 231.IP
064af421 232When controller discovery is not performed, this option has no effect.
a9b4a41a 233.
064af421
BP
234.SS "Networking Options"
235.TP
4e312e69 236\fB\-\-datapath\-id=\fIdpid\fR
b123cc3c 237Sets \fIdpid\fR, which must consist of exactly 16 hexadecimal digits,
064af421
BP
238as the datapath ID that the switch will use to identify itself to the
239OpenFlow controller.
a9b4a41a 240.IP
064af421
BP
241If this option is omitted, the default datapath ID is taken from the
242Ethernet address of the datapath's local port (which is typically
b123cc3c 243randomly generated) in the lower 48 bits and zeros in the upper 16.
a9b4a41a 244.
064af421 245.TP
4e312e69 246\fB\-\-fail=\fR[\fBstandalone\fR|\fBsecure\fR]
064af421
BP
247The controller is, ordinarily, responsible for setting up all flows on
248the OpenFlow switch. Thus, if the connection to the controller fails,
249no new network connections can be set up. If the connection to the
250controller stays down long enough, no packets can pass through the
251switch at all.
a9b4a41a 252.IP
33e01d3a
BP
253If this option is set to \fBstandalone\fR (the default),
254\fBovs\-openflowd\fR will
064af421
BP
255take over responsibility for setting up flows in the local datapath
256when no message has been received from the controller for three times
257the inactivity probe interval (see below), or 45 seconds by default.
8cd4882f
BP
258In this ``fail open'' mode, \fBovs\-openflowd\fR causes the datapath to act
259like an ordinary MAC-learning switch. \fBovs\-openflowd\fR will continue to
064af421 260retry connection to the controller in the background and, when the
33e01d3a 261connection succeeds, it discontinues its standalone switching behavior.
a9b4a41a 262.IP
33e01d3a 263If this option is set to \fBsecure\fR, then \fBovs\-openflowd\fR will not
064af421 264set up flows on its own when the controller connection fails.
a9b4a41a 265.
064af421 266.TP
4e312e69 267\fB\-\-inactivity\-probe=\fIsecs\fR
8cd4882f
BP
268When the OpenFlow switch is connected to the controller, the
269switch waits for a message to be received from the controller for
064af421
BP
270\fIsecs\fR seconds before it sends a inactivity probe to the
271controller. After sending the inactivity probe, if no response is
8cd4882f 272received for an additional \fIsecs\fR seconds, the switch
064af421 273assumes that the connection has been broken and attempts to reconnect.
f9fb1858 274The default and the minimum value are both 5 seconds.
a9b4a41a 275.IP
064af421
BP
276When fail-open mode is configured, changing the inactivity probe
277interval also changes the interval before entering fail-open mode (see
278above).
a9b4a41a 279.
064af421 280.TP
4e312e69 281\fB\-\-max\-idle=\fIsecs\fR|\fBpermanent\fR
064af421 282Sets \fIsecs\fR as the number of seconds that a flow set up by the
8cd4882f 283OpenFlow switch will remain in the switch's flow table without any
064af421 284matching packets being seen. If \fBpermanent\fR is specified, which
8cd4882f 285is not recommended, flows set up by the switch will never
064af421 286expire. The default is 15 seconds.
a9b4a41a 287.IP
8cd4882f
BP
288Most flows are set up by the OpenFlow controller, not by the
289switch. This option affects only the following flows, which the
290OpenFlow switch sets up itself:
a9b4a41a 291.
064af421
BP
292.RS
293.IP \(bu
4e312e69 294When \fB\-\-fail=open\fR is specified, flows set up when the
8cd4882f 295switch has not been able to contact the controller for the configured
064af421 296fail-open delay.
a9b4a41a 297.
064af421
BP
298.IP \(bu
299When in-band control is in use, flows set up to bootstrap contacting
300the controller (see \fBContacting the Controller\fR, above, for
301more information about in-band control).
302.RE
a9b4a41a 303.
064af421 304.IP
4e312e69 305As a result, when both \fB\-\-fail=secure\fR and \fB\-\-out\-of\-band\fR are
064af421 306specified, this option has no effect.
a9b4a41a 307.
064af421 308.TP
4e312e69 309\fB\-\-max\-backoff=\fIsecs\fR
064af421
BP
310Sets the maximum time between attempts to connect to the controller to
311\fIsecs\fR, which must be at least 1. The actual interval between
312connection attempts starts at 1 second and doubles on each failing
313attempt until it reaches the maximum. The default maximum backoff
c9aaa877 314time is 8 seconds.
a9b4a41a 315.
064af421 316.TP
4e312e69 317\fB\-l\fR, \fB\-\-listen=\fImethod\fR
436cf33b
JP
318By default, the switch listens for OpenFlow management connections on a
319Unix domain socket named \fB@RUNDIR@/\fIdatapath\fB.mgmt\fR. This socket
320can be used to perform local OpenFlow monitoring and administration with
321tools such as \fBovs\-ofctl\fR.
a9b4a41a 322.IP
436cf33b 323This option may be used to override the default listener. The \fImethod\fR
064af421
BP
324must be given as one of the passive OpenFlow connection methods listed
325below. This option may be specified multiple times to listen to
436cf33b
JP
326multiple connection methods. If a single \fImethod\fR of \fBnone\fR is
327used, no listeners will be created.
a9b4a41a 328.
064af421 329.RS
84ee7bcf 330.so lib/vconn-passive.man
064af421 331.RE
a9b4a41a 332.
064af421 333.TP
4e312e69 334\fB\-\-snoop=\fImethod\fR
064af421
BP
335Configures the switch to additionally listen for incoming OpenFlow
336connections for controller connection snooping. The \fImethod\fR must
337be given as one of the passive OpenFlow connection methods listed
4e312e69 338under the \fB\-\-listen\fR option above. This option may be specified
064af421 339multiple times to listen to multiple connection methods.
a9b4a41a 340.IP
064af421 341If \fBovs\-ofctl monitor\fR is used to connect to \fImethod\fR specified on
4e312e69 342\fB\-\-snoop\fR, it will display all the OpenFlow messages traveling
064af421
BP
343between the switch and its controller on the primary OpenFlow
344connection. This can be useful for debugging switch and controller
345problems.
a9b4a41a 346.
064af421 347.TP
4e312e69 348\fB\-\-in\-band\fR, \fB\-\-out\-of\-band\fR
8cd4882f 349Configures \fBovs\-openflowd\fR to operate in in-band or out-of-band control
064af421
BP
350mode (see \fBContacting the Controller\fR above). When neither option
351is given, the default is in-band control.
a9b4a41a 352.
064af421 353.TP
4e312e69 354\fB\-\-netflow=\fIip\fB:\fIport\fR
2b35e147
BP
355Configures the given UDP \fIport\fR on the specified IP \fIip\fR as
356a recipient of NetFlow messages for expired flows. The \fIip\fR must
357be specified numerically, not as a DNS name.
a9b4a41a 358.IP
064af421
BP
359This option may be specified multiple times to configure additional
360NetFlow collectors.
a9b4a41a 361.
064af421 362.SS "Rate-Limiting Options"
a9b4a41a 363.
064af421
BP
364These options configure how the switch applies a ``token bucket'' to
365limit the rate at which packets in unknown flows are forwarded to an
366OpenFlow controller for flow-setup processing. This feature prevents
367a single OpenFlow switch from overwhelming a controller.
a9b4a41a 368.
064af421 369.TP
4e312e69 370\fB\-\-rate\-limit\fR[\fB=\fIrate\fR]
064af421
BP
371.
372Limits the maximum rate at which packets will be forwarded to the
373OpenFlow controller to \fIrate\fR packets per second. If \fIrate\fR
374is not specified then the default of 1,000 packets per second is used.
a9b4a41a 375.IP
4e312e69 376If \fB\-\-rate\-limit\fR is not used, then the switch does not limit the
064af421 377rate at which packets are forwarded to the controller.
a9b4a41a 378.
064af421 379.TP
4e312e69 380\fB\-\-burst\-limit=\fIburst\fR
064af421
BP
381.
382Sets the maximum number of unused packet credits that the switch will
383allow to accumulate during time in which no packets are being
384forwarded to the OpenFlow controller to \fIburst\fR (measured in
385packets). The default \fIburst\fR is one-quarter of the \fIrate\fR
4e312e69 386specified on \fB\-\-rate\-limit\fR.
a9b4a41a 387.
4e312e69 388This option takes effect only when \fB\-\-rate\-limit\fR is also specified.
a9b4a41a 389.
e3e9370b
BP
390.SS "Datapath Options"
391.
392.IP "\fB\-\-ports=\fIport\fR[\fB,\fIport\fR...]"
393Ordinarily, \fBovs\-openflowd\fR expects the administrator to create
394the specified \fIdatapath\fR and add ports to it externally with a
395utility such as \fBovs\-dpctl\fR. However, the userspace switch
396datapath is implemented inside \fBovs\-openflowd\fR itself and does
397not (currently) have any external interface for \fBovs\-dpctl\fR to
398access. As a stopgap measure, this option specifies one or more ports
399to add to the datapath at \fBovs\-openflowd\fR startup time. Multiple
400ports may be specified as a comma-separated list or by specifying
401\fB\-\-ports\fR multiple times.
402.IP
403See \fBINSTALL.userspace\fR for more information about userspace
404switching.
a9b4a41a 405.
064af421
BP
406.SS "Daemon Options"
407.so lib/daemon.man
a9b4a41a 408.
ac300505 409.SS "Public Key Infrastructure Options"
84ee7bcf
BP
410.so lib/ssl.man
411.so lib/ssl-bootstrap.man
a9b4a41a 412.
064af421
BP
413.SS "Logging Options"
414.so lib/vlog.man
415.SS "Other Options"
416.so lib/common.man
417.so lib/leak-checker.man
a9b4a41a 418.
064af421 419.SH "SEE ALSO"
a9b4a41a 420.
064af421
BP
421.BR ovs\-appctl (8),
422.BR ovs\-controller (8),
423.BR ovs\-discover (8),
424.BR ovs\-dpctl (8),
425.BR ovs\-ofctl (8),
3b12adda 426.BR ovs\-pki (8)