.\" -*- nroff -*- .\" -*- nroff -*- .\" ovs.tmac .\" .\" Open vSwitch troff macro library . . .\" Continuation line for .IP. .de IQ . br . ns . IP "\\$1" .. . .\" Introduces a sub-subsection .de ST . PP . RS -0.15in . I "\\$1" . RE .. . .\" The content between the lines below is from an-ext.tmac in groff .\" 1.21, with some modifications. .\" ---------------------------------------------------------------------- .\" an-ext.tmac .\" .\" Written by Eric S. Raymond .\" Werner Lemberg .\" .\" Version 2007-Feb-02 .\" .\" Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. .\" You may freely use, modify and/or distribute this file. .\" .\" .\" The code below provides extension macros for the `man' macro package. .\" Care has been taken to make the code portable; groff extensions are .\" properly hidden so that all troff implementations can use it without .\" changes. .\" .\" With groff, this file is sourced by the `man' macro package itself. .\" Man page authors who are concerned about portability might add the .\" used macros directly to the prologue of the man page(s). . . .\" Convention: Auxiliary macros and registers start with `m' followed .\" by an uppercase letter or digit. . . .\" Declare start of command synopsis. Sets up hanging indentation. .de SY . ie !\\n(mS \{\ . nh . nr mS 1 . nr mA \\n(.j . ad l . nr mI \\n(.i . \} . el \{\ . br . ns . \} . . HP \w'\fB\\$1\fP\ 'u . B "\\$1" .. . . .\" End of command synopsis. Restores adjustment. .de YS . in \\n(mIu . ad \\n(mA . hy \\n(HY . nr mS 0 .. . . .\" Declare optional option. .de OP . ie \\n(.$-1 \ . RI "[\fB\\$1\fP" "\ \\$2" "]" . el \ . RB "[" "\\$1" "]" .. . . .\" Start URL. .de UR . ds m1 \\$1\" . nh . if \\n(mH \{\ . \" Start diversion in a new environment. . do ev URL-div . do di URL-div . \} .. . . .\" End URL. .de UE . ie \\n(mH \{\ . br . di . ev . . \" Has there been one or more input lines for the link text? . ie \\n(dn \{\ . do HTML-NS "" . \" Yes, strip off final newline of diversion and emit it. . do chop URL-div . do URL-div \c . do HTML-NS . \} . el \ . do HTML-NS "\\*(m1" \&\\$*\" . \} . el \ \\*(la\\*(m1\\*(ra\\$*\" . . hy \\n(HY .. . . .\" Start email address. .de MT . ds m1 \\$1\" . nh . if \\n(mH \{\ . \" Start diversion in a new environment. . do ev URL-div . do di URL-div . \} .. . . .\" End email address. .de ME . ie \\n(mH \{\ . br . di . ev . . \" Has there been one or more input lines for the link text? . ie \\n(dn \{\ . do HTML-NS "" . \" Yes, strip off final newline of diversion and emit it. . do chop URL-div . do URL-div \c . do HTML-NS . \} . el \ . do HTML-NS "\\*(m1" \&\\$*\" . \} . el \ \\*(la\\*(m1\\*(ra\\$*\" . . hy \\n(HY .. . . .\" Continuation line for .TP header. .de TQ . br . ns . TP \\$1\" no doublequotes around argument! .. . . .\" Start example. .de EX . nr mE \\n(.f . nf . nh . ft CR .. . . .\" End example. .de EE . ft \\n(mE . fi . hy \\n(HY .. . .\" EOF .\" ---------------------------------------------------------------------- .TH ovs\-testcontroller 8 "3.3.0" "Open vSwitch" "Open vSwitch Manual" .ds PN ovs\-testcontroller . .SH NAME ovs\-testcontroller \- simple OpenFlow controller for testing . .SH SYNOPSIS .B ovs\-testcontroller [\fIoptions\fR] \fImethod\fR \fB[\fImethod\fR]\&... . .SH DESCRIPTION \fBovs\-testcontroller\fR is a simple OpenFlow controller that manages any number of switches over the OpenFlow protocol, causing them to function as L2 MAC-learning switches or hubs. It is suitable for initial testing of OpenFlow networks. It is not a necessary or desirable part of a production OpenFlow deployment. .PP \fBovs\-testcontroller\fR controls one or more OpenFlow switches, specified as one or more of the following OpenFlow connection methods: . .RS .IP "\fBpssl:\fR[\fIport\fR][\fB:\fIhost\fR]" .IQ "\fBptcp:\fR[\fIport\fR][\fB:\fIhost\fR]" Listens for OpenFlow connections on \fIport\fR. The default \fIport\fR is 6653. By default, connections are allowed from any IPv4 address. Specify \fIhost\fR as an IPv4 address or a bracketed IPv6 address (e.g. \fBptcp:6653:[::1]\fR). On Linux, use \fB%\fIdevice\fR to designate a scope for IPv6 link-level addresses, e.g. \fBptcp:6653:[fe80::1234%eth0]\fR. DNS names can be used if built with unbound library. For \fBpssl\fR, the \fB\-\-private\-key\fR,\fB\-\-certificate\fR, and \fB\-\-ca\-cert\fR options are mandatory. .IP . .IP "\fBpunix:\fIfile\fR" Listens for OpenFlow connections on the Unix domain server socket named \fIfile\fR. .IP "\fBssl:\fIhost\fR[\fB:\fIport\fR]" .IQ "\fBtcp:\fIhost\fR[\fB:\fIport\fR]" The specified \fIport\fR on the given \fIhost\fR, which can be expressed either as a DNS name (if built with unbound library) or an IP address in IPv4 or IPv6 address format. Wrap IPv6 addresses in square brackets, e.g. \fBtcp:[::1]:6653\fR. On Linux, use \fB%\fIdevice\fR to designate a scope for IPv6 link-level addresses, e.g. \fBtcp:[fe80::1234%eth0]:6653\fR. For \fBssl\fR, the \fB\-\-private\-key\fR, \fB\-\-certificate\fR, and \fB\-\-ca\-cert\fR options are mandatory. .IP If \fIport\fR is not specified, it defaults to 6653. .TP \fBunix:\fIfile\fR On POSIX, a Unix domain server socket named \fIfile\fR. .IP On Windows, connect to a local named pipe that is represented by a file created in the path \fIfile\fR to mimic the behavior of a Unix domain socket. .RE . .SH OPTIONS .IP "\fB\-n\fR" .IQ "\fB\-\-noflow\fR" By default, \fBovs\-testcontroller\fR sets up a flow in each OpenFlow switch whenever it receives a packet whose destination is known due through MAC learning. This option disables flow setup, so that every packet in the network passes through the controller. .IP This option is most useful for debugging. It reduces switching performance, so it should not be used in production. . .TP \fB\-\-max\-idle=\fIsecs\fR|\fBpermanent\fR Sets \fIsecs\fR as the number of seconds that a flow set up by the controller will remain in the switch's flow table without any matching packets being seen. If \fBpermanent\fR is specified, which is not recommended, flows will never expire. The default is 60 seconds. .IP This option has no effect when \fB\-n\fR (or \fB\-\-noflow\fR) is in use (because the controller does not set up flows in that case). . .IP "\fB\-H\fR" .IQ "\fB\-\-hub\fR" By default, the controller acts as an L2 MAC-learning switch. This option changes its behavior to that of a hub that floods packets on all but the incoming port. .IP If \fB\-H\fR (or \fB\-\-hub\fR) and \fB\-n\fR (or \fB\-\-noflow\fR) are used together, then the cumulative effect is that every packet passes through the controller and every packet is flooded. .IP This option is most useful for debugging. It reduces switching performance, so it should not be used in production. . .IP "\fB\-w\fR[\fIwildcard_mask\fR]" .IQ "\fB\-\-wildcards\fR[\fB=\fIwildcard_mask\fR]\fR" By default, \fBovs\-testcontroller\fR sets up exact-match flows. This option allows it to set up wildcarded flows, which may reduce flow setup latency by causing less traffic to be sent up to the controller. .IP The optional \fIwildcard_mask\fR is an OpenFlow wildcard bitmask in hexadecimal that specifies the fields to wildcard. If no \fIwildcard_mask\fR is specified, the default value 0x2820F0 is used which specifies L2-only switching and wildcards L3 and L4 fields. Another interesting value is 0x2000EC, which specifies L3-only switching and wildcards L2 and L4 fields. .IP This option has no effect when \fB\-n\fR (or \fB\-\-noflow\fR) is in use (because the controller does not set up flows in that case). . .IP "\fB\-N\fR" .IQ "\fB\-\-normal\fR" By default, \fBovs\-testcontroller\fR directs packets to a particular port or floods them. This option causes it to direct non-flooded packets to the OpenFlow \fBOFPP_NORMAL\fR port. This allows the switch itself to make decisions about packet destinations. Support for \fBOFPP_NORMAL\fR is optional in OpenFlow, so this option may not well with some non-Open vSwitch switches. . .IP "\fB\-\-mute\fR" Prevents ovs\-testcontroller from replying to any OpenFlow messages sent to it by switches. .IP This option is only for debugging the Open vSwitch implementation of ``fail open'' mode. It must not be used in production. . .IP "\fB\-q \fIid\fR" .IQ "\fB\-\-queue=\fIid\fR" By default, \fBovs\-testcontroller\fR uses the default OpenFlow queue for sending packets and setting up flows. Use one of these options, supplying \fIid\fR as an OpenFlow queue ID as a decimal number, to instead use that specific queue. .IP This option is incompatible with \fB\-N\fR or \fB\-\-normal\fR and with \fB\-H\fR or \fB\-\-hub\fR. If more than one is specified then this option takes precedence. .IP This option may be useful for testing or debugging quality of service setups. . .IP "\fB\-Q \fIport-name\fB:\fIqueue-id\fR" .IP "\fB\-\-port\-queue \fIport-name\fB:\fIqueue-id\fR" Configures packets received on the port named \fIport-name\fR (e.g. \fBeth0\fR) to be output on OpenFlow queue ID \fIqueue-id\fR (specified as a decimal number). For the specified port, this option overrides the default specified on \fB\-q\fR or \fB\-\-queue\fR. .IP This option may be specified any number of times with different \fIport-name\fR arguments. .IP This option is incompatible with \fB\-N\fR or \fB\-\-normal\fR and with \fB\-H\fR or \fB\-\-hub\fR. If more than one is specified then this option takes precedence. .IP This option may be useful for testing or debugging quality of service setups. . .IP "\fB\-\-with\-flows \fIfile\fR" When a switch connects, push the flow entries as described in \fIfile\fR. Each line in \fIfile\fR is a flow entry in the format described for the \fBadd\-flows\fR command in the \fBFlow Syntax\fR section of the \fBovs\-ofctl\fR(8) man page. .IP Use this option more than once to add flows from multiple files. . .SS "Public Key Infrastructure Options" .IP "\fB\-p\fR \fIprivkey.pem\fR" .IQ "\fB\-\-private\-key=\fIprivkey.pem\fR" Specifies a PEM file containing the private key used as \fB\*(PN\fR's identity for outgoing SSL connections. . .IP "\fB\-c\fR \fIcert.pem\fR" .IQ "\fB\-\-certificate=\fIcert.pem\fR" Specifies a PEM file containing a certificate that certifies the private key specified on \fB\-p\fR or \fB\-\-private\-key\fR to be trustworthy. The certificate must be signed by the certificate authority (CA) that the peer in SSL connections will use to verify it. . .IP "\fB\-C\fR \fIcacert.pem\fR" .IQ "\fB\-\-ca\-cert=\fIcacert.pem\fR" Specifies a PEM file containing the CA certificate that \fB\*(PN\fR should use to verify certificates presented to it by SSL peers. (This may be the same certificate that SSL peers use to verify the certificate specified on \fB\-c\fR or \fB\-\-certificate\fR, or it may be a different one, depending on the PKI design in use.) . .IP "\fB\-C none\fR" .IQ "\fB\-\-ca\-cert=none\fR" Disables verification of certificates presented by SSL peers. This introduces a security risk, because it means that certificates cannot be verified to be those of known trusted hosts. .IP "\fB\-\-peer\-ca\-cert=\fIpeer-cacert.pem\fR" Specifies a PEM file that contains one or more additional certificates to send to SSL peers. \fIpeer-cacert.pem\fR should be the CA certificate used to sign \fB\*(PN\fR's own certificate, that is, the certificate specified on \fB\-c\fR or \fB\-\-certificate\fR. If \fB\*(PN\fR's certificate is self-signed, then \fB\-\-certificate\fR and \fB\-\-peer\-ca\-cert\fR should specify the same file. .IP This option is not useful in normal operation, because the SSL peer must already have the CA certificate for the peer to have any confidence in \fB\*(PN\fR's identity. However, this offers a way for a new installation to bootstrap the CA certificate on its first SSL connection. .ds DD .SS "Daemon Options" .PP The following options are valid on POSIX based platforms. .TP \fB\-\-pidfile\fR[\fB=\fIpidfile\fR] Causes a file (by default, \fB\*(PN.pid\fR) to be created indicating the PID of the running process. If the \fIpidfile\fR argument is not specified, or if it does not begin with \fB/\fR, then it is created in \fB/var/run/openvswitch\fR. .IP If \fB\-\-pidfile\fR is not specified, no pidfile is created. . .TP \fB\-\-overwrite\-pidfile\fR By default, when \fB\-\-pidfile\fR is specified and the specified pidfile already exists and is locked by a running process, \fB\*(PN\fR refuses to start. Specify \fB\-\-overwrite\-pidfile\fR to cause it to instead overwrite the pidfile. .IP When \fB\-\-pidfile\fR is not specified, this option has no effect. . .IP \fB\-\-detach\fR Runs \fB\*(PN\fR as a background process. The process forks, and in the child it starts a new session, closes the standard file descriptors (which has the side effect of disabling logging to the console), and changes its current directory to the root (unless \fB\-\-no\-chdir\fR is specified). After the child completes its initialization, the parent exits. \*(DD . .TP \fB\-\-monitor\fR Creates an additional process to monitor the \fB\*(PN\fR daemon. If the daemon dies due to a signal that indicates a programming error (\fBSIGABRT\fR, \fBSIGALRM\fR, \fBSIGBUS\fR, \fBSIGFPE\fR, \fBSIGILL\fR, \fBSIGPIPE\fR, \fBSIGSEGV\fR, \fBSIGXCPU\fR, or \fBSIGXFSZ\fR) then the monitor process starts a new copy of it. If the daemon dies or exits for another reason, the monitor process exits. .IP This option is normally used with \fB\-\-detach\fR, but it also functions without it. . .TP \fB\-\-no\-chdir\fR By default, when \fB\-\-detach\fR is specified, \fB\*(PN\fR changes its current working directory to the root directory after it detaches. Otherwise, invoking \fB\*(PN\fR from a carelessly chosen directory would prevent the administrator from unmounting the file system that holds that directory. .IP Specifying \fB\-\-no\-chdir\fR suppresses this behavior, preventing \fB\*(PN\fR from changing its current working directory. This may be useful for collecting core files, since it is common behavior to write core dumps into the current working directory and the root directory is not a good directory to use. .IP This option has no effect when \fB\-\-detach\fR is not specified. . .TP \fB\-\-no\-self\-confinement\fR By default daemon will try to self-confine itself to work with files under well-known directories determined during build. It is better to stick with this default behavior and not to use this flag unless some other Access Control is used to confine daemon. Note that in contrast to other access control implementations that are typically enforced from kernel-space (e.g. DAC or MAC), self-confinement is imposed from the user-space daemon itself and hence should not be considered as a full confinement strategy, but instead should be viewed as an additional layer of security. . .TP \fB\-\-user\fR Causes \fB\*(PN\fR to run as a different user specified in "user:group", thus dropping most of the root privileges. Short forms "user" and ":group" are also allowed, with current user or group are assumed respectively. Only daemons started by the root user accepts this argument. .IP On Linux, daemons will be granted CAP_IPC_LOCK and CAP_NET_BIND_SERVICES before dropping root privileges. Daemons that interact with a datapath, such as \fBovs\-vswitchd\fR, will be granted three additional capabilities, namely CAP_NET_ADMIN, CAP_NET_BROADCAST and CAP_NET_RAW. The capability change will apply even if the new user is root. .IP On Windows, this option is not currently supported. For security reasons, specifying this option will cause the daemon process not to start. .IP "\fB\-v\fR[\fIspec\fR] .IQ "\fB\-\-verbose=\fR[\fIspec\fR] . Sets logging levels. Without any \fIspec\fR, sets the log level for every module and destination to \fBdbg\fR. Otherwise, \fIspec\fR is a list of words separated by spaces or commas or colons, up to one from each category below: . .RS .IP \(bu A valid module name, as displayed by the \fBvlog/list\fR command on \fBovs\-appctl\fR(8), limits the log level change to the specified module. . .IP \(bu \fBsyslog\fR, \fBconsole\fR, or \fBfile\fR, to limit the log level change to only to the system log, to the console, or to a file, respectively. (If \fB\-\-detach\fR is specified, \fB\*(PN\fR closes its standard file descriptors, so logging to the console will have no effect.) .IP On Windows platform, \fBsyslog\fR is accepted as a word and is only useful along with the \fB\-\-syslog\-target\fR option (the word has no effect otherwise). . .IP \(bu \fBoff\fR, \fBemer\fR, \fBerr\fR, \fBwarn\fR, \fBinfo\fR, or \fBdbg\fR, to control the log level. Messages of the given severity or higher will be logged, and messages of lower severity will be filtered out. \fBoff\fR filters out all messages. See \fBovs\-appctl\fR(8) for a definition of each log level. .RE . .IP Case is not significant within \fIspec\fR. .IP Regardless of the log levels set for \fBfile\fR, logging to a file will not take place unless \fB\-\-log\-file\fR is also specified (see below). .IP For compatibility with older versions of OVS, \fBany\fR is accepted as a word but has no effect. . .IP "\fB\-v\fR" .IQ "\fB\-\-verbose\fR" Sets the maximum logging verbosity level, equivalent to \fB\-\-verbose=dbg\fR. . .IP "\fB\-vPATTERN:\fIdestination\fB:\fIpattern\fR" .IQ "\fB\-\-verbose=PATTERN:\fIdestination\fB:\fIpattern\fR" Sets the log pattern for \fIdestination\fR to \fIpattern\fR. Refer to \fBovs\-appctl\fR(8) for a description of the valid syntax for \fIpattern\fR. . .IP "\fB\-vFACILITY:\fIfacility\fR" .IQ "\fB\-\-verbose=FACILITY:\fIfacility\fR" Sets the RFC5424 facility of the log message. \fIfacility\fR can be one of \fBkern\fR, \fBuser\fR, \fBmail\fR, \fBdaemon\fR, \fBauth\fR, \fBsyslog\fR, \fBlpr\fR, \fBnews\fR, \fBuucp\fR, \fBclock\fR, \fBftp\fR, \fBntp\fR, \fBaudit\fR, \fBalert\fR, \fBclock2\fR, \fBlocal0\fR, \fBlocal1\fR, \fBlocal2\fR, \fBlocal3\fR, \fBlocal4\fR, \fBlocal5\fR, \fBlocal6\fR or \fBlocal7\fR. If this option is not specified, \fBdaemon\fR is used as the default for the local system syslog and \fBlocal0\fR is used while sending a message to the target provided via the \fB\-\-syslog\-target\fR option. . .TP \fB\-\-log\-file\fR[\fB=\fIfile\fR] Enables logging to a file. If \fIfile\fR is specified, then it is used as the exact name for the log file. The default log file name used if \fIfile\fR is omitted is \fB/var/log/openvswitch/\*(PN.log\fR. . .IP "\fB\-\-syslog\-target=\fIhost\fB:\fIport\fR" Send syslog messages to UDP \fIport\fR on \fIhost\fR, in addition to the system syslog. The \fIhost\fR must be a numerical IP address, not a hostname. . .IP "\fB\-\-syslog\-method=\fImethod\fR" Specify \fImethod\fR how syslog messages should be sent to syslog daemon. Following forms are supported: .RS .IP \(bu \fBlibc\fR, use libc \fBsyslog()\fR function. Downside of using this options is that libc adds fixed prefix to every message before it is actually sent to the syslog daemon over \fB/dev/log\fR UNIX domain socket. .IP \(bu \fBunix:\fIfile\fR\fR, use UNIX domain socket directly. It is possible to specify arbitrary message format with this option. However, \fBrsyslogd 8.9\fR and older versions use hard coded parser function anyway that limits UNIX domain socket use. If you want to use arbitrary message format with older \fBrsyslogd\fR versions, then use UDP socket to localhost IP address instead. .IP \(bu \fBudp:\fIip\fR:\fIport\fR\fR, use UDP socket. With this method it is possible to use arbitrary message format also with older \fBrsyslogd\fR. When sending syslog messages over UDP socket extra precaution needs to be taken into account, for example, syslog daemon needs to be configured to listen on the specified UDP port, accidental iptables rules could be interfering with local syslog traffic and there are some security considerations that apply to UDP sockets, but do not apply to UNIX domain sockets. .IP \(bu \fBnull\fR, discards all messages logged to syslog. .RE .IP The default is taken from the \fBOVS_SYSLOG_METHOD\fR environment variable; if it is unset, the default is \fBlibc\fR. .IP "\fB\-\-unixctl=\fIsocket\fR" Sets the name of the control socket on which \fB\*(PN\fR listens for runtime management commands (see \fBRUNTIME MANAGEMENT COMMANDS\fR, below). If \fIsocket\fR does not begin with \fB/\fR, it is interpreted as relative to \fB/var/run/openvswitch\fR. If \fB\-\-unixctl\fR is not used at all, the default socket is \fB/var/run/openvswitch/\*(PN.\fIpid\fB.ctl\fR, where \fIpid\fR is \fB\*(PN\fR's process ID. .IP On Windows a local named pipe is used to listen for runtime management commands. A file is created in the absolute path as pointed by \fIsocket\fR or if \fB\-\-unixctl\fR is not used at all, a file is created as \fB\*(PN.ctl\fR in the configured \fIOVS_RUNDIR\fR directory. The file exists just to mimic the behavior of a Unix domain socket. .IP Specifying \fBnone\fR for \fIsocket\fR disables the control socket feature. .IP "\fB\-h\fR" .IQ "\fB\-\-help\fR" Prints a brief help message to the console. . .IP "\fB\-V\fR" .IQ "\fB\-\-version\fR" Prints version information to the console. .IP "\fB\-O \fR[\fIversion\fR[\fB,\fIversion\fR]...]\fR" .IQ "\fB\-\-protocols=\fR[\fIversion\fR[\fB,\fIversion\fR]...]\fR" Sets the OpenFlow protocol versions that are allowed when establishing an OpenFlow session. . .IP These protocol versions are enabled by default: . .RS .IP \(bu \fBOpenFlow10\fR, for OpenFlow 1.0. .RE . The following protocol versions are generally supported, but for compatibility with older versions of Open vSwitch they are not enabled by default: . .RS .IP \(bu \fBOpenFlow11\fR, for OpenFlow 1.1. . .IP \(bu \fBOpenFlow12\fR, for OpenFlow 1.2. . .IP \(bu \fBOpenFlow13\fR, for OpenFlow 1.3. . .IP \(bu \fBOpenFlow14\fR, for OpenFlow 1.4. . .IP \(bu \fBOpenFlow15\fR, for OpenFlow 1.5. .RE . .SH EXAMPLES .PP To bind locally to port 6653 (the default) and wait for incoming connections from OpenFlow switches: .IP \fB% ovs\-testcontroller ptcp:\fR .SH "SEE ALSO" . .BR ovs\-appctl (8), .BR ovs\-ofctl (8), .BR ovs\-dpctl (8)