Bring manpages and usage messages up-to-date.
[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: 976) 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: 975) on the given remote
43 \fIhost\fR.
44
45 .SH OPTIONS
46 .TP
47 \fB-i\fR, \fB--interfaces=\fR\fInetdev\fR[\fB,\fInetdev\fR]...
48 Specifies each \fInetdev\fR (e.g., \fBeth0\fR) as a switch port.  The
49 specified network devices should not have any configured IP addresses.
50 This option may be given any number of times to specify additional
51 network devices.
52
53 .TP
54 \fB-d\fR, \fB--datapath-id=\fIdpid\fR
55 Specifies the OpenFlow switch ID (a 48-bit number that uniquely
56 identifies a controller) as \fIdpid\fR, which consists of exactly 12
57 hex digits.  Without this option, \fBswitch\fR picks an ID randomly.
58
59 .TP
60 \fB-p\fR, \fB--private-key=\fIprivkey.pem\fR
61 Specifies a PEM file containing the private key used as the switch's
62 identity for SSL connections to the controller.
63
64 .TP
65 \fB-c\fR, \fB--certificate=\fIcert.pem\fR
66 Specifies a PEM file containing a certificate, signed by the
67 controller's certificate authority (CA), that certifies the switch's
68 private key to identify a trustworthy switch.
69
70 .TP
71 \fB-C\fR, \fB--ca-cert=\fIcacert.pem\fR
72 Specifies a PEM file containing the CA certificate used to verify that
73 the switch is connected to a trustworthy controller.
74
75 .TP
76 \fB-P\fR[\fIpidfile\fR], \fB--pidfile\fR[\fB=\fIpidfile\fR]
77 Causes a file (by default, \fBswitch.pid\fR) to be created indicating
78 the PID of the running process.  If \fIpidfile\fR is not specified, or
79 if it does not begin with \fB/\fR, then it is created in
80 \fB@rundir@\fR.
81
82 .TP
83 \fB-D\fR, \fB--detach\fR
84 Causes \fBswitch\fR to detach itself from the foreground session and
85 run as a background process.
86
87 .TP
88 .BR \-h ", " \-\^\-help
89 Prints a brief help message to the console.
90
91 .TP
92 \fB-v\fR \fImodule\fB:\fIfacility\fB:\fIlevel\fR, \fB--verbose=\fImodule\fB:\fIfacility\fB:\fIlevel\fR
93 Sets the logging level for \fImodule\fR in \fIfacility\fR to
94 \fIlevel\fR.  The \fImodule\fR may be any valid module name (as
95 displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
96 special name \fBANY\fR to set the logging levels for all modules.  The
97 \fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
98 for logging to the system log or to the console, respectively, or
99 \fBANY\fR to set the logging levels for both facilities.  The
100 \fIlevel\fR must be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or
101 \fBdbg\fR, designating the minimum severity of a message for it to be
102 logged.
103
104 .TP
105 \fB-v\fR, \fB--verbose\fR
106 Sets the maximum logging verbosity level, equivalent to
107 \fB--verbose=ANY:ANY:dbg\fR.
108
109 .TP
110 .BR \-V ", " \-\^\-version
111 Prints version information to the console.
112
113 .SH BUGS
114
115 The userspace switch implementation lags significantly behind the
116 kernel-based switch, both in implementation quality and performance.
117 It should only be used when the kernel-based switch cannot be.
118
119 General-purpose support for VLAN tag rewriting is precluded by the
120 Linux kernel AF_PACKET implementation.
121
122 .SH "SEE ALSO"
123
124 .BR dpctl (8),
125 .BR ofp-pki (8),
126 .BR controller (8),
127 .BR vlogconf (8)