.\" $OpenBSD: switchd.conf.5,v 1.9 2018/11/11 00:11:01 akoshibe Exp $ .\" .\" Copyright (c) 2014, 2015, 2016 Reyk Floeter .\" Copyright (c) 2016 YASUOKA Masahiko .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" The following requests are required for all man pages. .\" .Dd $Mdocdate: November 11 2018 $ .Dt SWITCHD.CONF 5 .Os .Sh NAME .Nm switchd.conf .Nd switch daemon configuration file .Sh DESCRIPTION .Nm is the configuration file for the switch daemon, .Xr switchd 8 . .Pp .Nm files is divided into the following main sections: .Bl -tag -width xxxx .It Sy Macros User-defined variables may be defined and used later, simplifying the configuration file. .It Sy Global Configuration Global runtime settings for .Xr switchd 8 . .El .Pp The current line can be extended over multiple lines using a backslash .Pq Sq \e . Comments can be put anywhere in the file using a hash mark .Pq Sq # , and extend to the end of the current line. Care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block. .Pp Argument names not beginning with a letter, digit, or underscore must be quoted. .Pp Additional configuration files can be included with the .Ic include keyword, for example: .Bd -literal -offset indent include "/etc/switchd.conf.local" .Ed .Sh MACROS Macros can be defined that will later be expanded in context. Macro names must start with a letter, digit, or underscore, and may contain any of those characters. Macro names may not be reserved words (for example, .Ic directory , .Ic log , or .Ic root ) . Macros are not expanded inside quotes. .Pp For example: .Bd -literal -offset indent ext_ip="10.0.0.1" listen on $ext_ip .Ed .Sh GLOBAL CONFIGURATION The following options can be set globally: .Bl -tag -width Ds .It Ic listen on Ar address Oo Ic tls Oc Op Ic port Ar port Set the listen address and port to accept connections from remote OpenFlow switches. Secure connections can be enabled with the optional .Ic tls keyword. By default, .Xr switchd 8 uses port 6653 and listen address 0.0.0.0. .\".It Ic device on Ar device-name Oo Ic forward to Ar uri Oc .\"Attach to a .\".Xr switch 4 .\"device. .\"When attached, .\".Xr switchd 8 .\"will accept OpenFlow messages from the connected kernel interface. .\"The daemon either handles the requests locally or sends them to a remote .\"controller if the .\".Ic forward to .\"directive is set. .\"The .\".Ar uri .\"is the method and address to connect to the remote controller, .\"with the format .\".Ar protocol:address:port .\"where the .\".Ar protocol .\"can be either .\".Dq tcp .\"or .\".Dq tls . .El .Sh EXAMPLES The following example is a typical one. .Bd -literal -offset indent listen on 0.0.0.0 port 6633 .\"device "/dev/switch0" .\"device "/dev/switch1" forward to tcp:192.168.0.1:6633 .Ed .Sh SEE ALSO .Xr switchctl 8 , .Xr switchd 8