blob: 377a3f28906f2475ac79742c9d1b611003b409d8 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001.\" Jean II - HPLB - 96
2.\" iwconfig.8
3.\"
4.TH IWCONFIG 8 "31 October 1996" "net-tools" "Linux Programmer's Manual"
5.\"
6.\" NAME part
7.\"
8.SH NAME
9iwconfig \- configure a wireless network interface
10.\"
11.\" SYNOPSIS part
12.\"
13.SH SYNOPSIS
14.BI "iwconfig [" interface ]
15.br
16.BI "iwconfig " interface " [essid " X "] [nwid " N "] [freq " F "] [channel " C ]
17.br
18.BI " [sens " S "] [mode " M "] [ap " A "] [nick " NN ]
19.br
20.BI " [rate " R "] [rts " RT "] [frag " FT "] [txpower " T ]
21.br
22.BI " [enc " E "] [key " K "] [power " P "] [retry " R ]
23.br
24.BI " [commit]
25.br
26.BI "iwconfig --help"
27.br
28.BI "iwconfig --version"
29.\"
30.\" DESCRIPTION part
31.\"
32.SH DESCRIPTION
33.B Iwconfig
34is similar to
35.IR ifconfig (8),
36but is dedicated to the wireless interfaces. It is used to set the
37parameters of the network interface which are specific to the wireless
38operation (for example : the frequency).
39.B Iwconfig
40may also be used to display those parameters, and the wireless
41statistics (extracted from
42.IR /proc/net/wireless ).
43.PP
44All these parameters and statistics are device dependant. Each driver
45will provide only some of them depending on the hardware support, and
46the range of value may change. Please refer to the man page of each
47device for details.
48.\"
49.\" PARAMETER part
50.\"
51.SH PARAMETERS
52.TP
53.B essid
54Set the ESSID (or Network Name - in some products it may also called
55Domain ID). The ESSID is used to identify cells which are part of the
56same virtual network.
57.br
58As opposed to the NWID which defines a single cell, the ESSID defines
59a group of cell connected via repeaters or infrastructure, where the
60user may roam. With some card, you may disable the ESSID checking
61(ESSID promiscuous) with
62.IR off " or " any " (and " on
63to reenable it).
64.br
65.B Examples :
66.br
67.I " iwconfig eth0 essid any"
68.br
69.I " iwconfig eth0 essid ""My Network""
70.TP
71.BR nwid / domain
72Set the Network ID (in some products it is also called Domain ID). As
73all adjacent wireless networks share the same medium, this parameter
74is used to differenciate them (create logical colocated networks) and
75identify nodes belonguing to the same cell. With some card, you may
76disable the Network ID checking (NWID promiscuous) with
77.IR off " (and " on
78to reenable it).
79.br
80.B Examples :
81.br
82.I " iwconfig eth0 nwid AB34
83.br
84.I " iwconfig eth0 nwid off"
85.TP
86.BR freq / channel
87Set the operating frequency or channel in the device. Value below 1000
88are the channel number, value over this is the frequency in Hz. You
89must append the suffix k, M or G to the value (for example, "2.46G"
90for 2.46 GHz frequency), or add enough '0'.
91.br
92Channels are usually numbered starting at 1,
93and you may use
94.IR iwpriv (8)
95to get the total number of channels and list the available
96frequencies. Depending on regulations, some frequencies/channels may
97not be available.
98.br
99.B Examples :
100.br
101.I " iwconfig eth0 freq 2.422G"
102.br
103.I " iwconfig eth0 channel 3"
104.TP
105.B sens
106Set the sensitivity threshold. This is the lowest signal level for
107which we attempt a packet reception, signal lower than this are not
108received. This is used to avoid receiving background noise, so you
109should set it according to the average noise level. Positive values
110are assumed to be the raw value used by the hardware or a percentage,
111negative values are assumed to be dBm.
112.br
113With some hardware, this parameter also control the defer threshold
114(lowest signal level for which we consider the channel busy) and the
115handover threshold (lowest signal level where we stay associated with
116the current access point).
117.br
118.B Example :
119.br
120.I " iwconfig eth0 sens -80"
121.TP
122.B mode
123Set the operating mode of the device, which depends on the network
124topology. The mode can be
125.I Ad-hoc
126(network composed of only one cell and without Access Point),
127.I Managed
128(node connects to a network composed of many Access Points, with roaming),
129.I Master
130(the node is the synchronisation master or act as an Access Point),
131.I Repeater
132(the node forward packets between other wireless nodes),
133.I Secondary
134(the node act as a backup master/repeater),
135.I Monitor
136(the node act as a passive monitor and only receives packets) or
137.IR Auto .
138.br
139.B Example :
140.br
141.I " iwconfig eth0 mode Managed"
142.br
143.I " iwconfig eth0 mode Ad-Hoc"
144.TP
145.B ap
146Force the card to register to the Access Point given by the address,
147if it is possible. When the quality of the connection goes too low,
148the driver may revert back to automatic mode (the card finds the best
149Access Point in range).
150.br
151You may also use
152.I off
153to re-enable automatic mode without changing the current Access Point,
154or you may use
155.I any
156or
157.I auto
158to force the card to reassociate with the current best Access Point.
159.br
160.B Example :
161.br
162.I " iwconfig eth0 ap 00:60:1D:01:23:45"
163.br
164.I " iwconfig eth0 ap any"
165.br
166.I " iwconfig eth0 ap off"
167.TP
168.BR nick [name]
169Set the nickname, or the station name. Most 802.11 products do define
170it, but this is not used as far as the protocols (MAC, IP, TCP) are
171concerned and completely accessory as far as configuration goes. In
172fact only some diagnostic tools may use it.
173.br
174.B Example :
175.br
176.I " iwconfig eth0 nickname ""My Linux Node""
177.TP
178.BR rate / bit [rate]
179For cards supporting multiple bit rates, set the bit-rate in b/s. The
180bit-rate is the speed at which bits are transmitted over the medium,
181the user speed of the link is lower due to medium sharing and
182overhead.
183.br
184You must append the suffix k, M or G to the value (decimal multiplier
185: 10^3, 10^6 and 10^9 b/s), or add enough '0'. Values below 1000 are
186card specific, usually an index in the bit-rate list. Use
187.I auto
188to select the automatic bit-rate mode (fallback to lower rate on noisy
189channels), which is the default for most cards, and
190.I fixed
191to revert back to fixed setting. If you specify a bit-rate value and append
192.IR auto ,
193the driver will use all bit lower and equal than this value.
194.br
195.B Examples :
196.br
197.I " iwconfig eth0 rate 11M"
198.br
199.I " iwconfig eth0 rate auto"
200.br
201.I " iwconfig eth0 rate 5.5M auto"
202.TP
203.BR rts [_threshold]
204RTS/CTS adds a handshake before each packet transmission to make sure
205that the channel is clear. This adds overhead, but increase
206performance in case of hidden nodes or large number of active
207nodes. This parameters set the size of the smallest packet for which
208the node sends RTS, a value equal to the maximum packet size disable
209the scheme. You may also set this parameter to
210.IR auto ", " fixed " or " off .
211.br
212.B Examples :
213.br
214.I " iwconfig eth0 rts 250"
215.br
216.I " iwconfig eth0 rts off"
217.TP
218.BR frag [mentation_threshold]
219Fragmentation allow to split a IP packet in a burst of smaller
220fragments transmitted on the medium. In most cases this adds overhead,
221but in very noisy environment this reduce the error penalty. This
222parameter set the maximum fragment size, a value equal to the maximum
223packet size disable the scheme. You may also set this parameter to
224.IR auto ", " fixed " or " off .
225.br
226.B Examples :
227.br
228.I " iwconfig eth0 frag 512"
229.br
230.I " iwconfig eth0 frag off"
231.TP
232.BR key / enc [ryption]
233Used to manipulate encryption or scrambling keys and encryption mode.
234.br
235To set the current encryption key, just enter the key in hex digits as
236.IR XXXX-XXXX-XXXX-XXXX " or " XXXXXXXX .
237To set a key other than the current key, prepend or append
238.I [index]
239to the key itself (this won't change which is the active key). You can
240also enter the key as an ASCII string by using the
241.I s:
242prefix. Passphrase is currently not supported.
243.br
244To change which key is the current active key, just enter
245.I [index]
246(without entering any key value).
247.br
248.IR off " and " on
249disable and reenable encryption,
250.I open
251set the system in open mode (accept non-encrypted packets) and
252.I restricted
253discard non-encrypted packets.
254.br
255If you need to set multiple keys, or set a key and change the active
256key, you need to use multiple
257.B key
258directives. Arguments can be put in any order, the last one will take
259precendence.
260.br
261.B Examples :
262.br
263.I " iwconfig eth0 key 0123-4567-89"
264.br
265.I " iwconfig eth0 key s:password [2]"
266.br
267.I " iwconfig eth0 key [2] open"
268.br
269.I " iwconfig eth0 key off"
270.br
271.I " iwconfig eth0 key restricted [3] 0123456789"
272.br
273.I " iwconfig eth0 key 01-23 key 45-67 [4] key [4]"
274.TP
275.BR power
276Used to manipulate power management scheme parameters and mode.
277.br
278To set the period between wake up, enter
279.IR "period `value'" .
280To set the timeout before going back to sleep, enter
281.IR "timeout `value'" .
282You can also add the
283.IR min " and " max
284modifiers. By defaults, those values are in seconds, append the
285suffix m or u to specify values un milliseconds or
286microseconds. Sometimes, those values are without units (number of
287dwell or the like).
288.br
289.IR off " and " on
290disable and reenable power management. Finally, you may set the power
291management mode to
292.I all
293(receive all packets),
294.I unicast
295(receive unicast packets only, discard multicast and broadcast) and
296.I multicast
297(receive multicast and broadcast only, discard unicast packets).
298.br
299.B Examples :
300.br
301.I " iwconfig eth0 power period 2"
302.br
303.I " iwconfig eth0 power 500m unicast"
304.br
305.I " iwconfig eth0 power timeout 300u all"
306.br
307.I " iwconfig eth0 power off"
308.br
309.I " iwconfig eth0 power min period 2 power max period 4"
310.TP
311.BR txpower
312For cards supporting multiple transmit powers, set the transmit power in dBm. If
313.I W
314is the power in Watt, the power in dBm is
315.IR "P = 30 + 10.log(W)" .
316If the value is postfixed by
317.IR mW ,
318it will be automatically converted to dBm.
319.br
320In addition,
321.IR on " and " off
322enable and disable the radio, and
323.IR auto " and " fixed
324enable and disable power control (if those features are available).
325.br
326.B Examples :
327.br
328.I " iwconfig eth0 txpower 15"
329.br
330.I " iwconfig eth0 txpower 30mW"
331.br
332.I " iwconfig eth0 txpower auto"
333.br
334.I " iwconfig eth0 txpower off"
335.TP
336.BR retry
337Most cards have MAC retransmissions, and some allow to set the
338behaviour of the retry mechanism.
339.br
340To set the maximum number of retries, enter
341.IR "limit `value'" .
342This is an absolute value (without unit).
343The set the maximum length of time the MAC should retry, enter
344.IR "lifetime `value'" .
345By defaults, this value in in seconds, append the suffix m or u to
346specify values un milliseconds or microseconds.
347.br
348You can also add the
349.IR min " and " max
350modifiers. If the card support automatic mode, they define the bounds
351of the limit or lifetime. Some other cards define different values
352depending on packet size, for example in 802.11
353.I min limit
354is the short retry limit (non RTS/CTS packets).
355.br
356.B Examples :
357.br
358.I " iwconfig eth0 retry 16"
359.br
360.I " iwconfig eth0 retry lifetime 300m"
361.br
362.I " iwconfig eth0 retry min limit 8"
363.TP
364.BR commit
365Some cards may not apply changes done through Wireless Extensions
366immediately (they may wait to agregate the changes or apply it only
367when the card is brought up via ifconfig). This command (when
368available) force the card to apply all pending changes.
369.br
370This is normally not needed, because the card will eventually apply
371the changes, but can be usefull for debugging.
372.\"
373.\" DISPLAY part
374.\"
375.SH DISPLAY
376For each device which support wireless extensions,
377.I iwconfig
378will display the name of the
379.B MAC protocol
380used (name of device for proprietary protocols), the
381.B ESSID
382(Network Name), the
383.BR NWID ,
384the
385.B frequency
386(or channel), the
387.BR sensitivity ,
388the
389.B mode
390of operation, the
391.B Access Point
392address, the
393.B bit-rate
394the
395.BR "RTS threshold" ", the " "fragmentation threshold" ,
396the
397.B encryption key
398and the
399.B power management
400settings (depending on availability).
401.br
402See above for explanations of what these parameters mean.
403.br
404If the label for bitrate is followed by
405.RB ` = ',
406it means that the parameter is fixed and forced to that value, if it
407is followed by
408.RB ` : '
409it is only the current value (device in normal auto mode).
410.PP
411If
412.I /proc/net/wireless
413exists,
414.I iwconfig
415will also display its content :
416.TP
417.B Link quality
418Quality of the link or the modulation (what is the level of contention
419or interference, or how good the received signal is).
420.TP
421.B Signal level
422Received signal strength (how strong the received signal is).
423.TP
424.B Noise level
425Background noise level (when no packet is transmited).
426.TP
427.B invalid nwid
428Number of packets received with a different NWID. Used to detect
429configuration problems or adjacent network existence.
430.TP
431.B invalid crypt
432Number of packets that the hardware was unable to decrypt.
433.TP
434.B invalid misc
435Other packets lost in relation with specific wireless operations.
436.\"
437.\" AUTHOR part
438.\"
439.SH AUTHOR
440Jean Tourrilhes \- jt@hpl.hp.com
441.\"
442.\" FILES part
443.\"
444.SH FILES
445.I /proc/net/wireless
446.\"
447.\" SEE ALSO part
448.\"
449.SH SEE ALSO
450.BR ifconfig (8),
451.BR iwspy (8),
452.BR iwlist (8),
453.BR iwpriv (8),
454.BR wavelan (4),
455.BR wavelan_cs (4),
456.BR wvlan_cs (4),
457.BR netwave_cs (4).