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