iwconfig - configure a wireless network interface
iwconfig interface [essid X] [nwid N] [freq F] [channel C]
[sens S] [mode M] [ap A] [nick NN]
[rate R] [rts RT] [frag FT] [txpower T]
[enc E] [key K] [power P] [retry R]
is similar to
but is dedicated to the wireless interfaces. It is used to set the
parameters of the network interface which are specific to the wireless
operation (for example : the frequency).
may also be used to display those parameters, and the wireless
statistics (extracted from
All these parameters and statistics are device dependent. Each driver
will provide only some of them depending on hardware support, and the
range of values may change. Please refer to the man page of each
device for details.
Set the ESSID (or Network Name - in some products it may also be
called Domain ID). The ESSID is used to identify cells which are part
of the same virtual network.
As opposed to the AP Address or NWID which define a single cell, the
ESSID defines a group of cells connected via repeaters or
infrastructure, where the user may roam transparently.
With some cards, you may disable the ESSID checking (ESSID
off or any (and on
to reenable it).
iwconfig eth0 essid any
iwconfig eth0 essid My Network
Set the Network ID (in some products it may also be called Domain
ID). As all adjacent wireless networks share the same medium, this
parameter is used to differenciate them (create logical colocated
networks) and identify nodes belonging to the same cell.
This parameter is only used for pre-802.11 hardware, the 802.11
protocol uses the ESSID and AP Address for this function.
With some cards, you may disable the Network ID checking (NWID
off (and on
to reenable it).
iwconfig eth0 nwid AB34
iwconfig eth0 nwid off
Set the operating frequency or channel in the device. A value below
1000 indicates a channel number, a value greater than 1000 is a
frequency in Hz. You may append the suffix k, M or G to the value (for
example, "2.46G" for 2.46 GHz frequency), or add enough '0'.
Channels are usually numbered starting at 1, and you may use
to get the total number of channels, list the available frequencies,
and display the current frequency as a channel. Depending on
regulations, some frequencies/channels may not be available.
iwconfig eth0 freq 2422000000
iwconfig eth0 freq 2.422G
iwconfig eth0 channel 3
Set the sensitivity threshold. This is the lowest signal level for
which the hardware attempt packet reception, signals weaker than this
are ignored. This is used to avoid receiving background noise, so you
should set it according to the average noise level. Positive values
are assumed to be the raw value used by the hardware or a percentage,
negative values are assumed to be dBm.
With some hardware, this parameter also controls the defer threshold
(lowest signal level for which the hardware consider the channel busy)
and the handover threshold (signal level where the hardware start
looking for a new access point).
iwconfig eth0 sens -80
Set the operating mode of the device, which depends on the network
topology. The mode can be
(network composed of only one cell and without Access Point),
(node connects to a network composed of many Access Points, with roaming),
(the node is the synchronisation master or acts as an Access Point),
(the node forwards packets between other wireless nodes),
(the node acts as a backup master/repeater),
(the node acts as a passive monitor and only receives packets) or
iwconfig eth0 mode Managed
iwconfig eth0 mode Ad-Hoc
Force the card to register to the Access Point given by the address,
if it is possible. When the quality of the connection goes too low,
the driver may revert back to automatic mode (the card selects the
best Access Point in range).
You may also use
to re-enable automatic mode without changing the current Access Point,
or you may use
to force the card to reassociate with the currently best Access Point.
iwconfig eth0 ap 00:60:1D:01:23:45
iwconfig eth0 ap any
iwconfig eth0 ap off
Set the nickname, or the station name. Some 802.11 products do define
it, but this is not used as far as the protocols (MAC, IP, TCP) are
concerned and completely useless as far as configuration goes. Only
some diagnostic tools may use it.
iwconfig eth0 nickname My Linux Node
For cards supporting multiple bit rates, set the bit-rate in b/s. The
bit-rate is the speed at which bits are transmitted over the medium,
the user speed of the link is lower due to medium sharing and
You may append the suffix k, M or G to the value (decimal multiplier :
10^3, 10^6 and 10^9 b/s), or add enough '0'. Values below 1000 are
card specific, usually an index in the bit-rate list. Use
to select automatic bit-rate mode (fallback to lower rate on noisy
channels), which is the default for most cards, and
to revert back to fixed setting. If you specify a bit-rate value and append
the driver will use all bit-rates lower and equal than this value.
iwconfig eth0 rate 11M
iwconfig eth0 rate auto
iwconfig eth0 rate 5.5M auto
RTS/CTS adds a handshake before each packet transmission to make sure
that the channel is clear. This adds overhead, but increases
performance in case of hidden nodes or a large number of active
nodes. This parameter sets the size of the smallest packet for which
the node sends RTS ; a value equal to the maximum packet size disable
the mechanism. You may also set this parameter to
auto, fixed or off.
iwconfig eth0 rts 250
iwconfig eth0 rts off
Fragmentation allows to split an IP packet in a burst of smaller
fragments transmitted on the medium. In most cases this adds overhead,
but in a very noisy environment this reduces the error penalty and
allow packets to get through interference bursts. This parameter sets
the maximum fragment size ; a value equal to the maximum packet size
disable the mechanism. You may also set this parameter to
auto, fixed or off.
iwconfig eth0 frag 512
iwconfig eth0 frag off
Used to manipulate encryption or scrambling keys and security mode.
To set the current encryption key, just enter the key in hex digits as
XXXX-XXXX-XXXX-XXXX or XXXXXXXX.
To set a key other than the current key, prepend or append
to the key itself (this won't change which is the active key). You can
also enter the key as an ASCII string by using the
prefix. Passphrase is currently not supported.
To change which key is the currently active key, just enter
(without entering any key value).
off and on
disable and reenable encryption.
The security mode may be
and its meaning depends on the card used. With most cards, in
mode no authentication is used and the card may also accept
non-encrypted sessions, whereas in
mode only encrypted sessions are accepted and the card will use
authentication if available.
If you need to set multiple keys, or set a key and change the active
key, you need to use multiple
directives. Arguments can be put in any order, the last one will take
iwconfig eth0 key 0123-4567-89
iwconfig eth0 key  0123-4567-89
iwconfig eth0 key s:password 
iwconfig eth0 key 
iwconfig eth0 key open
iwconfig eth0 key off
iwconfig eth0 key restricted  0123456789
iwconfig eth0 key 01-23 key 45-67  key 
Used to manipulate power management scheme parameters and mode.
To set the period between wake ups, enter
To set the timeout before going back to sleep, enter
You can also add the
min and max
modifiers. By default, those values are in seconds, append the suffix
m or u to specify values in milliseconds or microseconds. Sometimes,
those values are without units (number of beacon periods, dwell or
off and on
disable and reenable power management. Finally, you may set the power
management mode to
(receive all packets),
(receive unicast packets only, discard multicast and broadcast) and
(receive multicast and broadcast only, discard unicast packets).
iwconfig eth0 power period 2
iwconfig eth0 power 500m unicast
iwconfig eth0 power timeout 300u all
iwconfig eth0 power off
iwconfig eth0 power min period 2 power max period 4
For cards supporting multiple transmit powers, set the transmit power in dBm. If
is the power in Watt, the power in dBm is
P = 30 + 10.log(W).
If the value is postfixed by
it will be automatically converted to dBm.
on and off
enable and disable the radio, and
auto and fixed
enable and disable power control (if those features are available).
iwconfig eth0 txpower 15
iwconfig eth0 txpower 30mW
iwconfig eth0 txpower auto
iwconfig eth0 txpower off
Most cards have MAC retransmissions, and some allow to set the
behaviour of the retry mechanism.
To set the maximum number of retries, enter
This is an absolute value (without unit).
The set the maximum length of time the MAC should retry, enter
By defaults, this value in in seconds, append the suffix m or u to
specify values in milliseconds or microseconds.
You can also add the
min and max
modifiers. If the card supports automatic mode, they define the bounds
of the limit or lifetime. Some other cards define different values
depending on packet size, for example in 802.11
is the short retry limit (non RTS/CTS packets).
iwconfig eth0 retry 16
iwconfig eth0 retry lifetime 300m
iwconfig eth0 retry min limit 8
Some cards may not apply changes done through Wireless Extensions
immediately (they may wait to agregate the changes or apply it only
when the card is brought up via ifconfig). This command (when
available) forces the card to apply all pending changes.
This is normally not needed, because the card will eventually apply
the changes, but can be useful for debugging.
For each device which supports wireless extensions,
will display the name of the
used (name of device for proprietary protocols), the
(Network Name), the
(or channel), the
of operation, the
, the fragmentation threshold
settings (depending on availability).
The parameters displayed have the same meaning and values as the
parameter you can set, please refer to the previous part for a
detailed explanation of them.
Some parameters are only displayed in short/abreviated form (such as
encryption). You may use
to get all the details.
Some parameters have two modes (such as bitrate). If the value is
it means that the parameter is fixed and forced to that value, if it
is prefixed by
the parameter is in automatic mode and the current value is shown (and
- Access Point/Cell
An address equal to 00:00:00:00:00:00 means that the card failed to
associate with an Access Point (most likely a configuration
parameter will be shown as
in ad-hoc mode (for obvious reasons), but otherwise works the same.
will also display its content. Note that those values will depend on
the driver and the hardware specifics, so you need to refer to your
driver documentation for proper interpretation of those values.
- Link quality
Overall quality of the link. May be based on the level of contention
or interference, the bit or frame error rate, how good the received
signal is, some timing synchronisation, or other hardware metric. This
is an aggregate value, and depends totally on the driver and hardware.
- Signal level
Received signal strength (RSSI - how strong the received signal
is). May be arbitrary units or dBm,
uses driver meta information to interpret the raw value given by
and display the proper unit or maximum value (using 8 bit arithmetic). In
mode, this may be undefined and you should use
- Noise level
Background noise level (when no packet is transmitted). Similar
comments as for
- Rx invalid nwid
Number of packets received with a different NWID or ESSID. Used to
detect configuration problems or adjacent network existence (on the
- Rx invalid crypt
Number of packets that the hardware was unable to decrypt. This can be
used to detect invalid encryption settings.
- Rx invalid frag
Number of packets for which the hardware was not able to properly
re-assemble the link layer fragments (most likely one was missing).
- Tx excessive retries
Number of packets that the hardware failed to deliver. Most MAC
protocols will retry the packet a number of times before giving up.
- Invalid misc
Other packets lost in relation with specific wireless operations.
- Missed beacon
Number of periodic beacons from the Cell or the Access Point we have
missed. Beacons are sent at regular intervals to maintain the cell
coordination, failure to receive them usually indicates that the card
is out of range.
Jean Tourrilhes - firstname.lastname@example.org
- SEE ALSO