Make facility and level optional in -v, --verbose options.
[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--max-backoff=\fIsecs\fR
61 Sets the maximum time between attempts to connect to the controller to
62 \fIsecs\fR, which must be at least 1.  The actual interval between
63 connection attempts starts at 1 second and doubles on each failing
64 attempt until it reaches the maximum.  The default maximum backoff
65 time is 15 seconds.
66
67 .TP
68 \fB-p\fR, \fB--private-key=\fIprivkey.pem\fR
69 Specifies a PEM file containing the private key used as the switch's
70 identity for SSL connections to the controller.
71
72 .TP
73 \fB-c\fR, \fB--certificate=\fIcert.pem\fR
74 Specifies a PEM file containing a certificate, signed by the
75 controller's certificate authority (CA), that certifies the switch's
76 private key to identify a trustworthy switch.
77
78 .TP
79 \fB-C\fR, \fB--ca-cert=\fIcacert.pem\fR
80 Specifies a PEM file containing the CA certificate used to verify that
81 the switch is connected to a trustworthy controller.
82
83 .TP
84 \fB-P\fR[\fIpidfile\fR], \fB--pidfile\fR[\fB=\fIpidfile\fR]
85 Causes a file (by default, \fBswitch.pid\fR) to be created indicating
86 the PID of the running process.  If \fIpidfile\fR is not specified, or
87 if it does not begin with \fB/\fR, then it is created in
88 \fB@rundir@\fR.
89
90 .TP
91 \fB-D\fR, \fB--detach\fR
92 Causes \fBswitch\fR to detach itself from the foreground session and
93 run as a background process.
94
95 .TP
96 .BR \-h ", " \-\^\-help
97 Prints a brief help message to the console.
98
99 .TP
100 \fB-v\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]], \fB--verbose=\fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]
101 Sets the logging level for \fImodule\fR in \fIfacility\fR to
102 \fIlevel\fR.  The \fImodule\fR may be any valid module name (as
103 displayed by the \fB--list\fR action on \fBvlogconf\fR(8)), or the
104 special name \fBANY\fR to set the logging levels for all modules.  The
105 \fIfacility\fR may be \fBsyslog\fR or \fBconsole\fR to set the levels
106 for logging to the system log or to the console, respectively, or
107 \fBANY\fR to set the logging levels for both facilities.  If it is
108 omitted, \fIfacility\fR defaults to \fBANY\fR.  The \fIlevel\fR must
109 be one of \fBemer\fR, \fBerr\fR, \fBwarn\fR, or \fBdbg\fR, designating
110 the minimum severity of a message for it to be logged.  If it is
111 omitted, \fIlevel\fR defaults to \fBdbg\fR.
112
113 .TP
114 \fB-v\fR, \fB--verbose\fR
115 Sets the maximum logging verbosity level, equivalent to
116 \fB--verbose=ANY:ANY:dbg\fR.
117
118 .TP
119 .BR \-V ", " \-\^\-version
120 Prints version information to the console.
121
122 .SH BUGS
123
124 The userspace switch implementation lags significantly behind the
125 kernel-based switch, both in implementation quality and performance.
126 It should only be used when the kernel-based switch cannot be.
127
128 General-purpose support for VLAN tag rewriting is precluded by the
129 Linux kernel AF_PACKET implementation.
130
131 .SH "SEE ALSO"
132
133 .BR dpctl (8),
134 .BR ofp-pki (8),
135 .BR controller (8),
136 .BR vlogconf (8)