iwconfig.8 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. .\" Jean II - HPLB - 1996 => HPL - 2004
  2. .\" iwconfig.8
  3. .\"
  4. .TH IWCONFIG 8 "30 March 2006" "wireless-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 "] [mode " M "] [freq " F "]
  17. .br
  18. .BI " [channel " C ] [sens " S "] [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 " [modu " M "] [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 dependent. Each driver
  45. will provide only some of them depending on hardware support, and the
  46. range of values 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 be
  55. called Domain ID). The ESSID is used to identify cells which are part
  56. of the same virtual network.
  57. .br
  58. As opposed to the AP Address or NWID which define a single cell, the
  59. ESSID defines a group of cells connected via repeaters or
  60. infrastructure, where the user may roam transparently.
  61. .br
  62. With some cards, you may disable the ESSID checking (ESSID
  63. promiscuous) with
  64. .IR off " or " any " (and " on
  65. to reenable it).
  66. .br
  67. If the ESSID of your network is one of the special keywords
  68. .RI ( off ", " on " or " any ),
  69. you should use
  70. .I --
  71. to escape it.
  72. .br
  73. .B Examples :
  74. .br
  75. .I " iwconfig eth0 essid any"
  76. .br
  77. .I " iwconfig eth0 essid ""My Network""
  78. .br
  79. .I " iwconfig eth0 essid -- ""ANY""
  80. .TP
  81. .BR nwid
  82. Set the Network ID. As all adjacent wireless networks share the same
  83. medium, this parameter is used to differentiate them (create logical
  84. colocated networks) and identify nodes belonging to the same cell.
  85. .br
  86. This parameter is only used for pre-802.11 hardware, the 802.11
  87. protocol uses the ESSID and AP Address for this function.
  88. .br
  89. With some cards, you may disable the Network ID checking (NWID
  90. promiscuous) with
  91. .IR off " (and " on
  92. to reenable it).
  93. .br
  94. .B Examples :
  95. .br
  96. .I " iwconfig eth0 nwid AB34
  97. .br
  98. .I " iwconfig eth0 nwid off"
  99. .TP
  100. .BR nick [name]
  101. Set the nickname, or the station name. Some 802.11 products do define
  102. it, but this is not used as far as the protocols (MAC, IP, TCP) are
  103. concerned and completely useless as far as configuration goes. Only
  104. some wireless diagnostic tools may use it.
  105. .br
  106. .B Example :
  107. .br
  108. .I " iwconfig eth0 nickname ""My Linux Node""
  109. .TP
  110. .B mode
  111. Set the operating mode of the device, which depends on the network
  112. topology. The mode can be
  113. .I Ad-Hoc
  114. (network composed of only one cell and without Access Point),
  115. .I Managed
  116. (node connects to a network composed of many Access Points, with roaming),
  117. .I Master
  118. (the node is the synchronisation master or acts as an Access Point),
  119. .I Repeater
  120. (the node forwards packets between other wireless nodes),
  121. .I Secondary
  122. (the node acts as a backup master/repeater),
  123. .I Monitor
  124. (the node is not associated with any cell and passively monitor all
  125. packets on the frequency) or
  126. .IR Auto .
  127. .br
  128. .B Example :
  129. .br
  130. .I " iwconfig eth0 mode Managed"
  131. .br
  132. .I " iwconfig eth0 mode Ad-Hoc"
  133. .TP
  134. .BR freq / channel
  135. Set the operating frequency or channel in the device. A value below
  136. 1000 indicates a channel number, a value greater than 1000 is a
  137. frequency in Hz. You may append the suffix k, M or G to the value (for
  138. example, "2.46G" for 2.46 GHz frequency), or add enough '0'.
  139. .br
  140. Channels are usually numbered starting at 1, and you may use
  141. .IR iwlist (8)
  142. to get the total number of channels, list the available frequencies,
  143. and display the current frequency as a channel. Depending on
  144. regulations, some frequencies/channels may not be available.
  145. .br
  146. When using Managed mode, most often the Access Point dictates the
  147. channel and the driver may refuse the setting of the frequency. In
  148. Ad-Hoc mode, the frequency setting may only be used at initial cell
  149. creation, and may be ignored when joining an existing cell.
  150. .br
  151. You may also use
  152. .I off
  153. or
  154. .I auto
  155. to let the card pick up the best channel (when supported).
  156. .br
  157. .B Examples :
  158. .br
  159. .I " iwconfig eth0 freq 2422000000"
  160. .br
  161. .I " iwconfig eth0 freq 2.422G"
  162. .br
  163. .I " iwconfig eth0 channel 3"
  164. .br
  165. .I " iwconfig eth0 channel auto"
  166. .TP
  167. .B ap
  168. Force the card to register to the Access Point given by the address,
  169. if it is possible. This address is the cell identity of the Access
  170. Point, as reported by wireless scanning, which may be different from
  171. its network MAC address. If the wireless link is point to point, set
  172. the address of the other end of the link. If the link is ad-hoc, set
  173. the cell identity of the ad-hoc network.
  174. .br
  175. When the quality of the connection goes too low, the driver may revert
  176. back to automatic mode (the card selects the best Access Point in
  177. range).
  178. .br
  179. You may also use
  180. .I off
  181. to re-enable automatic mode without changing the current Access Point,
  182. or you may use
  183. .I any
  184. or
  185. .I auto
  186. to force the card to reassociate with the currently best Access Point.
  187. .br
  188. .B Example :
  189. .br
  190. .I " iwconfig eth0 ap 00:60:1D:01:23:45"
  191. .br
  192. .I " iwconfig eth0 ap any"
  193. .br
  194. .I " iwconfig eth0 ap off"
  195. .TP
  196. .BR rate / bit [rate]
  197. For cards supporting multiple bit rates, set the bit-rate in b/s. The
  198. bit-rate is the speed at which bits are transmitted over the medium,
  199. the user speed of the link is lower due to medium sharing and
  200. various overhead.
  201. .br
  202. You may append the suffix k, M or G to the value (decimal multiplier :
  203. 10^3, 10^6 and 10^9 b/s), or add enough '0'. Values below 1000 are
  204. card specific, usually an index in the bit-rate list. Use
  205. .I auto
  206. to select automatic bit-rate mode (fallback to lower rate on noisy
  207. channels), which is the default for most cards, and
  208. .I fixed
  209. to revert back to fixed setting. If you specify a bit-rate value and append
  210. .IR auto ,
  211. the driver will use all bit-rates lower and equal than this value.
  212. .br
  213. .B Examples :
  214. .br
  215. .I " iwconfig eth0 rate 11M"
  216. .br
  217. .I " iwconfig eth0 rate auto"
  218. .br
  219. .I " iwconfig eth0 rate 5.5M auto"
  220. .TP
  221. .BR txpower
  222. For cards supporting multiple transmit powers, sets the transmit power
  223. in dBm. If
  224. .I W
  225. is the power in Watt, the power in dBm is
  226. .IR "P = 30 + 10.log(W)" .
  227. If the value is postfixed by
  228. .IR mW ,
  229. it will be automatically converted to dBm.
  230. .br
  231. In addition,
  232. .IR on " and " off
  233. enable and disable the radio, and
  234. .IR auto " and " fixed
  235. enable and disable power control (if those features are available).
  236. .br
  237. .B Examples :
  238. .br
  239. .I " iwconfig eth0 txpower 15"
  240. .br
  241. .I " iwconfig eth0 txpower 30mW"
  242. .br
  243. .I " iwconfig eth0 txpower auto"
  244. .br
  245. .I " iwconfig eth0 txpower off"
  246. .TP
  247. .B sens
  248. Set the sensitivity threshold. This define how sensitive is the card
  249. to poor operating conditions (low signal, interference). Positive
  250. values are assumed to be the raw value used by the hardware or a
  251. percentage, negative values are assumed to be dBm. Depending on the
  252. hardware implementation, this parameter may control various functions.
  253. .br
  254. On modern cards, this parameter usually control handover/roaming
  255. threshold, the lowest signal level for which the hardware remains
  256. associated with the current Access Point. When the signal level goes
  257. below this threshold the card starts looking for a new/better Access
  258. Point. Some cards may use the number of missed beacons to trigger
  259. this. For high density of Access Points, a higher threshold make sure
  260. the card is always associated with the best AP, for low density of
  261. APs, a lower threshold minimise the number of failed handoffs.
  262. .br
  263. On more ancient card this parameter usually controls the defer
  264. threshold, the lowest signal level for which the hardware considers
  265. the channel busy. Signal levels above this threshold make the hardware
  266. inhibits its own transmission whereas signals weaker than this are
  267. ignored and the hardware is free to transmit. This is usually strongly
  268. linked to the receive threshold, the lowest signal level for which the
  269. hardware attempts packet reception. Proper setting of these thresholds
  270. prevent the card to waste time on background noise while still
  271. receiving weak transmissions. Modern designs seems to control those
  272. thresholds automatically.
  273. .br
  274. .br
  275. .B Example :
  276. .br
  277. .I " iwconfig eth0 sens -80"
  278. .br
  279. .I " iwconfig eth0 sens 2"
  280. .TP
  281. .BR retry
  282. Most cards have MAC retransmissions, and some allow to set the
  283. behaviour of the retry mechanism.
  284. .br
  285. To set the maximum number of retries, enter
  286. .IR "limit `value'" .
  287. This is an absolute value (without unit), and the default (when
  288. nothing is specified).
  289. To set the maximum length of time the MAC should retry, enter
  290. .IR "lifetime `value'" .
  291. By defaults, this value in in seconds, append the suffix m or u to
  292. specify values in milliseconds or microseconds.
  293. .br
  294. You can also add the
  295. .IR short ", " long ", " min " and " max
  296. modifiers. If the card supports automatic mode, they define the bounds
  297. of the limit or lifetime. Some other cards define different values
  298. depending on packet size, for example in 802.11
  299. .I min limit
  300. is the short retry limit (non RTS/CTS packets).
  301. .br
  302. .B Examples :
  303. .br
  304. .I " iwconfig eth0 retry 16"
  305. .br
  306. .I " iwconfig eth0 retry lifetime 300m"
  307. .br
  308. .I " iwconfig eth0 retry short 12"
  309. .br
  310. .I " iwconfig eth0 retry min limit 8"
  311. .TP
  312. .BR rts [_threshold]
  313. RTS/CTS adds a handshake before each packet transmission to make sure
  314. that the channel is clear. This adds overhead, but increases
  315. performance in case of hidden nodes or a large number of active
  316. nodes. This parameter sets the size of the smallest packet for which
  317. the node sends RTS ; a value equal to the maximum packet size disables
  318. the mechanism. You may also set this parameter to
  319. .IR auto ", " fixed " or " off .
  320. .br
  321. .B Examples :
  322. .br
  323. .I " iwconfig eth0 rts 250"
  324. .br
  325. .I " iwconfig eth0 rts off"
  326. .TP
  327. .BR frag [mentation_threshold]
  328. Fragmentation allows to split an IP packet in a burst of smaller
  329. fragments transmitted on the medium. In most cases this adds overhead,
  330. but in a very noisy environment this reduces the error penalty and
  331. allow packets to get through interference bursts. This parameter sets
  332. the maximum fragment size which is always lower than the maximum
  333. packet size.
  334. .br
  335. This parameter may also control Frame Bursting available on some
  336. cards, the ability to send multiple IP packets together. This
  337. mechanism would be enabled if the fragment size is larger than the
  338. maximum packet size.
  339. .br
  340. You may also set this parameter to
  341. .IR auto ", " fixed " or " off .
  342. .br
  343. .B Examples :
  344. .br
  345. .I " iwconfig eth0 frag 512"
  346. .br
  347. .I " iwconfig eth0 frag off"
  348. .TP
  349. .BR key / enc [ryption]
  350. Used to manipulate encryption or scrambling keys and security mode.
  351. .br
  352. To set the current encryption key, just enter the key in hex digits as
  353. .IR XXXX-XXXX-XXXX-XXXX " or " XXXXXXXX .
  354. To set a key other than the current key, prepend or append
  355. .I [index]
  356. to the key itself (this won't change which is the active key). You can
  357. also enter the key as an ASCII string by using the
  358. .I s:
  359. prefix. Passphrase is currently not supported.
  360. .br
  361. To change which key is the currently active key, just enter
  362. .I [index]
  363. (without entering any key value).
  364. .br
  365. .IR off " and " on
  366. disable and reenable encryption.
  367. .br
  368. The security mode may be
  369. .I open
  370. or
  371. .IR restricted ,
  372. and its meaning depends on the card used. With most cards, in
  373. .I open
  374. mode no authentication is used and the card may also accept
  375. non-encrypted sessions, whereas in
  376. .I restricted
  377. mode only encrypted sessions are accepted and the card will use
  378. authentication if available.
  379. .br
  380. If you need to set multiple keys, or set a key and change the active
  381. key, you need to use multiple
  382. .B key
  383. directives. Arguments can be put in any order, the last one will take
  384. precedence.
  385. .br
  386. .B Examples :
  387. .br
  388. .I " iwconfig eth0 key 0123-4567-89"
  389. .br
  390. .I " iwconfig eth0 key [3] 0123-4567-89"
  391. .br
  392. .I " iwconfig eth0 key s:password [2]"
  393. .br
  394. .I " iwconfig eth0 key [2]"
  395. .br
  396. .I " iwconfig eth0 key open"
  397. .br
  398. .I " iwconfig eth0 key off"
  399. .br
  400. .I " iwconfig eth0 key restricted [3] 0123456789"
  401. .br
  402. .I " iwconfig eth0 key 01-23 key 45-67 [4] key [4]"
  403. .TP
  404. .BR power
  405. Used to manipulate power management scheme parameters and mode.
  406. .br
  407. To set the period between wake ups, enter
  408. .IR "period `value'" .
  409. To set the timeout before going back to sleep, enter
  410. .IR "timeout `value'" .
  411. To set the generic level of power saving, enter
  412. .IR "saving `value'" .
  413. You can also add the
  414. .IR min " and " max
  415. modifiers. By default, those values are in seconds, append the suffix
  416. m or u to specify values in milliseconds or microseconds. Sometimes,
  417. those values are without units (number of beacon periods, dwell,
  418. percentage or similar).
  419. .br
  420. .IR off " and " on
  421. disable and reenable power management. Finally, you may set the power
  422. management mode to
  423. .I all
  424. (receive all packets),
  425. .I unicast
  426. (receive unicast packets only, discard multicast and broadcast) and
  427. .I multicast
  428. (receive multicast and broadcast only, discard unicast packets).
  429. .br
  430. .B Examples :
  431. .br
  432. .I " iwconfig eth0 power period 2"
  433. .br
  434. .I " iwconfig eth0 power 500m unicast"
  435. .br
  436. .I " iwconfig eth0 power timeout 300u all"
  437. .br
  438. .I " iwconfig eth0 power saving 3"
  439. .br
  440. .I " iwconfig eth0 power off"
  441. .br
  442. .I " iwconfig eth0 power min period 2 power max period 4"
  443. .TP
  444. .BR modu [lation]
  445. Force the card to use a specific set of modulations. Modern cards
  446. support various modulations, some which are standard, such as 802.11b
  447. or 802.11g, and some proprietary. This command force the card to only
  448. use the specific set of modulations listed on the command line. This
  449. can be used to fix interoperability issues.
  450. .br
  451. The list of available modulations depend on the card/driver and can be
  452. displayed using
  453. .IR "iwlist modulation" .
  454. Note that some card/driver may not be able to select each modulation
  455. listed independantly, some may come as a group. You may also set this
  456. parameter to
  457. .IR auto
  458. let the card/driver do its best.
  459. .br
  460. .B Examples :
  461. .br
  462. .I " iwconfig eth0 modu 11g"
  463. .br
  464. .I " iwconfig eth0 modu CCK OFDMa"
  465. .br
  466. .I " iwconfig eth0 modu auto"
  467. .TP
  468. .BR commit
  469. Some cards may not apply changes done through Wireless Extensions
  470. immediately (they may wait to aggregate the changes or apply it only
  471. when the card is brought up via
  472. .IR ifconfig ).
  473. This command (when available) forces the card to apply all pending
  474. changes.
  475. .br
  476. This is normally not needed, because the card will eventually apply
  477. the changes, but can be useful for debugging.
  478. .\"
  479. .\" DISPLAY part
  480. .\"
  481. .SH DISPLAY
  482. For each device which supports wireless extensions,
  483. .I iwconfig
  484. will display the name of the
  485. .B MAC protocol
  486. used (name of device for proprietary protocols), the
  487. .B ESSID
  488. (Network Name), the
  489. .BR NWID ,
  490. the
  491. .B frequency
  492. (or channel), the
  493. .BR sensitivity ,
  494. the
  495. .B mode
  496. of operation, the
  497. .B Access Point
  498. address, the
  499. .BR bit-rate ,
  500. the
  501. .BR "RTS threshold" ", the " "fragmentation threshold" ,
  502. the
  503. .B encryption key
  504. and the
  505. .B power management
  506. settings (depending on availability).
  507. .PP
  508. The parameters displayed have the same meaning and values as the
  509. parameters you can set, please refer to the previous part for a
  510. detailed explanation of them.
  511. .br
  512. Some parameters are only displayed in short/abbreviated form (such as
  513. encryption). You may use
  514. .IR iwlist (8)
  515. to get all the details.
  516. .br
  517. Some parameters have two modes (such as bitrate). If the value is
  518. prefixed by
  519. .RB ` = ',
  520. it means that the parameter is fixed and forced to that value, if it
  521. is prefixed by
  522. .RB ` : ',
  523. the parameter is in automatic mode and the current value is shown (and
  524. may change).
  525. .TP
  526. .BR "Access Point" / Cell
  527. An address equal to 00:00:00:00:00:00 means that the card failed to
  528. associate with an Access Point (most likely a configuration
  529. issue). The
  530. .B Access Point
  531. parameter will be shown as
  532. .B Cell
  533. in ad-hoc mode (for obvious reasons), but otherwise works the same.
  534. .PP
  535. If
  536. .I /proc/net/wireless
  537. exists,
  538. .I iwconfig
  539. will also display its content. Note that those values will depend on
  540. the driver and the hardware specifics, so you need to refer to your
  541. driver documentation for proper interpretation of those values.
  542. .TP
  543. .B Link quality
  544. Overall quality of the link. May be based on the level of contention
  545. or interference, the bit or frame error rate, how good the received
  546. signal is, some timing synchronisation, or other hardware metric. This
  547. is an aggregate value, and depends totally on the driver and hardware.
  548. .TP
  549. .B Signal level
  550. Received signal strength (RSSI - how strong the received signal
  551. is). May be arbitrary units or dBm,
  552. .I iwconfig
  553. uses driver meta information to interpret the raw value given by
  554. .I /proc/net/wireless
  555. and display the proper unit or maximum value (using 8 bit arithmetic). In
  556. .I Ad-Hoc
  557. mode, this may be undefined and you should use
  558. .IR iwspy .
  559. .TP
  560. .B Noise level
  561. Background noise level (when no packet is transmitted). Similar
  562. comments as for
  563. .BR "Signal level" .
  564. .TP
  565. .B Rx invalid nwid
  566. Number of packets received with a different NWID or ESSID. Used to
  567. detect configuration problems or adjacent network existence (on the
  568. same frequency).
  569. .TP
  570. .B Rx invalid crypt
  571. Number of packets that the hardware was unable to decrypt. This can be
  572. used to detect invalid encryption settings.
  573. .TP
  574. .B Rx invalid frag
  575. Number of packets for which the hardware was not able to properly
  576. re-assemble the link layer fragments (most likely one was missing).
  577. .TP
  578. .B Tx excessive retries
  579. Number of packets that the hardware failed to deliver. Most MAC
  580. protocols will retry the packet a number of times before giving up.
  581. .TP
  582. .B Invalid misc
  583. Other packets lost in relation with specific wireless operations.
  584. .TP
  585. .B Missed beacon
  586. Number of periodic beacons from the Cell or the Access Point we have
  587. missed. Beacons are sent at regular intervals to maintain the cell
  588. coordination, failure to receive them usually indicates that the card
  589. is out of range.
  590. .\"
  591. .\" AUTHOR part
  592. .\"
  593. .SH AUTHOR
  594. Jean Tourrilhes \- jt@hpl.hp.com
  595. .\"
  596. .\" FILES part
  597. .\"
  598. .SH FILES
  599. .I /proc/net/wireless
  600. .\"
  601. .\" SEE ALSO part
  602. .\"
  603. .SH SEE ALSO
  604. .BR ifconfig (8),
  605. .BR iwspy (8),
  606. .BR iwlist (8),
  607. .BR iwevent (8),
  608. .BR iwpriv (8),
  609. .BR wireless (7).