Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[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.2 2003/06/17 04:30:04 dillon 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 Z
96 (zero signal cache)
97 .Nm
98 .Op Fl i
99 .Ar iface Fl C
100 (display signal cache)
101 .Nm
102 .Op Fl i
103 .Ar iface Fl L
104 (list avail access points)
105 .Nm
106 .Op Fl i
107 .Ar iface Fl l
108 (dump associated stations)
109 .Sh DESCRIPTION
110 The
111 .Nm
112 utility controls the operation of WaveLAN/IEEE wireless networking
113 devices via the
114 .Xr wi 4
115 driver.
116 Most of the parameters that can be changed relate to the
117 IEEE 802.11 protocol which the WaveLAN implements.
118 This includes
119 the station name, whether the station is operating in ad-hoc (point
120 to point) or BSS (service set) mode, and the network name of a service
121 set to join (IBSS) if BSS mode is enabled.
122 The
123 .Nm
124 utility can also be used to view the current settings of these parameters
125 and to dump out the values of the card's statistics counters.
126 .Pp
127 The
128 .Ar iface
129 argument given to
130 .Nm
131 should be the logical interface name associated with the WaveLAN/IEEE
132 device
133 .Li ( wi0 , wi1 ,
134 etc.).
135 If none is specified then
136 .Dq Li wi0
137 is used as default.
138 .Sh OPTIONS
139 The options are as follows:
140 .Bl -tag -width indent
141 .It Oo Fl i Oc Ar iface Op Fl o
142 Display the current settings of the specified WaveLAN/IEEE interface.
143 This retrieves the current card settings from the driver and prints them
144 out.
145 Using the additional
146 .Fl o
147 flag will cause
148 .Nm
149 to print out the statistics counters instead of the card settings.
150 Encryption keys are only displayed if
151 .Nm
152 is run as root.
153 .It Oo Fl i Oc Ar iface Fl t Ar tx_rate
154 Set the transmit rate of the specified interface.
155 The legal values
156 for the transmit rate vary depending on whether the interface is a
157 standard WaveLAN/IEEE or a WaveLAN/IEEE Turbo adapter.
158 The standard
159 NICs support a maximum transmit rate of 2Mbps while the turbo NICs
160 support a maximum speed of 6Mbps.
161 The following table shows the
162 legal transmit rate settings and the corresponding transmit speeds:
163 .Bl -column ".Em TX\ rate" ".Em NIC\ speed" -offset indent
164 .Em "TX rate    NIC speed"
165 .It Cm 1 Ta "Fixed Low (1Mbps)"
166 .It Cm 2 Ta "Fixed Standard (2Mbps)"
167 .It Cm 3 Ta "Auto Rate Select (High)"
168 .It Cm 4 Ta "Fixed Medium (4Mbps)"
169 .It Cm 5 Ta "Fixed High (6Mbps)"
170 .It Cm 6 Ta "Auto Rate Select (Standard)"
171 .It Cm 7 Ta "Auto Rate Select (Medium)"
172 .El
173 .Pp
174 The standard NICs support only settings
175 .Cm 1
176 through
177 .Cm 3 .
178 Turbo NICs support all the above listed speed settings.
179 The default driver setting is
180 .Cm 3
181 (auto rate select).
182 .It Oo Fl i Oc Ar iface Fl n Ar network_name
183 Set the name of the service set (IBSS) that this station wishes to
184 join.
185 The
186 .Ar network_name
187 can be any text string up to 30 characters in length.
188 The default name
189 is the string
190 .Dq Li ANY
191 which should allow the station to connect to the first
192 available access point.
193 The interface should be set for BSS mode using
194 the
195 .Fl p
196 flag in order for this to work.
197 .Pp
198 Note: the WaveLAN manual indicates that an empty string will allow the
199 host to connect to any access point, however I have also seen a reference
200 in another driver which indicates that the
201 .Dq Li ANY
202 string works as well.
203 .It Oo Fl i Oc Ar iface Fl s Ar station_name
204 Sets the
205 station name
206 for the specified interface.
207 The
208 .Ar station_name
209 is used for diagnostic purposes.
210 The
211 .Tn "Lucent WaveMANAGER"
212 software can
213 poll the names of remote hosts.
214 .It Oo Fl i Oc Ar iface Fl c Cm 0 | 1
215 Allow the station to create a service set (IBSS).
216 Permitted values are
217 .Cm 0
218 (don't create IBSS) and
219 .Cm 1
220 (enable creation of IBSS).
221 The default is
222 .Cm 0 .
223 .Pp
224 Note: this option is provided for experimental purposes only: enabling
225 the creation of an IBSS on a host system doesn't appear to actually work.
226 .It Oo Fl i Oc Ar iface Fl q Ar SSID
227 Specify the name of an IBSS (SSID) to create on a given interface.
228 The
229 .Ar SSID
230 can be any text string up to 30 characters long.
231 .Pp
232 Note: this option is provided for experimental purposes only: enabling
233 the creation of an IBSS on a host system doesn't appear to actually work.
234 .It Oo Fl i Oc Ar iface Fl p Ar port_type
235 Set the
236 port type
237 for a specified interface.
238 The legal values for
239 .Ar port_type
240 are
241 .Cm 1
242 (BSS mode) and
243 .Cm 3
244 (ad-hoc) mode.
245 In ad-hoc mode, the station can
246 communicate directly with any other stations within direct radio range
247 (provided that they are also operating in ad-hoc mode).
248 In BSS mode,
249 hosts must associate with a service set controlled by an access point,
250 which relays traffic between end stations.
251 The default setting is
252 .Cm 3
253 (ad-hoc mode).
254 .It Oo Fl i Oc Ar iface Fl a Ar access_point_density
255 Specify the
256 access point density
257 for a given interface.
258 Legal values are
259 .Cm 1
260 (low),
261 .Cm 2
262 (medium) and
263 .Cm 3
264 (high).
265 This setting influences some of the radio modem threshold settings.
266 .It Oo Fl i Oc Ar iface Fl m Ar mac_address
267 Set the station address for the specified interface.
268 The
269 .Ar mac_address
270 is specified as a series of six hexadecimal values separated by colons,
271 e.g.,
272 .Dq Li 00:60:1d:12:34:56 .
273 This programs the new address into the card
274 and updates the interface as well.
275 .It Oo Fl i Oc Ar iface Fl d Ar max_data_length
276 Set the maximum receive and transmit frame size for a specified interface.
277 The
278 .Ar max_data_length
279 can be any number from 350 to 2304.
280 The default is 2304.
281 .It Oo Fl i Oc Ar iface Fl e Cm 0 | 1
282 Enable or disable WEP encryption.
283 Permitted values are
284 .Cm 0
285 (encryption disabled) or
286 .Cm 1
287 (encryption enabled).
288 Encryption is off by default.
289 .Pp
290 Both 128-bit and 64-bit WEP have been broken.
291 See the
292 .Sx BUGS
293 section for details.
294 .It Oo Fl i Oc Ar iface Fl k Ar key Op Fl v Cm 1 | 2 | 3 | 4
295 Set WEP encryption keys.
296 There are four default encryption keys
297 that can be programmed.
298 A specific key can be set using
299 the
300 .Fl v
301 flag.
302 If the
303 .Fl v
304 flag is not specified, the first key will be set.
305 Encryption keys
306 can either be normal text (i.e.\&
307 .Dq Li hello )
308 or a series of hexadecimal digits (i.e.\&
309 .Dq Li 0x1234512345 ) .
310 For
311 WaveLAN Turbo Silver cards, the key is restricted to 40 bits, hence
312 the key can be either a 5 character text string or 10 hex digits.
313 For WaveLAN Turbo Gold cards, the key can also be 104 bits,
314 which means the key can be specified as either a 13 character text
315 string or 26 hex digits in addition to the formats supported by the
316 Silver cards.
317 .Pp
318 Note: Both 128-bit and 64-bit WEP have been broken.
319 See the
320 .Sx BUGS
321 section for details.
322 .It Oo Fl i Oc Ar iface Fl T Cm 1 | 2 | 3 | 4
323 Specify which of the four WEP encryption keys will be used to
324 encrypt transmitted packets.
325 .Pp
326 Note: Both 128-bit and 64-bit WEP have been broken.
327 See the
328 .Sx BUGS
329 section for details.
330 .It Oo Fl i Oc Ar iface Fl r Ar RTS_threshold
331 Set the RTS/CTS threshold for a given interface.
332 This controls the
333 number of bytes used for the RTS/CTS handshake boundary.
334 The
335 .Ar RTS_threshold
336 can be any value between 0 and 2347.
337 The default is 2347.
338 .It Oo Fl i Oc Ar iface Fl f Ar frequency
339 Set the radio frequency of a given interface.
340 The
341 .Ar frequency
342 should be specified as a channel ID as shown in the table below.
343 The
344 list of available frequencies is dependent on radio regulations specified
345 by regional authorities.
346 Recognized regulatory authorities include
347 the FCC (United States), ETSI (Europe), France and Japan.
348 Frequencies
349 in the table are specified in MHz.
350 .Bl -column ".Em Channel\ ID" ".Em FCC" ".Em ETSI" ".Em France" ".Em Japan" -offset indent
351 .Em "Channel ID FCC     ETSI    France  Japan"
352 .It Cm 1 Ta "2412       2412    -       2412"
353 .It Cm 2 Ta "2417       2417    -       2417"
354 .It Cm 3 Ta "2422       2422    -       2422"
355 .It Cm 4 Ta "2427       2427    -       2427"
356 .It Cm 5 Ta "2432       2432    -       2432"
357 .It Cm 6 Ta "2437       2437    -       2437"
358 .It Cm 7 Ta "2442       2442    -       2442"
359 .It Cm 8 Ta "2447       2447    -       2447"
360 .It Cm 9 Ta "2452       2452    -       2452"
361 .It Cm 10 Ta "2457      2457    2457    2457"
362 .It Cm 11 Ta "2462      2462    2462    2462"
363 .It Cm 12 Ta "- 2467    2467    2467"
364 .It Cm 13 Ta "- 2472    2472    2472"
365 .It Cm 14 Ta "- -       -       2484"
366 .El
367 .Pp
368 If an illegal channel is specified, the
369 NIC will revert to its default channel.
370 For NICs sold in the United States
371 and Europe, the default channel is
372 .Cm 3 .
373 For NICs sold in France, the default channel is
374 .Cm 11 .
375 For NICs sold in Japan, the default channel is
376 .Cm 14 ,
377 and it is the only available channel for pre-11Mbps NICs.
378 Note that two stations must be set to the same channel in order to
379 communicate.
380 .It Oo Fl i Oc Ar iface Fl P Cm 0 | 1
381 Enable or disable power management on a given interface.
382 Enabling
383 power management uses an alternating sleep/wake protocol to help
384 conserve power on mobile stations, at the cost of some increased
385 receive latency.
386 Power management is off by default.
387 Note that power
388 management requires the cooperation of an access point in order to
389 function; it is not functional in ad-hoc mode.
390 Also, power management
391 is only implemented in Lucent WavePOINT firmware version 2.03 or
392 later, and in WaveLAN PCMCIA adapter firmware 2.00 or later.
393 Older
394 revisions will silently ignore the power management setting.
395 Legal
396 values for this parameter are
397 .Cm 0
398 (off) and
399 .Cm 1
400 (on).
401 .It Oo Fl i Oc Ar iface Fl S Ar max_sleep_interval
402 Specify the sleep interval to use when power management is enabled.
403 The
404 .Ar max_sleep_interval
405 is specified in milliseconds.
406 The default is 100.
407 .It Oo Fl i Oc Ar iface Fl Z
408 Clear the signal strength cache maintained internally by the
409 .Xr wi 4
410 driver.
411 .It Oo Fl i Oc Ar iface Fl C
412 Display the cached signal strength information maintained by the
413 .Xr wi 4
414 driver.
415 The driver retains information about signal strength and
416 noise level for packets received from different hosts.
417 The signal
418 strength and noise level values are displayed in units of dBms.
419 The signal quality values is produced by subtracting the noise level
420 from the signal strength (i.e. less noise and better signal yields
421 better signal quality).
422 .El
423 .Sh SEE ALSO
424 .Xr ipsec 4 ,
425 .Xr wi 4 ,
426 .Xr ifconfig 8
427 .Sh BUGS
428 The WEP encryption method has been broken so that third parties
429 can recover the keys in use relatively quickly at distances that are
430 surprising to most people.
431 Do not rely on WEP for anything but the most basic, remedial security.
432 IPSEC will give you a higher level of security and should be used
433 whenever possible.
434 Do not trust access points or wireless machines that connect through
435 them as they can provide no assurance that the traffic is legitimate.
436 MAC addresses can easily be forged and should therefore not be used as
437 the only access control.
438 .Pp
439 The attack on WEP is a passive attack, requiring only the ability to
440 sniff packets on the network.
441 The passive attack can be launched at a distance larger, up to many
442 miles, than one might otherwise expect given a specialized antenna
443 used in point to point applications.
444 The attacker can recover the keys from a 128-bit WEP network with only
445 5,000,000 to 6,000,000 packets.
446 While this may sound like a large number of packets, empirical
447 evidence suggests that this amount of traffic is generated in a few
448 hours on a partially loaded network.
449 Once a key has been compromised, the only remedial action is to
450 discontinue it and use a new key.
451 .Pp
452 See
453 .Pa http://www.cs.rice.edu/~astubble/wep/wep_attack.html
454 for details of the attack.
455 .Pp
456 If you must use WEP, you are strongly encouraged to pick keys whose
457 bytes are random and not confined to ASCII characters.
458 .Sh HISTORY
459 The
460 .Nm
461 utility first appeared in
462 .Fx 3.0 .
463 .Sh AUTHORS
464 The
465 .Nm
466 utility was written by
467 .An Bill Paul Aq wpaul@ctr.columbia.edu .