Add userspace datapath to openflow.
[sliver-openvswitch.git] / switch / switch.8.in
1 .TH secchan 8 "May 2008" "OpenFlow" "OpenFlow Manual"
2
3 .SH NAME
4 switch \- userspace implementation of OpenFlow switch
5
6 .SH SYNOPSIS
7 .B switch
8 [\fIoptions\fR]
9 \fB-i\fR \fInetdev\fR[\fB,\fInetdev\fR]...
10 \fIcontroller\fR
11
12 .SH DESCRIPTION
13 The \fBswitch\fR is a userspace implementation of an OpenFlow switch.
14 It implements all three parts of the OpenFlow switch specification: a
15 ``flow table'' in which each flow entry is associated with an action
16 telling the switch how to process the flow; a ``secure channel''
17 connecting the switch to a remote process (a controller), allowing
18 commands and packets to be sent between the controller and the switch;
19 and an OpenFlow protocol implementation.
20
21 \fBswitch\fR monitors one or more network device interfaces,
22 forwarding packets between them according to the entries in the flow
23 table.  It also maintains a connection to an OpenFlow controller over
24 a TCP or SSL connection, relaying packets that do not match a flow
25 table entry to the controller and executing commands sent by the
26 controller.
27
28 For access to network devices, the switch program must normally run as
29 root.
30
31 The mandatory \fIcontroller\fR argument specifies how to connect to
32 the OpenFlow controller.  It takes one of the following forms:
33
34 .TP
35 \fBssl:\fIhost\fR[\fB:\fIport\fR]
36 The specified SSL \fIport\fR (default: 6633) on the given remote
37 \fIhost\fR.  The \fB--private-key\fR, \fB--certificate\fR, and
38 \fB--ca-cert\fR options are mandatory when this form is used.
39
40 .TP
41 \fBtcp:\fIhost\fR[\fB:\fIport\fR]
42 The specified TCP \fIport\fR (default: 6633) on the given remote
43 \fIhost\fR.
44
45 .TP
46 \fBunix:\fIfile\fR
47 The Unix domain server socket named \fIfile\fR.
48
49 .SH OPTIONS
50 .TP
51 \fB-i\fR, \fB--interfaces=\fR\fInetdev\fR[\fB,\fInetdev\fR]...
52 Specifies each \fInetdev\fR (e.g., \fBeth0\fR) as a switch port.  The
53 specified network devices should not have any configured IP addresses.
54 This option may be given any number of times to specify additional
55 network devices.
56
57 .TP
58 \fB-d\fR, \fB--datapath-id=\fIdpid\fR
59 Specifies the OpenFlow switch ID (a 48-bit number that uniquely
60 identifies a controller) as \fIdpid\fR, which consists of exactly 12
61 hex digits.  Without this option, \fBswitch\fR picks an ID randomly.
62
63 .TP
64 \fB--max-backoff=\fIsecs\fR
65 Sets the maximum time between attempts to connect to the controller to
66 \fIsecs\fR, which must be at least 1.  The actual interval between
67 connection attempts starts at 1 second and doubles on each failing
68 attempt until it reaches the maximum.  The default maximum backoff
69 time is 15 seconds.
70
71 .TP
72 \fB-p\fR, \fB--private-key=\fIprivkey.pem\fR
73 Specifies a PEM file containing the private key used as the switch's
74 identity for SSL connections to the controller.
75
76 .TP
77 \fB-c\fR, \fB--certificate=\fIcert.pem\fR
78 Specifies a PEM file containing a certificate, signed by the
79 controller's certificate authority (CA), that certifies the switch's
80 private key to identify a trustworthy switch.
81
82 .TP
83 \fB-C\fR, \fB--ca-cert=\fIcacert.pem\fR
84 Specifies a PEM file containing the CA certificate used to verify that
85 the switch is connected to a trustworthy controller.
86
87 .TP
88 \fB-P\fR[\fIpidfile\fR], \fB--pidfile\fR[\fB=\fIpidfile\fR]
89 Causes a file (by default, \fBswitch.pid\fR) to be created indicating
90 the PID of the running process.  If \fIpidfile\fR is not specified, or
91 if it does not begin with \fB/\fR, then it is created in
92 \fB@RUNDIR@\fR.
93
94 .TP
95 \fB-f\fR, \fB--force\fR
96 By default, when \fB-P\fR or \fB--pidfile\fR is specified and the
97 specified pidfile already exists and is locked by a running process,
98 \fBswitch\fR refuses to start.  Specify \fB-f\fR or \fB--force\fR
99 to cause it to instead overwrite the pidfile.
100
101 When \fB-P\fR or \fB--pidfile\fR is not specified, this option has no
102 effect.
103
104 .TP
105 \fB-D\fR, \fB--detach\fR
106 Causes \fBswitch\fR to detach itself from the foreground session and
107 run as a background process.
108
109 .TP
110 .BR \-h ", " \-\^\-help
111 Prints a brief help message to the console.
112
113 @VLOG_OPTIONS@
114
115 .TP
116 .BR \-V ", " \-\^\-version
117 Prints version information to the console.
118
119 .SH BUGS
120
121 The userspace switch implementation lags significantly behind the
122 kernel-based switch, both in implementation quality and performance.
123 It should only be used when the kernel-based switch cannot be.
124
125 General-purpose support for VLAN tag rewriting is precluded by the
126 Linux kernel AF_PACKET implementation.
127
128 .SH "SEE ALSO"
129
130 .BR dpctl (8),
131 .BR ofp-pki (8),
132 .BR controller (8),
133 .BR vlogconf (8)