Only build nm.h if necessary. GC tm.h and xm.h.
[dragonfly.git] / usr.sbin / wicontrol / wicontrol.8
1 .\" Copyright (c) 1997, 1998, 1999
2 .\"     Bill Paul <wpaul@ctr.columbia.edu> All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by Bill Paul.
15 .\" 4. Neither the name of the author nor the names of any co-contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"   without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
23 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 .\" THE POSSIBILITY OF SUCH DAMAGE.
30 .\"
31 .\" $FreeBSD: src/usr.sbin/wicontrol/wicontrol.8,v 1.14.2.12 2003/01/31 11:16:16 dwmalone Exp $
32 .\" $DragonFly: src/usr.sbin/wicontrol/Attic/wicontrol.8,v 1.5 2007/09/29 08:33:47 swildner Exp $
33 .\"
34 .Dd April 21, 1999
35 .Dt WICONTROL 8
36 .Os
37 .Sh NAME
38 .Nm wicontrol
39 .Nd configure WaveLAN/IEEE devices
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl i
43 .Ar iface Op Fl o
44 .Nm
45 .Op Fl i
46 .Ar iface Fl t Ar tx_rate
47 .Nm
48 .Op Fl i
49 .Ar iface Fl n Ar network_name
50 .Nm
51 .Op Fl i
52 .Ar iface Fl s Ar station_name
53 .Nm
54 .Op Fl i
55 .Ar iface Fl c Cm 0 | 1
56 .Nm
57 .Op Fl i
58 .Ar iface Fl q Ar SSID
59 .Nm
60 .Op Fl i
61 .Ar iface Fl p Ar port_type
62 .Nm
63 .Op Fl i
64 .Ar iface Fl a Ar access_point_density
65 .Nm
66 .Op Fl i
67 .Ar iface Fl m Ar mac_address
68 .Nm
69 .Op Fl i
70 .Ar iface Fl d Ar max_data_length
71 .Nm
72 .Op Fl i
73 .Ar iface Fl e Cm 0 | 1
74 .Nm
75 .Op Fl i
76 .Ar iface Fl k Ar key
77 .Op Fl v Cm 1 | 2 | 3 | 4
78 .Nm
79 .Op Fl i
80 .Ar iface Fl T Cm 1 | 2 | 3 | 4
81 .Nm
82 .Op Fl i
83 .Ar iface Fl r Ar RTS_threshold
84 .Nm
85 .Op Fl i
86 .Ar iface Fl f Ar frequency
87 .Nm
88 .Op Fl i
89 .Ar iface Fl P Cm 0 | 1
90 .Nm
91 .Op Fl i
92 .Ar iface Fl S Ar max_sleep_duration
93 .Nm
94 .Op Fl i
95 .Ar iface Fl C
96 (display signal cache)
97 .Nm
98 .Op Fl i
99 .Ar iface Fl L
100 (list avail access points)
101 .Nm
102 .Op Fl i
103 .Ar iface Fl l
104 (dump associated stations)
105 .Sh DESCRIPTION
106 The
107 .Nm
108 utility controls the operation of WaveLAN/IEEE wireless networking
109 devices via the
110 .Xr wi 4
111 driver.
112 Most of the parameters that can be changed relate to the
113 IEEE 802.11 protocol which the WaveLAN implements.
114 This includes
115 the station name, whether the station is operating in ad-hoc (point
116 to point) or BSS (service set) mode, and the network name of a service
117 set to join (IBSS) if BSS mode is enabled.
118 The
119 .Nm
120 utility can also be used to view the current settings of these parameters
121 and to dump out the values of the card's statistics counters.
122 .Pp
123 The
124 .Ar iface
125 argument given to
126 .Nm
127 should be the logical interface name associated with the WaveLAN/IEEE
128 device
129 .Li ( wi0 , wi1 ,
130 etc.).
131 If none is specified then
132 .Dq Li wi0
133 is used as default.
134 .Sh OPTIONS
135 The options are as follows:
136 .Bl -tag -width indent
137 .It Oo Fl i Oc Ar iface Op Fl o
138 Display the current settings of the specified WaveLAN/IEEE interface.
139 This retrieves the current card settings from the driver and prints them
140 out.
141 Using the additional
142 .Fl o
143 flag will cause
144 .Nm
145 to print out the statistics counters instead of the card settings.
146 Encryption keys are only displayed if
147 .Nm
148 is run as root.
149 .It Oo Fl i Oc Ar iface Fl t Ar tx_rate
150 Set the transmit rate of the specified interface.
151 The legal values
152 for the transmit rate vary depending on whether the interface is a
153 standard WaveLAN/IEEE or a WaveLAN/IEEE Turbo adapter.
154 The standard
155 NICs support a maximum transmit rate of 2Mbps while the turbo NICs
156 support a maximum speed of 6Mbps.
157 The following table shows the
158 legal transmit rate settings and the corresponding transmit speeds:
159 .Bl -column ".Em TX\ rate" ".Em NIC\ speed" -offset indent
160 .Em "TX rate    NIC speed"
161 .It Cm 1 Ta "Fixed Low (1Mbps)"
162 .It Cm 2 Ta "Fixed Standard (2Mbps)"
163 .It Cm 3 Ta "Auto Rate Select (High)"
164 .It Cm 4 Ta "Fixed Medium (4Mbps)"
165 .It Cm 5 Ta "Fixed High (6Mbps)"
166 .It Cm 6 Ta "Auto Rate Select (Standard)"
167 .It Cm 7 Ta "Auto Rate Select (Medium)"
168 .El
169 .Pp
170 The standard NICs support only settings
171 .Cm 1
172 through
173 .Cm 3 .
174 Turbo NICs support all the above listed speed settings.
175 The default driver setting is
176 .Cm 3
177 (auto rate select).
178 .It Oo Fl i Oc Ar iface Fl n Ar network_name
179 Set the name of the service set (IBSS) that this station wishes to
180 join.
181 The
182 .Ar network_name
183 can be any text string up to 30 characters in length.
184 The default name
185 is the string
186 .Dq Li ANY
187 which should allow the station to connect to the first
188 available access point.
189 The interface should be set for BSS mode using
190 the
191 .Fl p
192 flag in order for this to work.
193 .Pp
194 Note: the WaveLAN manual indicates that an empty string will allow the
195 host to connect to any access point, however I have also seen a reference
196 in another driver which indicates that the
197 .Dq Li ANY
198 string works as well.
199 .It Oo Fl i Oc Ar iface Fl s Ar station_name
200 Sets the
201 station name
202 for the specified interface.
203 The
204 .Ar station_name
205 is used for diagnostic purposes.
206 The
207 .Tn "Lucent WaveMANAGER"
208 software can
209 poll the names of remote hosts.
210 .It Oo Fl i Oc Ar iface Fl c Cm 0 | 1
211 Allow the station to create a service set (IBSS).
212 Permitted values are
213 .Cm 0
214 (don't create IBSS) and
215 .Cm 1
216 (enable creation of IBSS).
217 The default is
218 .Cm 0 .
219 .Pp
220 Note: this option is provided for experimental purposes only: enabling
221 the creation of an IBSS on a host system doesn't appear to actually work.
222 .It Oo Fl i Oc Ar iface Fl q Ar SSID
223 Specify the name of an IBSS (SSID) to create on a given interface.
224 The
225 .Ar SSID
226 can be any text string up to 30 characters long.
227 .Pp
228 Note: this option is provided for experimental purposes only: enabling
229 the creation of an IBSS on a host system doesn't appear to actually work.
230 .It Oo Fl i Oc Ar iface Fl p Ar port_type
231 Set the
232 port type
233 for a specified interface.
234 The legal values for
235 .Ar port_type
236 are
237 .Cm 1
238 (BSS mode) and
239 .Cm 3
240 (ad-hoc) mode.
241 In ad-hoc mode, the station can
242 communicate directly with any other stations within direct radio range
243 (provided that they are also operating in ad-hoc mode).
244 In BSS mode,
245 hosts must associate with a service set controlled by an access point,
246 which relays traffic between end stations.
247 The default setting is
248 .Cm 3
249 (ad-hoc mode).
250 .It Oo Fl i Oc Ar iface Fl a Ar access_point_density
251 Specify the
252 access point density
253 for a given interface.
254 Legal values are
255 .Cm 1
256 (low),
257 .Cm 2
258 (medium) and
259 .Cm 3
260 (high).
261 This setting influences some of the radio modem threshold settings.
262 .It Oo Fl i Oc Ar iface Fl m Ar mac_address
263 Set the station address for the specified interface.
264 The
265 .Ar mac_address
266 is specified as a series of six hexadecimal values separated by colons,
267 e.g.,
268 .Dq Li 00:60:1d:12:34:56 .
269 This programs the new address into the card
270 and updates the interface as well.
271 .It Oo Fl i Oc Ar iface Fl d Ar max_data_length
272 Set the maximum receive and transmit frame size for a specified interface.
273 The
274 .Ar max_data_length
275 can be any number from 350 to 2304.
276 The default is 2304.
277 .It Oo Fl i Oc Ar iface Fl e Cm 0 | 1
278 Enable or disable WEP encryption.
279 Permitted values are
280 .Cm 0
281 (encryption disabled) or
282 .Cm 1
283 (encryption enabled).
284 Encryption is off by default.
285 .Pp
286 Both 128-bit and 64-bit WEP have been broken.
287 See the
288 .Sx BUGS
289 section for details.
290 .It Oo Fl i Oc Ar iface Fl k Ar key Op Fl v Cm 1 | 2 | 3 | 4
291 Set WEP encryption keys.
292 There are four default encryption keys
293 that can be programmed.
294 A specific key can be set using
295 the
296 .Fl v
297 flag.
298 If the
299 .Fl v
300 flag is not specified, the first key will be set.
301 Encryption keys
302 can either be normal text (i.e.\&
303 .Dq Li hello )
304 or a series of hexadecimal digits (i.e.\&
305 .Dq Li 0x1234512345 ) .
306 For
307 WaveLAN Turbo Silver cards, the key is restricted to 40 bits, hence
308 the key can be either a 5 character text string or 10 hex digits.
309 For WaveLAN Turbo Gold cards, the key can also be 104 bits,
310 which means the key can be specified as either a 13 character text
311 string or 26 hex digits in addition to the formats supported by the
312 Silver cards.
313 .Pp
314 Note: Both 128-bit and 64-bit WEP have been broken.
315 See the
316 .Sx BUGS
317 section for details.
318 .It Oo Fl i Oc Ar iface Fl T Cm 1 | 2 | 3 | 4
319 Specify which of the four WEP encryption keys will be used to
320 encrypt transmitted packets.
321 .Pp
322 Note: Both 128-bit and 64-bit WEP have been broken.
323 See the
324 .Sx BUGS
325 section for details.
326 .It Oo Fl i Oc Ar iface Fl r Ar RTS_threshold
327 Set the RTS/CTS threshold for a given interface.
328 This controls the
329 number of bytes used for the RTS/CTS handshake boundary.
330 The
331 .Ar RTS_threshold
332 can be any value between 0 and 2347.
333 The default is 2347.
334 .It Oo Fl i Oc Ar iface Fl f Ar frequency
335 Set the radio frequency of a given interface.
336 The
337 .Ar frequency
338 should be specified as a channel ID as shown in the table below.
339 The
340 list of available frequencies is dependent on radio regulations specified
341 by regional authorities.
342 Recognized regulatory authorities include
343 the FCC (United States), ETSI (Europe), France and Japan.
344 Frequencies
345 in the table are specified in MHz.
346 .Bl -column ".Em Channel\ ID" ".Em FCC" ".Em ETSI" ".Em France" ".Em Japan" -offset indent
347 .Em "Channel ID FCC     ETSI    France  Japan"
348 .It Cm 1 Ta "2412       2412    -       2412"
349 .It Cm 2 Ta "2417       2417    -       2417"
350 .It Cm 3 Ta "2422       2422    -       2422"
351 .It Cm 4 Ta "2427       2427    -       2427"
352 .It Cm 5 Ta "2432       2432    -       2432"
353 .It Cm 6 Ta "2437       2437    -       2437"
354 .It Cm 7 Ta "2442       2442    -       2442"
355 .It Cm 8 Ta "2447       2447    -       2447"
356 .It Cm 9 Ta "2452       2452    -       2452"
357 .It Cm 10 Ta "2457      2457    2457    2457"
358 .It Cm 11 Ta "2462      2462    2462    2462"
359 .It Cm 12 Ta "- 2467    2467    2467"
360 .It Cm 13 Ta "- 2472    2472    2472"
361 .It Cm 14 Ta "- -       -       2484"
362 .El
363 .Pp
364 If an illegal channel is specified, the
365 NIC will revert to its default channel.
366 For NICs sold in the United States
367 and Europe, the default channel is
368 .Cm 3 .
369 For NICs sold in France, the default channel is
370 .Cm 11 .
371 For NICs sold in Japan, the default channel is
372 .Cm 14 ,
373 and it is the only available channel for pre-11Mbps NICs.
374 Note that two stations must be set to the same channel in order to
375 communicate.
376 .It Oo Fl i Oc Ar iface Fl P Cm 0 | 1
377 Enable or disable power management on a given interface.
378 Enabling
379 power management uses an alternating sleep/wake protocol to help
380 conserve power on mobile stations, at the cost of some increased
381 receive latency.
382 Power management is off by default.
383 Note that power
384 management requires the cooperation of an access point in order to
385 function; it is not functional in ad-hoc mode.
386 Also, power management
387 is only implemented in Lucent WavePOINT firmware version 2.03 or
388 later, and in WaveLAN PCMCIA adapter firmware 2.00 or later.
389 Older
390 revisions will silently ignore the power management setting.
391 Legal
392 values for this parameter are
393 .Cm 0
394 (off) and
395 .Cm 1
396 (on).
397 .It Oo Fl i Oc Ar iface Fl S Ar max_sleep_interval
398 Specify the sleep interval to use when power management is enabled.
399 The
400 .Ar max_sleep_interval
401 is specified in milliseconds.
402 The default is 100.
403 .It Oo Fl i Oc Ar iface Fl C
404 Display the cached signal strength information maintained by the
405 .Xr wi 4
406 driver.
407 The driver retains information about signal strength and
408 noise level for packets received from different hosts.
409 The signal
410 strength and noise level values are displayed in units of dBms.
411 The signal quality values is produced by subtracting the noise level
412 from the signal strength (i.e. less noise and better signal yields
413 better signal quality).
414 .El
415 .Sh SEE ALSO
416 .Xr ipsec 4 ,
417 .Xr wi 4 ,
418 .Xr ifconfig 8
419 .Sh HISTORY
420 The
421 .Nm
422 utility first appeared in
423 .Fx 3.0 .
424 .Sh AUTHORS
425 The
426 .Nm
427 utility was written by
428 .An Bill Paul Aq wpaul@ctr.columbia.edu .
429 .Sh BUGS
430 The WEP encryption method has been broken so that third parties
431 can recover the keys in use relatively quickly at distances that are
432 surprising to most people.
433 Do not rely on WEP for anything but the most basic, remedial security.
434 IPSEC will give you a higher level of security and should be used
435 whenever possible.
436 Do not trust access points or wireless machines that connect through
437 them as they can provide no assurance that the traffic is legitimate.
438 MAC addresses can easily be forged and should therefore not be used as
439 the only access control.
440 .Pp
441 The attack on WEP is a passive attack, requiring only the ability to
442 sniff packets on the network.
443 The passive attack can be launched at a distance larger, up to many
444 miles, than one might otherwise expect given a specialized antenna
445 used in point to point applications.
446 The attacker can recover the keys from a 128-bit WEP network with only
447 5,000,000 to 6,000,000 packets.
448 While this may sound like a large number of packets, empirical
449 evidence suggests that this amount of traffic is generated in a few
450 hours on a partially loaded network.
451 Once a key has been compromised, the only remedial action is to
452 discontinue it and use a new key.
453 .Pp
454 See
455 .Pa http://www.isoc.org/isoc/conferences/ndss/02/proceedings/papers/stubbl.pdf
456 for details of the attack.
457 .Pp
458 If you must use WEP, you are strongly encouraged to pick keys whose
459 bytes are random and not confined to ASCII characters.