Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git] / tests / test-controller.8.in
1                           .\" -*- nroff -*-
2 .de IQ
3 .  br
4 .  ns
5 .  IP "\\$1"
6 ..
7 .TH test\-controller 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
8 .ds PN test\-controller
9 .
10 .SH NAME
11 test\-controller \- simple OpenFlow controller for testing
12 .
13 .SH SYNOPSIS
14 .B test\-controller
15 [\fIoptions\fR] \fImethod\fR \fB[\fImethod\fR]\&...
16 .
17 .SH DESCRIPTION
18 .PP
19 \fBtest\-controller\fR is a simple OpenFlow controller.  It is very
20 easy to set up, so it may be suitable for initial testing of
21 connectivity between an OpenFlow switch and a controller.  It may also
22 be useful for developer testing and debugging of some Open vSwitch
23 features.
24 .PP
25 \fBtest\-controller\fR is not a general-purpose OpenFlow controller.
26 It does not make sense to deploy it routinely or in production.
27 \fBtest\-controller\fR does not provide any features that are not
28 built into Open vSwitch, and lacks many that are built in to Open
29 vSwitch, so adding it to an Open vSwitch deployment actually reduces
30 functionality and performance while increasing latency.
31 .PP
32 \fBtest\-controller\fR manages any number of remote switches over
33 OpenFlow protocol, causing them to function as L2 MAC-learning
34 switches or hub.  The switches it controls are specified as one or
35 more of the following OpenFlow connection methods:
36 .
37 .RS
38 .so lib/vconn-passive.man
39 .so lib/vconn-active.man
40 .RE
41 .
42 .SH OPTIONS
43 .IP "\fB\-n\fR"
44 .IQ "\fB\-\-noflow\fR"
45 By default, \fBtest\-controller\fR sets up a flow in each OpenFlow switch
46 whenever it receives a packet whose destination is known due through
47 MAC learning.  This option disables flow setup, so that every packet
48 in the network passes through the controller.
49 .IP
50 This option is most useful for debugging.  It reduces switching
51 performance, so it should not be used in production.
52 .
53 .TP
54 \fB\-\-max\-idle=\fIsecs\fR|\fBpermanent\fR
55 Sets \fIsecs\fR as the number of seconds that a flow set up by the
56 controller will remain in the switch's flow table without any matching
57 packets being seen.  If \fBpermanent\fR is specified, which is not
58 recommended, flows will never expire.  The default is 60 seconds.
59 .IP
60 This option has no effect when \fB\-n\fR (or \fB\-\-noflow\fR) is in use
61 (because the controller does not set up flows in that case).
62 .
63 .IP "\fB\-H\fR"
64 .IQ "\fB\-\-hub\fR"
65 By default, the controller acts as an L2 MAC-learning switch.  This
66 option changes its behavior to that of a hub that floods packets on
67 all but the incoming port.
68 .IP
69 If \fB\-H\fR (or \fB\-\-hub\fR) and \fB\-n\fR (or \fB\-\-noflow\fR) are used
70 together, then the cumulative effect is that every packet passes
71 through the controller and every packet is flooded.
72 .IP
73 This option is most useful for debugging.  It reduces switching
74 performance, so it should not be used in production.
75 .
76 .IP "\fB\-w\fR[\fIwildcard_mask\fR]"
77 .IQ "\fB\-\-wildcards\fR[\fB=\fIwildcard_mask\fR]\fR"
78 By default, \fBtest\-controller\fR sets up exact-match flows.  This
79 option allows it to set up wildcarded flows, which may reduce
80 flow setup latency by causing less traffic to be sent up to the
81 controller.
82 .IP
83 The optional \fIwildcard_mask\fR is an OpenFlow wildcard bitmask in
84 hexadecimal that specifies the fields to wildcard.  If no
85 \fIwildcard_mask\fR is specified, the default value 0x2820F0 is used
86 which specifies L2-only switching and wildcards L3 and L4 fields.
87 Another interesting value is 0x2000EC, which specifies L3-only
88 switching and wildcards L2 and L4 fields.
89 .IP
90 This option has no effect when \fB\-n\fR (or \fB\-\-noflow\fR) is in use
91 (because the controller does not set up flows in that case).
92 .
93 .IP "\fB\-N\fR"
94 .IQ "\fB\-\-normal\fR"
95 By default, \fBtest\-controller\fR directs packets to a particular port
96 or floods them.  This option causes it to direct non-flooded packets
97 to the OpenFlow \fBOFPP_NORMAL\fR port.  This allows the switch itself
98 to make decisions about packet destinations.  Support for
99 \fBOFPP_NORMAL\fR is optional in OpenFlow, so this option may not well
100 with some non-Open vSwitch switches.
101 .
102 .IP "\fB\-\-mute\fR"
103 Prevents test\-controller from replying to any OpenFlow messages sent
104 to it by switches.
105 .IP
106 This option is only for debugging the Open vSwitch implementation of
107 ``fail open'' mode.  It must not be used in production.
108 .
109 .IP "\fB\-q \fIid\fR"
110 .IQ "\fB\-\-queue=\fIid\fR"
111 By default, \fBtest\-controller\fR uses the default OpenFlow queue for
112 sending packets and setting up flows.  Use one of these options,
113 supplying \fIid\fR as an OpenFlow queue ID as a decimal number, to
114 instead use that specific queue.
115 .IP
116 This option is incompatible with \fB\-N\fR or \fB\-\-normal\fR and
117 with \fB\-H\fR or \fB\-\-hub\fR.  If more than one is specified then
118 this option takes precedence.
119 .IP
120 This option may be useful for testing or debugging quality of service
121 setups.
122 .
123 .IP "\fB\-Q \fIport-name\fB:\fIqueue-id\fR"
124 .IP "\fB\-\-port\-queue \fIport-name\fB:\fIqueue-id\fR"
125 Configures packets received on the port named \fIport-name\fR
126 (e.g. \fBeth0\fR) to be output on OpenFlow queue ID \fIqueue-id\fR
127 (specified as a decimal number).  For the specified port, this option
128 overrides the default specified on \fB\-q\fR or \fB\-\-queue\fR.
129 .IP
130 This option may be specified any number of times with different
131 \fIport-name\fR arguments.
132 .IP
133 This option is incompatible with \fB\-N\fR or \fB\-\-normal\fR and
134 with \fB\-H\fR or \fB\-\-hub\fR.  If more than one is specified then
135 this option takes precedence.
136 .IP
137 This option may be useful for testing or debugging quality of service
138 setups.
139 .
140 .IP "\fB\-\-with\-flows \fIfile\fR"
141 When a switch connects, push the flow entries as described in
142 \fIfile\fR.  Each line in \fIfile\fR is a flow entry in the format
143 described for the \fBadd\-flows\fR command in the \fBFlow Syntax\fR
144 section of the \fBovs\-ofctl\fR(8) man page.
145 .IP
146 Use this option more than once to add flows from multiple files.
147 .
148 .SS "Public Key Infrastructure Options"
149 .so lib/ssl.man
150 .so lib/ssl-peer-ca-cert.man
151 .ds DD
152 .so lib/daemon.man
153 .so lib/vlog.man
154 .so lib/unixctl.man
155 .so lib/common.man
156 .so so lib/ofp-version.man
157 .
158 .SH EXAMPLES
159 .PP
160 To bind locally to port 6633 (the default) and wait for incoming
161 connections from OpenFlow switches:
162 .IP
163 \fB% test\-controller ptcp:\fR
164 .PP
165 In the future, the default port number will change to 6653, which is the
166 IANA-defined value.
167 .SH "BUGS"
168 .PP
169 Configuring a Citrix XenServer to connect to a particular controller
170 only points the remote OVSDB management connection to that controller.
171 It does not also configure OpenFlow connections, because the manager
172 is expected to do that over the management protocol.
173 \fBtest\-controller\fR is not an Open vSwitch manager and does not know
174 how to do that.
175 .PP
176 As a stopgap workaround, \fBovs\-vsctl\fR can wait for an OVSDB
177 connection and set the controller, e.g.:
178 .IP
179 \fB% ovs\-vsctl \-t0 \-\-db=pssl: \-\-certificate=cert.pem
180 \-\-ca\-cert=none \-\-private\-key=privkey.pem
181 \-\-peer\-ca\-cert=cacert.pem set\-controller ssl:\fIip\fR
182 .SH "SEE ALSO"
183 .
184 .BR ovs\-appctl (8),
185 .BR ovs\-ofctl (8),
186 .BR ovs\-dpctl (8)