b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | .\" 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 |
| 9 | iwconfig \- 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 |
| 34 | is similar to |
| 35 | .IR ifconfig (8), |
| 36 | but is dedicated to the wireless interfaces. It is used to set the |
| 37 | parameters of the network interface which are specific to the wireless |
| 38 | operation (for example : the frequency). |
| 39 | .B Iwconfig |
| 40 | may also be used to display those parameters, and the wireless |
| 41 | statistics (extracted from |
| 42 | .IR /proc/net/wireless ). |
| 43 | .PP |
| 44 | All these parameters and statistics are device dependant. Each driver |
| 45 | will provide only some of them depending on the hardware support, and |
| 46 | the range of value may change. Please refer to the man page of each |
| 47 | device for details. |
| 48 | .\" |
| 49 | .\" PARAMETER part |
| 50 | .\" |
| 51 | .SH PARAMETERS |
| 52 | .TP |
| 53 | .B essid |
| 54 | Set the ESSID (or Network Name - in some products it may also called |
| 55 | Domain ID). The ESSID is used to identify cells which are part of the |
| 56 | same virtual network. |
| 57 | .br |
| 58 | As opposed to the NWID which defines a single cell, the ESSID defines |
| 59 | a group of cell connected via repeaters or infrastructure, where the |
| 60 | user may roam. With some card, you may disable the ESSID checking |
| 61 | (ESSID promiscuous) with |
| 62 | .IR off " or " any " (and " on |
| 63 | to 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 |
| 72 | Set the Network ID (in some products it is also called Domain ID). As |
| 73 | all adjacent wireless networks share the same medium, this parameter |
| 74 | is used to differenciate them (create logical colocated networks) and |
| 75 | identify nodes belonguing to the same cell. With some card, you may |
| 76 | disable the Network ID checking (NWID promiscuous) with |
| 77 | .IR off " (and " on |
| 78 | to 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 |
| 87 | Set the operating frequency or channel in the device. Value below 1000 |
| 88 | are the channel number, value over this is the frequency in Hz. You |
| 89 | must append the suffix k, M or G to the value (for example, "2.46G" |
| 90 | for 2.46 GHz frequency), or add enough '0'. |
| 91 | .br |
| 92 | Channels are usually numbered starting at 1, |
| 93 | and you may use |
| 94 | .IR iwpriv (8) |
| 95 | to get the total number of channels and list the available |
| 96 | frequencies. Depending on regulations, some frequencies/channels may |
| 97 | not 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 |
| 106 | Set the sensitivity threshold. This is the lowest signal level for |
| 107 | which we attempt a packet reception, signal lower than this are not |
| 108 | received. This is used to avoid receiving background noise, so you |
| 109 | should set it according to the average noise level. Positive values |
| 110 | are assumed to be the raw value used by the hardware or a percentage, |
| 111 | negative values are assumed to be dBm. |
| 112 | .br |
| 113 | With some hardware, this parameter also control the defer threshold |
| 114 | (lowest signal level for which we consider the channel busy) and the |
| 115 | handover threshold (lowest signal level where we stay associated with |
| 116 | the current access point). |
| 117 | .br |
| 118 | .B Example : |
| 119 | .br |
| 120 | .I " iwconfig eth0 sens -80" |
| 121 | .TP |
| 122 | .B mode |
| 123 | Set the operating mode of the device, which depends on the network |
| 124 | topology. 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 |
| 146 | Force the card to register to the Access Point given by the address, |
| 147 | if it is possible. When the quality of the connection goes too low, |
| 148 | the driver may revert back to automatic mode (the card finds the best |
| 149 | Access Point in range). |
| 150 | .br |
| 151 | You may also use |
| 152 | .I off |
| 153 | to re-enable automatic mode without changing the current Access Point, |
| 154 | or you may use |
| 155 | .I any |
| 156 | or |
| 157 | .I auto |
| 158 | to 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] |
| 169 | Set the nickname, or the station name. Most 802.11 products do define |
| 170 | it, but this is not used as far as the protocols (MAC, IP, TCP) are |
| 171 | concerned and completely accessory as far as configuration goes. In |
| 172 | fact 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] |
| 179 | For cards supporting multiple bit rates, set the bit-rate in b/s. The |
| 180 | bit-rate is the speed at which bits are transmitted over the medium, |
| 181 | the user speed of the link is lower due to medium sharing and |
| 182 | overhead. |
| 183 | .br |
| 184 | You 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 |
| 186 | card specific, usually an index in the bit-rate list. Use |
| 187 | .I auto |
| 188 | to select the automatic bit-rate mode (fallback to lower rate on noisy |
| 189 | channels), which is the default for most cards, and |
| 190 | .I fixed |
| 191 | to revert back to fixed setting. If you specify a bit-rate value and append |
| 192 | .IR auto , |
| 193 | the 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] |
| 204 | RTS/CTS adds a handshake before each packet transmission to make sure |
| 205 | that the channel is clear. This adds overhead, but increase |
| 206 | performance in case of hidden nodes or large number of active |
| 207 | nodes. This parameters set the size of the smallest packet for which |
| 208 | the node sends RTS, a value equal to the maximum packet size disable |
| 209 | the 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] |
| 219 | Fragmentation allow to split a IP packet in a burst of smaller |
| 220 | fragments transmitted on the medium. In most cases this adds overhead, |
| 221 | but in very noisy environment this reduce the error penalty. This |
| 222 | parameter set the maximum fragment size, a value equal to the maximum |
| 223 | packet 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] |
| 233 | Used to manipulate encryption or scrambling keys and encryption mode. |
| 234 | .br |
| 235 | To set the current encryption key, just enter the key in hex digits as |
| 236 | .IR XXXX-XXXX-XXXX-XXXX " or " XXXXXXXX . |
| 237 | To set a key other than the current key, prepend or append |
| 238 | .I [index] |
| 239 | to the key itself (this won't change which is the active key). You can |
| 240 | also enter the key as an ASCII string by using the |
| 241 | .I s: |
| 242 | prefix. Passphrase is currently not supported. |
| 243 | .br |
| 244 | To 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 |
| 249 | disable and reenable encryption, |
| 250 | .I open |
| 251 | set the system in open mode (accept non-encrypted packets) and |
| 252 | .I restricted |
| 253 | discard non-encrypted packets. |
| 254 | .br |
| 255 | If you need to set multiple keys, or set a key and change the active |
| 256 | key, you need to use multiple |
| 257 | .B key |
| 258 | directives. Arguments can be put in any order, the last one will take |
| 259 | precendence. |
| 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 |
| 276 | Used to manipulate power management scheme parameters and mode. |
| 277 | .br |
| 278 | To set the period between wake up, enter |
| 279 | .IR "period `value'" . |
| 280 | To set the timeout before going back to sleep, enter |
| 281 | .IR "timeout `value'" . |
| 282 | You can also add the |
| 283 | .IR min " and " max |
| 284 | modifiers. By defaults, those values are in seconds, append the |
| 285 | suffix m or u to specify values un milliseconds or |
| 286 | microseconds. Sometimes, those values are without units (number of |
| 287 | dwell or the like). |
| 288 | .br |
| 289 | .IR off " and " on |
| 290 | disable and reenable power management. Finally, you may set the power |
| 291 | management 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 |
| 312 | For cards supporting multiple transmit powers, set the transmit power in dBm. If |
| 313 | .I W |
| 314 | is the power in Watt, the power in dBm is |
| 315 | .IR "P = 30 + 10.log(W)" . |
| 316 | If the value is postfixed by |
| 317 | .IR mW , |
| 318 | it will be automatically converted to dBm. |
| 319 | .br |
| 320 | In addition, |
| 321 | .IR on " and " off |
| 322 | enable and disable the radio, and |
| 323 | .IR auto " and " fixed |
| 324 | enable 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 |
| 337 | Most cards have MAC retransmissions, and some allow to set the |
| 338 | behaviour of the retry mechanism. |
| 339 | .br |
| 340 | To set the maximum number of retries, enter |
| 341 | .IR "limit `value'" . |
| 342 | This is an absolute value (without unit). |
| 343 | The set the maximum length of time the MAC should retry, enter |
| 344 | .IR "lifetime `value'" . |
| 345 | By defaults, this value in in seconds, append the suffix m or u to |
| 346 | specify values un milliseconds or microseconds. |
| 347 | .br |
| 348 | You can also add the |
| 349 | .IR min " and " max |
| 350 | modifiers. If the card support automatic mode, they define the bounds |
| 351 | of the limit or lifetime. Some other cards define different values |
| 352 | depending on packet size, for example in 802.11 |
| 353 | .I min limit |
| 354 | is 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 |
| 365 | Some cards may not apply changes done through Wireless Extensions |
| 366 | immediately (they may wait to agregate the changes or apply it only |
| 367 | when the card is brought up via ifconfig). This command (when |
| 368 | available) force the card to apply all pending changes. |
| 369 | .br |
| 370 | This is normally not needed, because the card will eventually apply |
| 371 | the changes, but can be usefull for debugging. |
| 372 | .\" |
| 373 | .\" DISPLAY part |
| 374 | .\" |
| 375 | .SH DISPLAY |
| 376 | For each device which support wireless extensions, |
| 377 | .I iwconfig |
| 378 | will display the name of the |
| 379 | .B MAC protocol |
| 380 | used (name of device for proprietary protocols), the |
| 381 | .B ESSID |
| 382 | (Network Name), the |
| 383 | .BR NWID , |
| 384 | the |
| 385 | .B frequency |
| 386 | (or channel), the |
| 387 | .BR sensitivity , |
| 388 | the |
| 389 | .B mode |
| 390 | of operation, the |
| 391 | .B Access Point |
| 392 | address, the |
| 393 | .B bit-rate |
| 394 | the |
| 395 | .BR "RTS threshold" ", the " "fragmentation threshold" , |
| 396 | the |
| 397 | .B encryption key |
| 398 | and the |
| 399 | .B power management |
| 400 | settings (depending on availability). |
| 401 | .br |
| 402 | See above for explanations of what these parameters mean. |
| 403 | .br |
| 404 | If the label for bitrate is followed by |
| 405 | .RB ` = ', |
| 406 | it means that the parameter is fixed and forced to that value, if it |
| 407 | is followed by |
| 408 | .RB ` : ' |
| 409 | it is only the current value (device in normal auto mode). |
| 410 | .PP |
| 411 | If |
| 412 | .I /proc/net/wireless |
| 413 | exists, |
| 414 | .I iwconfig |
| 415 | will also display its content : |
| 416 | .TP |
| 417 | .B Link quality |
| 418 | Quality of the link or the modulation (what is the level of contention |
| 419 | or interference, or how good the received signal is). |
| 420 | .TP |
| 421 | .B Signal level |
| 422 | Received signal strength (how strong the received signal is). |
| 423 | .TP |
| 424 | .B Noise level |
| 425 | Background noise level (when no packet is transmited). |
| 426 | .TP |
| 427 | .B invalid nwid |
| 428 | Number of packets received with a different NWID. Used to detect |
| 429 | configuration problems or adjacent network existence. |
| 430 | .TP |
| 431 | .B invalid crypt |
| 432 | Number of packets that the hardware was unable to decrypt. |
| 433 | .TP |
| 434 | .B invalid misc |
| 435 | Other packets lost in relation with specific wireless operations. |
| 436 | .\" |
| 437 | .\" AUTHOR part |
| 438 | .\" |
| 439 | .SH AUTHOR |
| 440 | Jean 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). |