]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/wicontrol/wicontrol.8
This commit was generated by cvs2svn to compensate for changes in r161701,
[FreeBSD/FreeBSD.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$
32 .\"
33 .Dd March 4, 2003
34 .Dt WICONTROL 8
35 .Os
36 .Sh NAME
37 .Nm wicontrol
38 .Nd "configure Lucent, Intersil, and Atheros wireless devices"
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl i
42 .Ar iface Op Fl o
43 .Nm
44 .Op Fl i
45 .Ar iface Fl l
46 (dump associated stations)
47 .Nm
48 .Op Fl i
49 .Ar iface Fl L
50 (list available access points)
51 .Nm
52 .Op Fl i
53 .Ar iface Fl t Ar tx_rate
54 .Nm
55 .Op Fl i
56 .Ar iface Fl n Ar network_name
57 .Nm
58 .Op Fl i
59 .Ar iface Fl s Ar station_name
60 .Nm
61 .Op Fl i
62 .Ar iface Fl c Cm 0 | 1
63 .Nm
64 .Op Fl i
65 .Ar iface Fl q Ar SSID
66 .Nm
67 .Op Fl i
68 .Ar iface Fl p Ar port_type
69 .Nm
70 .Op Fl i
71 .Ar iface Fl a Ar access_point_density
72 .Nm
73 .Op Fl i
74 .Ar iface Fl m Ar mac_address
75 .Nm
76 .Op Fl i
77 .Ar iface Fl d Ar max_data_length
78 .Nm
79 .Op Fl i
80 .Ar iface Fl e Cm 0 | 1
81 .Nm
82 .Op Fl i
83 .Ar iface Fl k Ar key
84 .Op Fl v Cm 1 | 2 | 3 | 4
85 .Nm
86 .Op Fl i
87 .Ar iface Fl T Cm 1 | 2 | 3 | 4
88 .Nm
89 .Op Fl i
90 .Ar iface Fl r Ar RTS_threshold
91 .Nm
92 .Op Fl i
93 .Ar iface Fl f Ar frequency
94 .Nm
95 .Op Fl i
96 .Ar iface Fl P Cm 0 | 1
97 .Nm
98 .Op Fl i
99 .Ar iface Fl S Ar max_sleep_duration
100 .Nm
101 .Op Fl i
102 .Ar iface Fl Z
103 (zero signal cache)
104 .Nm
105 .Op Fl i
106 .Ar iface Fl C
107 (display signal cache)
108 .Sh DESCRIPTION
109 The
110 .Nm
111 utility controls the operation of Lucent, Intersil, and Atheros-based wireless
112 networking devices via
113 .Xr wi 4
114 or
115 .Xr ath 4
116 driver.
117 .Pp
118 You should not use this program to configure IEEE 802.11 parameters.
119 Use
120 .Xr ifconfig 8
121 instead to do those tasks (i.e., set SSID, WEP key, etc.).
122 .Pp
123 The
124 .Nm
125 utility can also be used to view the current settings of these parameters,
126 dump out the values of the card's statistics counters, list associated
127 stations (in HostAP mode), and scan for available access points.
128 .Pp
129 The
130 .Ar iface
131 argument given to
132 .Nm
133 should be the logical interface name associated with the Lucent, Intersil,
134 and Atheros device
135 .Li ( wi0 , wi1 , ath0 ,
136 etc.).
137 If none is specified then
138 .Dq Li wi0
139 is used as default.
140 .Sh OPTIONS
141 The options are as follows:
142 .Bl -tag -width indent
143 .It Oo Fl i Oc Ar iface Op Fl o
144 Display the current settings of the specified wireless interface.
145 This retrieves the current card settings from the driver and prints them
146 out.
147 Using the additional
148 .Fl o
149 flag will cause
150 .Nm
151 to print out the statistics counters instead of the card settings.
152 Encryption keys are only displayed if
153 .Nm
154 is run as root.
155 .It Oo Fl i Oc Ar iface Fl a Ar access_point_density
156 Specify the
157 access point density
158 for a given interface.
159 Legal values are
160 .Cm 1
161 (low),
162 .Cm 2
163 (medium) and
164 .Cm 3
165 (high).
166 This setting influences some of the radio modem threshold settings.
167 .It Oo Fl i Oc Ar iface Fl m Ar mac_address
168 Set the station address for the specified interface.
169 The
170 .Ar mac_address
171 is specified as a series of six hexadecimal values separated by colons,
172 e.g.,
173 .Dq Li 00:60:1d:12:34:56 .
174 This programs the new address into the card
175 and updates the interface as well.
176 .It Oo Fl i Oc Ar iface Fl d Ar max_data_length
177 Set the maximum receive and transmit frame size for a specified interface.
178 The
179 .Ar max_data_length
180 can be any number from 350 to 2304.
181 The default is 2304.
182 .It Oo Fl i Oc Ar iface Fl r Ar RTS_threshold
183 Set the RTS/CTS threshold for a given interface.
184 This controls the
185 number of bytes used for the RTS/CTS handshake boundary.
186 The
187 .Ar RTS_threshold
188 can be any value between 0 and 2347.
189 The default is 2347.
190 .It Oo Fl i Oc Ar iface Fl Z
191 Clear the signal strength cache maintained internally by the
192 .Xr wi 4
193 driver.
194 .It Oo Fl i Oc Ar iface Fl C
195 Display the cached signal strength information maintained by the
196 .Xr wi 4
197 driver.
198 The driver retains information about signal strength and
199 noise level for packets received from different hosts.
200 The signal
201 strength and noise level values are displayed in units of dBms.
202 The signal quality value is produced by subtracting the noise level
203 from the signal strength (i.e., less noise and better signal yields
204 better signal quality).
205 .El
206 .Sh DEPRECATED AND OBSOLETE OPTIONS
207 The
208 .Nm
209 utility has a number of options that are now deprecated or obsolete, as they
210 have been overtaken by extensions to
211 .Xr ifconfig 8
212 and changes to the driver.
213 The deprecated and obsolete options are as follows:
214 .Bl -tag -width indent
215 .It Oo Fl i Oc Ar iface Fl t Ar tx_rate
216 This flag is deprecated.
217 Use
218 .Xr ifconfig 8
219 .Cm mediaopt
220 instead.
221 .Pp
222 Set the transmit rate of the specified interface.
223 The legal values
224 for the transmit rate vary depending on whether the interface is a
225 standard WaveLAN/IEEE or a WaveLAN/IEEE Turbo adapter.
226 The standard
227 NICs support a maximum transmit rate of 2Mbps while the turbo NICs
228 support a maximum speed of 6Mbps.
229 The following table shows the
230 legal transmit rate settings and the corresponding transmit speeds:
231 .Bl -column ".Em TX\ rate" ".Em NIC\ speed" -offset indent
232 .Em "TX rate    NIC speed"
233 .It Cm 1 Ta "Fixed Low (1Mbps)"
234 .It Cm 2 Ta "Fixed Standard (2Mbps)"
235 .It Cm 3 Ta "Auto Rate Select (High)"
236 .It Cm 4 Ta "Fixed Medium (4Mbps)"
237 .It Cm 5 Ta "Fixed High (6Mbps)"
238 .It Cm 6 Ta "Auto Rate Select (Standard)"
239 .It Cm 7 Ta "Auto Rate Select (Medium)"
240 .El
241 .Pp
242 The default driver setting is
243 .Cm 3
244 (auto rate select).
245 The numbers vary from card to card.
246 .It Oo Fl i Oc Ar iface Fl n Ar network_name
247 This flag is deprecated.
248 Use
249 .Xr ifconfig 8
250 .Cm ssid
251 or
252 .Cm nwid
253 instead.
254 .Pp
255 Set the name of the service set (IBSS) that this station wishes to
256 join.
257 The
258 .Ar network_name
259 can be any text string up to 30 characters in length.
260 The default name
261 is the string
262 .Dq Li ANY
263 which should allow the station to connect to the first
264 available access point.
265 The interface should be set for BSS mode using
266 the
267 .Fl p
268 flag in order for this to work.
269 .Pp
270 Note: the WaveLAN manual indicates that an empty string will allow the
271 host to connect to any access point, however I have also seen a reference
272 in another driver which indicates that the
273 .Dq Li ANY
274 string works as well.
275 .It Oo Fl i Oc Ar iface Fl s Ar station_name
276 This flag is deprecated.
277 Use
278 .Xr ifconfig 8
279 .Cm stationname
280 or
281 .Cm station
282 instead.
283 .Pp
284 Sets the
285 station name
286 for the specified interface.
287 The
288 .Ar station_name
289 is used for diagnostic purposes.
290 The
291 .Tn "Lucent WaveMANAGER"
292 software can
293 poll the names of remote hosts.
294 .It Oo Fl i Oc Ar iface Fl c Cm 0 | 1
295 This flag is deprecated.
296 IBSS networks are automatically created on those cards whose firmware
297 supports it while in IBSS mode.
298 .Pp
299 Allow the station to create a service set (IBSS).
300 Permitted values are
301 .Cm 0
302 (do not create IBSS) and
303 .Cm 1
304 (enable creation of IBSS).
305 The default is
306 .Cm 0 .
307 .Pp
308 Only newer versions of the Lucent firmware support this.
309 .It Oo Fl i Oc Ar iface Fl q Ar SSID
310 This flag is deprecated.
311 The
312 .Cm ssid
313 setting from
314 .Xr ifconfig 8
315 is the current preferred way of setting this parameter.
316 .Pp
317 Specify the name of an IBSS (SSID) to create on a given interface.
318 The
319 .Ar SSID
320 can be any text string up to 30 characters long.
321 .Pp
322 Note: this option is provided for experimental purposes only: enabling
323 the creation of an IBSS on a host system does not appear to actually work.
324 .It Oo Fl i Oc Ar iface Fl p Ar port_type
325 This flag is deprecated.
326 It should never be used.
327 Do not use this flag.
328 Its meaning depends on the type of card you are using, as well as the
329 firmware you have installed in the card in some cases.
330 Beware.
331 Danger.
332 Do not use.
333 Instead, use the
334 .Xr ifconfig 8
335 .Cm media
336 and
337 .Cm mediaopt
338 commands.
339 .Pp
340 Set the
341 port type
342 for a specified interface.
343 The legal values for
344 .Ar port_type
345 are
346 .Cm 1
347 (BSS mode) and
348 .Cm 3
349 (ad-hoc) mode.
350 In ad-hoc mode, the station can
351 communicate directly with any other stations within direct radio range
352 (provided that they are also operating in ad-hoc mode).
353 In BSS mode,
354 hosts must associate with a service set controlled by an access point,
355 which relays traffic between end stations.
356 The default setting is
357 .Cm 1
358 (BSS mode).
359 Lucent cards have one set of meanings.
360 Prism cards have another.
361 Symbol cards have a third.
362 Do not use this flag.
363 .It Oo Fl i Oc Ar iface Fl e Cm 0 | 1
364 This flag is deprecated.
365 It has been replaced by the
366 .Xr ifconfig 8
367 .Cm wepmode
368 option.
369 .Pp
370 Enable or disable WEP encryption.
371 Permitted values are
372 .Cm 0
373 (encryption disabled) or
374 .Cm 1
375 (encryption enabled).
376 Encryption is off by default.
377 .Pp
378 Both 128-bit and 64-bit WEP have been broken.
379 See the
380 .Sx BUGS
381 section for details.
382 .It Oo Fl i Oc Ar iface Fl k Ar key Op Fl v Cm 1 | 2 | 3 | 4
383 This flag is obsolete.
384 The
385 .Xr ifconfig 8
386 .Cm wepkey
387 should be used instead.
388 .Pp
389 Set WEP encryption keys.
390 There are four default encryption keys
391 that can be programmed.
392 A specific key can be set using
393 the
394 .Fl v
395 flag.
396 If the
397 .Fl v
398 flag is not specified, the first key will be set.
399 Encryption keys
400 can either be normal text (i.e.,
401 .Dq Li hello )
402 or a series of hexadecimal digits (i.e.,
403 .Dq Li 0x1234512345 ) .
404 For
405 WaveLAN Turbo Silver cards, the key is restricted to 40 bits, hence
406 the key can be either a 5 character text string or 10 hex digits.
407 For WaveLAN Turbo Gold cards, the key can also be 104 bits,
408 which means the key can be specified as either a 13 character text
409 string or 26 hex digits in addition to the formats supported by the
410 Silver cards.
411 .Pp
412 For maximum portability, hex keys are recommended;
413 the mapping of text keys to WEP encryption is usually driver-specific.
414 In particular, the
415 .Tn Windows
416 drivers do this mapping differently to
417 .Fx .
418 .Pp
419 Note: Both 128-bit and 64-bit WEP encryption have been broken.
420 See the
421 .Sx BUGS
422 section for details.
423 .It Oo Fl i Oc Ar iface Fl T Cm 1 | 2 | 3 | 4
424 This flag is obsolete.
425 The
426 .Xr ifconfig 8
427 .Cm weptxkey
428 should be used instead.
429 .Pp
430 Specify which of the four WEP encryption keys will be used to
431 encrypt transmitted packets.
432 .Pp
433 Note: Both 128-bit and 64-bit WEP have been broken.
434 See the
435 .Sx BUGS
436 section for details.
437 .It Oo Fl i Oc Ar iface Fl f Ar frequency
438 This flag is deprecated.
439 Use
440 .Xr ifconfig 8
441 .Cm channel
442 instead.
443 .Pp
444 Set the radio frequency of a given interface.
445 The
446 .Ar frequency
447 should be specified as a channel ID as shown in the table below.
448 The
449 list of available frequencies is dependent on radio regulations specified
450 by regional authorities.
451 Recognized regulatory authorities include
452 the FCC (United States), ETSI (Europe), France and Japan.
453 Frequencies
454 in the table are specified in MHz.
455 .Bl -column ".Em Channel\ ID" ".Em FCC" ".Em ETSI" ".Em France" ".Em Japan" -offset indent
456 .Em "Channel ID FCC     ETSI    France  Japan"
457 .It Cm 1 Ta "2412       2412    -       2412"
458 .It Cm 2 Ta "2417       2417    -       2417"
459 .It Cm 3 Ta "2422       2422    -       2422"
460 .It Cm 4 Ta "2427       2427    -       2427"
461 .It Cm 5 Ta "2432       2432    -       2432"
462 .It Cm 6 Ta "2437       2437    -       2437"
463 .It Cm 7 Ta "2442       2442    -       2442"
464 .It Cm 8 Ta "2447       2447    -       2447"
465 .It Cm 9 Ta "2452       2452    -       2452"
466 .It Cm 10 Ta "2457      2457    2457    2457"
467 .It Cm 11 Ta "2462      2462    2462    2462"
468 .It Cm 12 Ta "- 2467    2467    2467"
469 .It Cm 13 Ta "- 2472    2472    2472"
470 .It Cm 14 Ta "- -       -       2484"
471 .El
472 .Pp
473 If an illegal channel is specified, the
474 NIC will revert to its default channel.
475 For NICs sold in the United States
476 and Europe, the default channel is
477 .Cm 3 .
478 For NICs sold in France, the default channel is
479 .Cm 11 .
480 For NICs sold in Japan, the default channel is
481 .Cm 14 ,
482 and it is the only available channel for pre-11Mbps NICs.
483 Note that two stations must be set to the same channel in order to
484 communicate.
485 .It Oo Fl i Oc Ar iface Fl P Cm 0 | 1
486 This flag is obsolete.
487 The
488 .Xr ifconfig 8
489 .Cm powersave
490 should be used instead.
491 .Pp
492 Enable or disable power management on a given interface.
493 Enabling
494 power management uses an alternating sleep/wake protocol to help
495 conserve power on mobile stations, at the cost of some increased
496 receive latency.
497 Power management is off by default.
498 Note that power
499 management requires the cooperation of an access point in order to
500 function; it is not functional in ad-hoc mode.
501 Also, power management
502 is only implemented in Lucent WavePOINT firmware version 2.03 or
503 later, and in WaveLAN PCMCIA adapter firmware 2.00 or later.
504 Older
505 revisions will silently ignore the power management setting.
506 Legal
507 values for this parameter are
508 .Cm 0
509 (off) and
510 .Cm 1
511 (on).
512 .It Oo Fl i Oc Ar iface Fl S Ar max_sleep_interval
513 This flag is obsolete.
514 The
515 .Xr ifconfig 8
516 .Cm powersavesleep
517 should be used instead.
518 .Pp
519 Specify the sleep interval to use when power management is enabled.
520 The
521 .Ar max_sleep_interval
522 is specified in milliseconds.
523 The default is 100.
524 .El
525 .Sh SEE ALSO
526 .Xr ath 4 ,
527 .Xr awi 4 ,
528 .Xr ipsec 4 ,
529 .Xr wi 4 ,
530 .Xr ifconfig 8
531 .Sh HISTORY
532 The
533 .Nm
534 utility first appeared in
535 .Fx 3.0 .
536 .Sh AUTHORS
537 The
538 .Nm
539 utility was written by
540 .An Bill Paul Aq wpaul@ctr.columbia.edu .
541 .Sh BUGS
542 There are deprecated flags here that duplicate functionality of
543 .Xr ifconfig 8 .
544 These flags were deprecated in
545 .Fx 5.1
546 and will be removed in a future release.
547 .Pp
548 The WEP encryption method has been broken so that third parties
549 can recover the keys in use relatively quickly at distances that are
550 surprising to most people.
551 Do not rely on WEP for anything but the most basic, remedial security.
552 IPSEC will give you a higher level of security and should be used
553 whenever possible.
554 Do not trust access points or wireless machines that connect through
555 them as they can provide no assurance that the traffic is legitimate.
556 MAC addresses can easily be forged and should therefore not be used as
557 the only access control.
558 .Pp
559 The attack on WEP is a passive attack, requiring only the ability to
560 sniff packets on the network.
561 The passive attack can be launched at a distance larger, up to many
562 miles, than one might otherwise expect given a specialized antenna
563 used in point to point applications.
564 The attacker can recover the keys from a 128-bit WEP network with only
565 5,000,000 to 6,000,000 packets.
566 While this may sound like a large number of packets, empirical
567 evidence suggests that this amount of traffic is generated in a few
568 hours on a partially loaded network.
569 Once a key has been compromised, the only remedial action is to
570 discontinue it and use a new key.
571 .Pp
572 See
573 .Pa http://www.cs.rice.edu/~astubble/wep/wep_attack.html
574 for details of the attack.
575 Many programs to assist in cracking WEP keys are widely available.
576 .Pp
577 If you must use WEP, you are strongly encouraged to pick keys whose
578 bytes are random and not confined to
579 .Tn ASCII
580 characters.
581 Brute force attacks on WEP keys are also possible.
582 Experience has showns that
583 .Tn ASCII
584 keys can be cracked in less than a day.
585 Even random bytes can be cracked in less than two weeks.
586 .Pp
587 Signal cache is broken right now.