summaryrefslogtreecommitdiff
path: root/usr.sbin/switchctl/switchctl.8
blob: 9874e7a6fdefd45e7c689772d015400c56e7fac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.\" $OpenBSD: switchctl.8,v 1.6 2018/10/21 21:10:24 akoshibe Exp $
.\"
.\" Copyright (c) 2007-2015 Reyk Floeter <reyk@openbsd.org>
.\"
.\" 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.
.\"
.Dd $Mdocdate: October 21 2018 $
.Dt SWITCHCTL 8
.Os
.Sh NAME
.Nm switchctl
.Nd control the SDN flow controller
.Sh SYNOPSIS
.Nm
.Op Fl q
.Op Fl s Ar socket
.Ar command
.Op Ar arg ...
.Sh DESCRIPTION
The
.Nm
program controls the
.Xr switchd 8
daemon.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl q
Don't ask for confirmation of any default options.
.It Fl s Ar socket
Use
.Ar socket
instead of the default
.Pa /var/run/switchd.sock
to communicate with
.Xr switchd 8 .
.El
.Pp
The following commands are available to control
.Xr switchd 8 :
.Bl -tag -width Ds
.It Cm connect Ar address Op Cm forward-to Ar address
Connect to a new switch by
.Ar address ,
for example
.Ar 10.1.1.1 ,
or a
.Xr switch 4
control device, for example
.Pa /dev/switch0 .
.Nm switchd
will forward all OpenFlow requests of the switch to a remote controller
if the optional
.Cm forward-to
.Ar address
is specified.
.It Cm disconnect Ar address
Close the client connection to a remote switch or a
.Xr switch 4
control device.
.It Cm dump Ar address request
Request information from a remote switch or a
.Xr switch 4
control device.
.Nm
will send an OpenFlow request to the remote switch that is specified by
.Ar address .
The
.Ar request
can be one of the following:
.Pp
.Bl -tag -width features -offset indent -compact
.It Cm desc
Request the switch description.
.It Cm features
Request the switch features.
.It Cm flows
Request the tables and flows.
.It Cm tables
Request the tables.
.El
.It Cm load Ar filename address
Reload the configuration from the specified file.
.It Cm log brief
Disable verbose logging.
.It Cm log verbose
Enable verbose logging.
.It Cm monitor
Monitor internal messages of the
.Xr switchd 8
subsystems.
.It Cm reload
Reload the configuration from the default configuration file.
.It Cm reset all
Reset the running state.
.It Cm show macs
Display all known mac addresses.
.It Cm show summary
Display a list of all switches and mac addresses.
.It Cm show switches
Display all known switches.
.El
.Sh FILES
.Bl -tag -width "/var/run/switchd.sockXX" -compact
.It /etc/switchd.conf
Active configuration.
.It /var/run/switchd.sock
default
.Ux Ns -domain
socket used for communication with
.Xr switchd 8
.El
.Sh SEE ALSO
.Xr bridge 4 ,
.Xr switchd.conf 5 ,
.Xr switchd 8
.Sh HISTORY
The
.Nm
program first appeared in
.Ox 6.1 .
.Sh AUTHORS
The
.Nm
program was written by
.An Reyk Floeter Aq Mt reyk@openbsd.org .