This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwireless.8
180 lines (179 loc) · 4.7 KB
/
wireless.8
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.\" Copyright (c) 2015, 2016, 2017, Gregor Best <[email protected]>
.\"
.\" Permission to use, copy, modify, and/or 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$
.Dt WIRELESS 8
.Os
.Sh NAME
.Nm wireless
.Nd scan for and configure wireless networks
.Sh SYNOPSIS
.Nm
.Op Ar file
.Sh DESCRIPTION
.Nm
scans for and configures wireless networks on OpenBSD.
It uses
.Xr ifconfig 8
to do most of the heavy lifting and basically just interprets and applies scan results.
.Pp
.Nm
is deprecated since
.Ox 6.4 .
Use the
.Fl join
option of
.Xr ifconfig 8
instead to configure auto-joined wireless networks.
.Sh USAGE
Just run
.Nm
once to scan for known wireless LANs and configure the earliest network in the configuration file, for example:
.Bd -literal -offset indent
$ wireless
\&... wait a bit for scanning and configuration ...
$ dhclient iwn0
.Ed
.Pp
The result of the scan can also be written to a file.
The format of the file is described in
.Sx "CONFIGURATION STATEMENTS"
below.
.Pp
If necessary (see the
.Sx "CONFIGURATION OVERVIEW"
section below),
.Nm
will notify
.Xr wpa_supplicant 8
of the newly established connection by calling
.Pp
.D1 wpa_cli reassoc
.Sh "CONFIGURATION OVERVIEW"
This is an example configuration file:
.Bd -literal -offset indent
device iwn0
dump /var/db/wireless/aps
verbose
open freifunk.paderborn.net
802.1x eduroam
wpa "home network" thisismypassword
.Ed
.Pp
There are three kinds of networks,
.Ic open ,
.Ic wpa
and
.Ic 802.1x .
All of these get an SSID as their first parameter.
.Ic wpa
gets the password or hex key as the second parameter.
SSIDs and passwords which contain spaces can be enclosed in single or double quotes.
Regular string quoting rules apply:
.Pp
.D1 wpa \[dq]Hello\e\[dq]foo\[dq] 'I\e'm a password!'
.Pp
You can include files with the
.Ic include
statement:
.Pp
.D1 include "/home/user/.wireless.conf"
.Pp
Macros can be set and used like this:
.Bd -literal -offset indent
mypw = "foobar! 1234#$"
hexkey = 0x092876e79594ae7beda40dd150d17fa215e51f22cb990f9ec640a267c96fbedf
wpa nw1 $mypw
wpa nw2 $hexkey
.Ed
.Pp
The priority of a network depends on the order of networks in the configuration file.
The earlier a network appears, the higher is its priority.
If an SSID is visible multiple times (such as in campus networks), the access point with the strongest RSSI is chosen.
.Sh CONFIGURATION STATEMENTS
This section outlines the available configuration statements.
.Bl -tag -width Ds
.It Ic debug | Ic verbose
Enables debugging or verbose mode.
See
.Sx DIAGNOSTICS
below for details.
.Pp
Both
.Ic debug
and
.Ic verbose
can be specified at the same time.
.It Ic device Ar name
Use
.Ar name
as the device to configure.
.It Ic dump Pa path
Dump a list of configured networks to
.Pa path .
It contains one line for each access point with the following information:
.Pp
.D1 BSSID RSSI encrypted? known? SSID..
.Pp
There is no default path, which means that if no
.Ic dump
statement is given, the list of networks is not written out.
.It Ic include Pa path
Includes the file
.Pa path
at the point where the
.Ic include
statement appears in the file.
.It Ic open Ar nwid
Defines an unencrypted network.
.It Ic wpa Ar nwid Ar password|hexkey
Defines a WPA2 network.
.It Ic 802.1x Ar nwid
Defines a WPA2 network that uses IEEE 802.1x as the key management scheme.
This requires using
.Xr wpa_supplicant 8
to handle the actual key management.
.El
.Sh FILES
.Bl -tag -width "/etc/wireless.conf" -compact
.It Pa "/etc/wireless.conf"
configuration file
.El
.Sh DIAGNOSTICS
If the keyword
.Ic verbose
is given in the configuration file, the name of the network that is being configured will be printed to the standard error stream.
.Pp
The keyword
.Ic debug
enables behaviour that helps debugging.
Its meaning will change without prior notice, so it should not be used outside of development.
.Sh SEE ALSO
.Xr ifconfig 8 ,
.Xr wpa_passphrase 8 ,
.Xr wpa_supplicant 8
.Sh AUTHORS
.Bl -bullet
.It
.An Gregor Best Aq Mt [email protected]
.It
jggimi (pledging)
.It
spedru (improvements to the
.Xr wpa_supplicant 8
interface)
.It
.An -nosplit
.An Klemens Nanni Aq Mt [email protected]
(improvements to the manpage)
.El