iwconfig: configure a wireless network interface
- Manual Alternate Wireless Mac Address Number
- Manual Alternate Wireless Mac Address Software
- Manual Alternate Wireless Mac Address Xbox One
Most WiFi router provides the features to add and connect the device to the network using the MAC address. Steps to be followed to configuration ( common to all WiFi routers) 1. Wireless transmissions, including industry standard WPA2 encryption. The device also includes MAC address filtering to allow network administrators to offer network access only to known computers and other devices based on their MAC addresses. System Requirements The following are the Minimum System Requirements in order to configure the device. A MAC (Media Access Control) address is a number that identifies the network adapter(s) on your device. You may need to provide your MAC address to register on the Williams Network if your device does not easily connect to Wi-Fi. To find the MAC address of your device, following the directions bellow for your device: Note: the MAC address is always 12 alpha-numerals from 0-9 and A-F.
Command to display iwconfig
manual in Linux: $ man 8 iwconfig
NAME
iwconfig - configure a wireless network interface
SYNOPSIS
iwconfig [interface]iwconfig interface [essid X] [nwid N] [mode M
Manual Alternate Wireless Mac Address Number
] [freq F][channel C][sens S ][ap A ][nick NN ]
[rate R] [rts RT] [frag FT] [txpower T]
[enc E] [key K] [power P] [retry R]
[modu M] [commit]
iwconfig --help
iwconfig --version
DESCRIPTION
Iwconfigis similar toifconfig(8),but is dedicated to the wireless interfaces. It is used to set theparameters of the network interface which are specific to the wirelessoperation (for example : the frequency).Iwconfigmay also be used to display those parameters, and the wirelessstatistics (extracted from/proc/net/wireless).All these parameters and statistics are device dependent. Each driverwill provide only some of them depending on hardware support, and therange of values may change. Please refer to the man page of eachdevice for details.
PARAMETERS
- Channels are usually numbered starting at 1, and you may useiwlist(8)to get the total number of channels, list the available frequencies,and display the current frequency as a channel. Depending onregulations, some frequencies/channels may not be available.
- ap
- Force the card to register to the Access Point given by the address,
if it is possible. This address is the cell identity of the AccessPoint, as reported by wireless scanning, which may be different fromits network MAC address. If the wireless link is point to point, setthe address of the other end of the link. If the link is ad-hoc, setthe cell identity of the ad-hoc network.
When the quality of the connection goes too low, the driver may revertback to automatic mode (the card selects the best Access Point inrange).
You may also useoffto re-enable automatic mode without changing the current Access Point,or you may useanyorautoto force the card to reassociate with the currently best Access Point.
Example :
iwconfig eth0 ap 00:60:1D:01:23:45
iwconfig eth0 ap any
iwconfig eth0 ap off - rate/bit[rate]
- 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 andvarious overhead.
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 arecard specific, usually an index in the bit-rate list. Useautoto select automatic bit-rate mode (fallback to lower rate on noisychannels), which is the default for most cards, andfixedto revert back to fixed setting. If you specify a bit-rate value and appendauto,the driver will use all bit-rates lower and equal than this value.
Examples :
iwconfig eth0 rate 11M
iwconfig eth0 rate auto
iwconfig eth0 rate 5.5M auto - txpower
- For cards supporting multiple transmit powers, sets the transmit power
in dBm. IfWis the power in Watt, the power in dBm isP = 30 + 10.log(W).If the value is postfixed bymW,it will be automatically converted to dBm.
In addition, on and offenable and disable the radio, andauto and fixedenable and disable power control (if those features are available).
Examples :
iwconfig eth0 txpower 15
iwconfig eth0 txpower 30mW
iwconfig eth0 txpower auto
iwconfig eth0 txpower off - sens
- Set the sensitivity threshold. This define how sensitive is the card
to poor operating conditions (low signal, interference). Positivevalues are assumed to be the raw value used by the hardware or apercentage, negative values are assumed to be dBm. Depending on thehardware implementation, this parameter may control various functions.
On modern cards, this parameter usually control handover/roamingthreshold, the lowest signal level for which the hardware remainsassociated with the current Access Point. When the signal level goesbelow this threshold the card starts looking for a new/better AccessPoint. Some cards may use the number of missed beacons to triggerthis. For high density of Access Points, a higher threshold make surethe card is always associated with the best AP, for low density ofAPs, a lower threshold minimise the number of failed handoffs.
On more ancient card this parameter usually controls the deferthreshold, the lowest signal level for which the hardware considersthe channel busy. Signal levels above this threshold make the hardwareinhibits its own transmission whereas signals weaker than this areignored and the hardware is free to transmit. This is usually stronglylinked to the receive threshold, the lowest signal level for which thehardware attempts packet reception. Proper setting of these thresholdsprevent the card to waste time on background noise while stillreceiving weak transmissions. Modern designs seems to control thosethresholds automatically.
Example :
iwconfig eth0 sens -80
iwconfig eth0 sens 2 - retry
- Most cards have MAC retransmissions, and some allow to set the
behaviour of the retry mechanism.
To set the maximum number of retries, enterlimit `value'.This is an absolute value (without unit), and the default (whennothing is specified).To set the maximum length of time the MAC should retry, enterlifetime `value'.By defaults, this value is in seconds, append the suffix m or u tospecify values in milliseconds or microseconds.
You can also add theshort, long, min and maxmodifiers. If the card supports automatic mode, they define the boundsof the limit or lifetime. Some other cards define different valuesdepending on packet size, for example in 802.11min limitis the short retry limit (non RTS/CTS packets).
Examples :
iwconfig eth0 retry 16
iwconfig eth0 retry lifetime 300m
iwconfig eth0 retry short 12
iwconfig eth0 retry min limit 8 - rts[_threshold]
- RTS/CTS adds a handshake before each packet transmission to make sure
that the channel is clear. This adds overhead, but increasesperformance in case of hidden nodes or a large number of activenodes. This parameter sets the size of the smallest packet for whichthe node sends RTS ; a value equal to the maximum packet size disablesthe mechanism. You may also set this parameter toauto, fixed or off.
Examples :
iwconfig eth0 rts 250
iwconfig eth0 rts off - frag[mentation_threshold]
- 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 andallow packets to get through interference bursts. This parameter setsthe maximum fragment size which is always lower than the maximumpacket size.
This parameter may also control Frame Bursting available on somecards, the ability to send multiple IP packets together. Thismechanism would be enabled if the fragment size is larger than themaximum packet size.
You may also set this parameter toauto, fixed or off.
Examples :
iwconfig eth0 frag 512
iwconfig eth0 frag off - key/enc[ryption]
- Used to manipulate encryption or scrambling keys and security mode.
To set the current encryption key, just enter the key in hex digits asXXXX-XXXX-XXXX-XXXX or XXXXXXXX.To set a key other than the current key, prepend or append[index]to the key itself (this won't change which is the active key). You canalso enter the key as an ASCII string by using thes:prefix. Passphrase is currently not supported.
To change which key is the currently active key, just enter[index](without entering any key value).
off and ondisable and reenable encryption.
The security mode may beopenorrestricted,and its meaning depends on the card used. With most cards, inopenmode no authentication is used and the card may also acceptnon-encrypted sessions, whereas inrestrictedmode only encrypted sessions are accepted and the card will useauthentication if available.
If you need to set multiple keys, or set a key and change the activekey, you need to use multiplekeydirectives. Arguments can be put in any order, the last one will takeprecedence.
Examples :
iwconfig eth0 key 0123-4567-89
iwconfig eth0 key [3] 0123-4567-89
iwconfig eth0 key s:password [2]
iwconfig eth0 key [2]
iwconfig eth0 key open
iwconfig eth0 key off
iwconfig eth0 key restricted [3] 0123456789
iwconfig eth0 key 01-23 key 45-67 [4] key [4] - power
- Used to manipulate power management scheme parameters and mode.
To set the period between wake ups, enterperiod `value'.To set the timeout before going back to sleep, entertimeout `value'.To set the generic level of power saving, entersaving `value'.You can also add themin and maxmodifiers. By default, those values are in seconds, append the suffixm or u to specify values in milliseconds or microseconds. Sometimes,those values are without units (number of beacon periods, dwell,percentage or similar).
off and ondisable and reenable power management. Finally, you may set the powermanagement mode toall(receive all packets),unicast(receive unicast packets only, discard multicast and broadcast) andmulticast(receive multicast and broadcast only, discard unicast packets).
Examples :
iwconfig eth0 power period 2
iwconfig eth0 power 500m unicast
iwconfig eth0 power timeout 300u all
iwconfig eth0 power saving 3
iwconfig eth0 power off
iwconfig eth0 power min period 2 power max period 4 - modu[lation]
- Force the card to use a specific set of modulations. Modern cards
support various modulations, some which are standard, such as 802.11bor 802.11g, and some proprietary. This command force the card to onlyuse the specific set of modulations listed on the command line. Thiscan be used to fix interoperability issues.
The list of available modulations depend on the card/driver and can bedisplayed usingiwlist modulation.Note that some card/driver may not be able to select each modulationlisted independently, some may come as a group. You may also set thisparameter toautolet the card/driver do its best.
Examples :
iwconfig eth0 modu 11g
iwconfig eth0 modu CCK OFDMa
iwconfig eth0 modu auto - commit
- Some cards may not apply changes done through Wireless Extensions
immediately (they may wait to aggregate the changes or apply it onlywhen the card is brought up viaifconfig).This command (when available) forces the card to apply all pendingchanges.
This is normally not needed, because the card will eventually applythe changes, but can be useful for debugging.
When using Managed mode, most often the Access Point dictates thechannel and the driver may refuse the setting of the frequency. InAd-Hoc mode, the frequency setting may only be used at initial cellcreation, and may be ignored when joining an existing cell.
You may also useofforautoto let the card pick up the best channel (when supported).
Examples :
iwconfig eth0 freq 2422000000
iwconfig eth0 freq 2.422G
iwconfig eth0 channel 3
iwconfig eth0 channel auto
DISPLAY
For each device which supports wireless extensions,iwconfigwill display the name of theMAC protocolused (name of device for proprietary protocols), theThe parameters displayed have the same meaning and values as theparameters you can set, please refer to the previous part for adetailed explanation of them.
Some parameters are only displayed in short/abbreviated form (such asencryption). You may useiwlist(8)to get all the details.
Some parameters have two modes (such as bitrate). If the value isprefixed by`=',it means that the parameter is fixed and forced to that value, if itis prefixed by`:',the parameter is in automatic mode and the current value is shown (andmay change).
- Link quality
- Overall quality of the link. May be based on the level of contentionor interference, the bit or frame error rate, how good the receivedsignal is, some timing synchronisation, or other hardware metric. Thisis an aggregate value, and depends totally on the driver and hardware.
- Signal level
- Received signal strength (RSSI - how strong the received signalis). May be arbitrary units or dBm,iwconfiguses driver meta information to interpret the raw value given by/proc/net/wirelessand display the proper unit or maximum value (using 8 bit arithmetic). InAd-Hocmode, this may be undefined and you should useiwspy.
- Noise level
- Background noise level (when no packet is transmitted). Similarcomments as forSignal level.
- Rx invalid nwid
- Number of packets received with a different NWID or ESSID. Used todetect configuration problems or adjacent network existence (on thesame frequency).
- Rx invalid crypt
- Number of packets that the hardware was unable to decrypt. This can beused to detect invalid encryption settings.
- Rx invalid frag
- Number of packets for which the hardware was not able to properlyre-assemble the link layer fragments (most likely one was missing).
- Tx excessive retries
- Number of packets that the hardware failed to deliver. Most MACprotocols 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 havemissed. Beacons are sent at regular intervals to maintain the cellcoordination, failure to receive them usually indicates that the cardis out of range.
AUTHOR
Jean Tourrilhes - jt [at] hpl.hp.comFILES
/proc/net/wirelessSEE ALSO
ifconfig(8),iwspy(8),iwlist(8),iwevent(8),iwpriv(8),wireless(7).Pages related to iwconfig
- iw (8) - show / manipulate wireless devices and their configuration
- iwdt (8) - display and set WatchDog Timer parameters
- iwevent (8) - Display Wireless Events generated by drivers and setting changes
- iwgetid (8) - Report ESSID, NWID or AP/Cell Address of wireless network
- iwhd_selinux (8) - Security Enhanced Linux Policy for the iwhd processes
- iwlist (8) - Get more detailed wireless information from a wireless interface
iwconfig: configure a wireless network interface
Command to display iwconfig
manual in Linux: $ man 8 iwconfig
NAME
iwconfig - configure a wireless network interface
SYNOPSIS
iwconfig [interface]iwconfig interface [essid X] [nwid N] [mode M] [freq F]
[channel C][sens S ][ap A ][nick
[rate R] [rts RT] [frag FT] [txpower T]
[enc E] [key
[modu M] [commit]
iwconfig --help
iwconfig --version
DESCRIPTION
Iwconfigis similar toifconfig(8),but is dedicated to the wireless interfaces. It is used to set theparameters of the network interface which are specific to the wirelessoperation (for example : the frequency).Iwconfigmay also be used to display those parameters, and the wirelessstatistics (extracted from/proc/net/wireless).All these parameters and statistics are device dependent. Each driverwill provide only some of them depending on hardware support, and therange of values may change. Please refer to the man page of eachdevice for details.
PARAMETERS
- Channels are usually numbered starting at 1, and you may useiwlist(8)to get the total number of channels, list the available frequencies,and display the current frequency as a channel. Depending onregulations, some frequencies/channels may not be available.
- ap
- Force the card to register to the Access Point given by the address,
if it is possible. This address is the cell identity of the AccessPoint, as reported by wireless scanning, which may be different fromits network MAC address. If the wireless link is point to point, setthe address of the other end of the link. If the link is ad-hoc, setthe cell identity of the ad-hoc network.
When the quality of the connection goes too low, the driver may revertback to automatic mode (the card selects the best Access Point inrange).
You may also useoffto re-enable automatic mode without changing the current Access Point,or you may useanyorautoto force the card to reassociate with the currently best Access Point.
Example :
iwconfig eth0 ap 00:60:1D:01:23:45
iwconfig eth0 ap any
iwconfig eth0 ap off - rate/bit[rate]
- 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 andvarious overhead.
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 arecard specific, usually an index in the bit-rate list. Useautoto select automatic bit-rate mode (fallback to lower rate on noisychannels), which is the default for most cards, andfixedto revert back to fixed setting. If you specify a bit-rate value and appendauto,the driver will use all bit-rates lower and equal than this value.
Examples :
iwconfig eth0 rate 11M
iwconfig eth0 rate auto
iwconfig eth0 rate 5.5M auto - txpower
- For cards supporting multiple transmit powers, sets the transmit power
in dBm. IfWis the power in Watt, the power in dBm isP = 30 + 10.log(W).If the value is postfixed bymW,it will be automatically converted to dBm.
In addition, on and offenable and disable the radio, andauto and fixedenable and disable power control (if those features are available).
Examples :
iwconfig eth0 txpower 15
iwconfig eth0 txpower 30mW
iwconfig eth0 txpower auto
iwconfig eth0 txpower off - sens
- Set the sensitivity threshold. This define how sensitive is the card
to poor operating conditions (low signal, interference). Positivevalues are assumed to be the raw value used by the hardware or apercentage, negative values are assumed to be dBm. Depending on thehardware implementation, this parameter may control various functions.
On modern cards, this parameter usually control handover/roamingthreshold, the lowest signal level for which the hardware remainsassociated with the current Access Point. When the signal level goesbelow this threshold the card starts looking for a new/better AccessPoint. Some cards may use the number of missed beacons to triggerthis. For high density of Access Points, a higher threshold make surethe card is always associated with the best AP, for low density ofAPs, a lower threshold minimise the number of failed handoffs.
On more ancient card this parameter usually controls the deferthreshold, the lowest signal level for which the hardware considersthe channel busy. Signal levels above this threshold make the hardwareinhibits its own transmission whereas signals weaker than this areignored and the hardware is free to transmit. This is usually stronglylinked to the receive threshold, the lowest signal level for which thehardware attempts packet reception. Proper setting of these thresholdsprevent the card to waste time on background noise while stillreceiving weak transmissions. Modern designs seems to control thosethresholds automatically.
Example :
iwconfig eth0 sens -80
iwconfig eth0 sens 2 - retry
- Most cards have MAC retransmissions, and some allow to set the
behaviour of the retry mechanism.
To set the maximum number of retries, enterlimit `value'.This is an absolute value (without unit), and the default (whennothing is specified).To set the maximum length of time the MAC should retry, enterlifetime `value'.By defaults, this value is in seconds, append the suffix m or u tospecify values in milliseconds or microseconds.
You can also add theshort, long, min and maxmodifiers. If the card supports automatic mode, they define the boundsof the limit or lifetime. Some other cards define different valuesdepending on packet size, for example in 802.11min limitis the short retry limit (non RTS/CTS packets).
Examples :
iwconfig eth0 retry 16
iwconfig eth0 retry lifetime 300m
iwconfig eth0 retry short 12
iwconfig eth0 retry min limit 8 - rts[_threshold]
- RTS/CTS adds a handshake before each packet transmission to make sure
that the channel is clear. This adds overhead, but increasesperformance in case of hidden nodes or a large number of activenodes. This parameter sets the size of the smallest packet for whichthe node sends RTS ; a value equal to the maximum packet size disablesthe mechanism. You may also set this parameter toauto, fixed or off.
Examples :
iwconfig eth0 rts 250
iwconfig eth0 rts off - frag[mentation_threshold]
- 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 andallow packets to get through interference bursts. This parameter setsthe maximum fragment size which is always lower than the maximumpacket size.
This parameter may also control Frame Bursting available on somecards, the ability to send multiple IP packets together. Thismechanism would be enabled if the fragment size is larger than themaximum packet size.
You may also set this parameter toauto, fixed or off.
Examples :
iwconfig eth0 frag 512
iwconfig eth0 frag off - key/enc[ryption]
- Used to manipulate encryption or scrambling keys and security mode.
To set the current encryption key, just enter the key in hex digits asXXXX-XXXX-XXXX-XXXX or XXXXXXXX.To set a key other than the current key, prepend or append[index]to the key itself (this won't change which is the active key). You canalso enter the key as an ASCII string by using thes:prefix. Passphrase is currently not supported.
To change which key is the currently active key, just enter[index](without entering any key value).
off and ondisable and reenable encryption.
The security mode may beopenorrestricted,and its meaning depends on the card used. With most cards, inopenmode no authentication is used and the card may also acceptnon-encrypted sessions, whereas inrestrictedmode only encrypted sessions are accepted and the card will useauthentication if available.
If you need to set multiple keys, or set a key and change the activekey, you need to use multiplekeydirectives. Arguments can be put in any order, the last one will takeprecedence.
Examples :
iwconfig eth0 key 0123-4567-89
iwconfig eth0 key [3] 0123-4567-89
iwconfig eth0 key s:password [2]
iwconfig eth0 key [2]
iwconfig eth0 key open
iwconfig eth0 key off
iwconfig eth0 key restricted [3] 0123456789
iwconfig eth0 key 01-23 key 45-67 [4] key [4] - power
- Used to manipulate power management scheme parameters and mode.
To set the period between wake ups, enterperiod `value'.To set the timeout before going back to sleep, entertimeout `value'.To set the generic level of power saving, entersaving `value'.You can also add themin and maxmodifiers. By default, those values are in seconds, append the suffixm or u to specify values in milliseconds or microseconds. Sometimes,those values are without units (number of beacon periods, dwell,percentage or similar).
off and ondisable and reenable power management. Finally, you may set the powermanagement mode toall(receive all packets),unicast(receive unicast packets only, discard multicast and broadcast) andmulticast(receive multicast and broadcast only, discard unicast packets).
Examples :
iwconfig eth0 power period 2
iwconfig eth0 power 500m unicast
iwconfig eth0 power timeout 300u all
iwconfig eth0 power saving 3
iwconfig eth0 power off
iwconfig eth0 power min period 2 power max period 4 - modu[lation]
- Force the card to use a specific set of modulations. Modern cards
support various modulations, some which are standard, such as 802.11bor 802.11g, and some proprietary. This command force the card to onlyuse the specific set of modulations listed on the command line. Thiscan be used to fix interoperability issues.
The list of available modulations depend on the card/driver and can bedisplayed usingiwlist modulation.Note that some card/driver may not be able to select each modulationlisted independently, some may come as a group. You may also set thisparameter toautolet the card/driver do its best.
Examples :
iwconfig eth0 modu 11g
iwconfig eth0 modu CCK OFDMa
iwconfig eth0 modu auto - commit
- Some cards may not apply changes done through Wireless Extensions
immediately (they may wait to aggregate the changes or apply it onlywhen the card is brought up viaifconfig).This command (when available) forces the card to apply all pendingchanges.
This is normally not needed, because the card will eventually applythe changes, but can be useful for debugging.
When using Managed mode, most often the Access Point dictates thechannel and the driver may refuse the setting of the frequency. InAd-Hoc mode, the frequency setting may only be used at initial cellcreation, and may be ignored when joining an existing cell.
You may also useofforautoto let the card pick up the best channel (when supported).
Examples :
iwconfig eth0 freq 2422000000
iwconfig eth0 freq 2.422G
iwconfig eth0 channel 3
iwconfig eth0 channel auto
DISPLAY
For each device which supports wireless extensions,iwconfigwill display the name of theMAC protocolThe parameters displayed have the same meaning and values as theparameters you can set, please refer to the previous part for adetailed explanation of them.
Some parameters are only displayed in short/abbreviated form (such asencryption). You may useiwlist(8)to get all the details.
Some parameters have two modes (such as bitrate). If the value isprefixed by`=',it means that the parameter is fixed and forced to that value, if itis prefixed by`:',the parameter is in automatic mode and the current value is shown (andmay change).
- Link quality
- Overall quality of the link. May be based on the level of contentionor interference, the bit or frame error rate, how good the receivedsignal is, some timing synchronisation, or other hardware metric. Thisis an aggregate value, and depends totally on the driver and hardware.
- Signal level
- Received signal strength (RSSI - how strong the received signalis). May be arbitrary units or dBm,iwconfiguses driver meta information to interpret the raw value given by/proc/net/wirelessand display the proper unit or maximum value (using 8 bit arithmetic). InAd-Hocmode, this may be undefined and you should useiwspy.
- Noise level
- Background noise level (when no packet is transmitted). Similarcomments as forSignal level.
- Rx invalid nwid
- Number of packets received with a different NWID or ESSID. Used todetect configuration problems or adjacent network existence (on thesame frequency).
- Rx invalid crypt
- Number of packets that the hardware was unable to decrypt. This can beused to detect invalid encryption settings.
- Rx invalid frag
- Number of packets for which the hardware was not able to properlyre-assemble the link layer fragments (most likely one was missing).
- Tx excessive retries
- Number of packets that the hardware failed to deliver. Most MACprotocols 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 havemissed. Beacons are sent at regular intervals to maintain the cellcoordination, failure to receive them usually indicates that the cardis out of range.
AUTHOR
Jean Tourrilhes - jt [at] hpl.hp.comFILES
/proc/net/wirelessSEE ALSO
ifconfig(8),iwspy(8),iwlist(8),iwevent(8),iwpriv(8),wireless(7).Pages related to iwconfig
- iw (8) - show / manipulate wireless devices and their configuration
- iwdt (8) - display and set WatchDog Timer parameters
- iwevent (8) - Display Wireless Events generated by drivers and setting changes
- iwgetid (8) - Report ESSID, NWID or AP/Cell Address of wireless network
- iwhd_selinux (8) - Security Enhanced Linux Policy for the iwhd processes
- iwlist (8) - Get more detailed wireless information from a wireless interface
iwconfig: configure a wireless network interface
Command to display iwconfig
manual in Linux: $ man 8 iwconfig
NAME
iwconfig - configure a wireless network interface
SYNOPSIS
iwconfig [interface]iwconfig interface [essid X] [nwid N] [mode M] [freq F]
[channel C][sens S ][ap A ][nick NN ]
[rate R] [rts RT] [frag FT] [txpower T]
[enc E] [key K] [power P] [retry R]
[modu M] [commit]
iwconfig --help
iwconfig --version
DESCRIPTION
Iwconfigis similar toifconfig(8),but is dedicated to the wireless interfaces. It is used to set theparameters of the network interface which are specific to the wirelessoperation (for example : the frequency).Iwconfigmay also be used to display those parameters, and the wirelessstatistics (extracted from/proc/net/wireless).All these parameters and statistics are device dependent. Each driverwill provide only some of them depending on hardware support, and therange of values may change. Please refer to the man page of eachdevice for details.
PARAMETERS
- Channels are usually numbered starting at 1, and you may useiwlist(8)to get the total number of channels, list the available frequencies,and display the current frequency as a channel. Depending onregulations, some frequencies/channels may not be available.
- ap
- Force the card to register to the Access Point given by the address,
if it is possible. This address is the cell identity of the AccessPoint, as reported by wireless scanning, which may be different fromits network MAC address. If the wireless link is point to point, setthe address of the other end of the link. If the link is ad-hoc, setthe cell identity of the ad-hoc network.
When the quality of the connection goes too low, the driver may revertback to automatic mode (the card selects the best Access Point inrange).
You may also useoffto re-enable automatic mode without changing the current Access Point,or you may useanyorautoto force the card to reassociate with the currently best Access Point.
Example :
iwconfig eth0 ap 00:60:1D:01:23:45
iwconfig eth0 ap any
iwconfig eth0 ap off - rate/bit[rate]
- 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 andvarious overhead.
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 arecard specific, usually an index in the bit-rate list. Useautoto select automatic bit-rate mode (fallback to lower rate on noisychannels), which is the default for most cards, andfixedto revert back to fixed setting. If you specify a bit-rate value and appendauto,the driver will use all bit-rates lower and equal than this value.
Examples :
iwconfig eth0 rate 11M
iwconfig eth0 rate auto
iwconfig eth0 rate 5.5M auto - txpower
- For cards supporting multiple transmit powers, sets the transmit power
in dBm. IfWis the power in Watt, the power in dBm isP = 30 + 10.log(W).If the value is postfixed bymW,it will be automatically converted to dBm.
In addition, on and offenable and disable the radio, andauto and fixedenable and disable power control (if those features are available).
Examples :
iwconfig eth0 txpower 15
iwconfig eth0 txpower 30mW
iwconfig eth0 txpower auto
iwconfig eth0 txpower off - sens
- Set the sensitivity threshold. This define how sensitive is the card
to poor operating conditions (low signal, interference). Positivevalues are assumed to be the raw value used by the hardware or apercentage, negative values are assumed to be dBm. Depending on thehardware implementation, this parameter may control various functions.
On modern cards, this parameter usually control handover/roamingthreshold, the lowest signal level for which the hardware remainsassociated with the current Access Point. When the signal level goesbelow this threshold the card starts looking for a new/better AccessPoint. Some cards may use the number of missed beacons to triggerthis. For high density of Access Points, a higher threshold make surethe card is always associated with the best AP, for low density ofAPs, a lower threshold minimise the number of failed handoffs.
On more ancient card this parameter usually controls the deferthreshold, the lowest signal level for which the hardware considersthe channel busy. Signal levels above this threshold make the hardwareinhibits its own transmission whereas signals weaker than this areignored and the hardware is free to transmit. This is usually stronglylinked to the receive threshold, the lowest signal level for which thehardware attempts packet reception. Proper setting of these thresholdsprevent the card to waste time on background noise while stillreceiving weak transmissions. Modern designs seems to control thosethresholds automatically.
Example :
iwconfig eth0 sens -80
iwconfig eth0 sens 2 - retry
- Most cards have MAC retransmissions, and some allow to set the
behaviour of the retry mechanism.
To set the maximum number of retries, enterlimit `value'.This is an absolute value (without unit), and the default (whennothing is specified).To set the maximum length of time the MAC should retry, enterlifetime `value'.By defaults, this value is in seconds, append the suffix m or u tospecify values in milliseconds or microseconds.
You can also add theshort, long, min and maxmodifiers. If the card supports automatic mode, they define the boundsof the limit or lifetime. Some other cards define different valuesdepending on packet size, for example in 802.11min limitis the short retry limit (non RTS/CTS packets).
Examples :
iwconfig eth0 retry 16
iwconfig eth0 retry lifetime 300m
iwconfig eth0 retry short 12
iwconfig eth0 retry min limit 8 - rts[_threshold]
- RTS/CTS adds a handshake before each packet transmission to make sure
that the channel is clear. This adds overhead, but increasesperformance in case of hidden nodes or a large number of activenodes. This parameter sets the size of the smallest packet for whichthe node sends RTS ; a value equal to the maximum packet size disablesthe mechanism. You may also set this parameter toauto, fixed or off.
Examples :
iwconfig eth0 rts 250
iwconfig eth0 rts off - frag[mentation_threshold]
- 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 andallow packets to get through interference bursts. This parameter setsthe maximum fragment size which is always lower than the maximumpacket size.
This parameter may also control Frame Bursting available on somecards, the ability to send multiple IP packets together. Thismechanism would be enabled if the fragment size is larger than themaximum packet size.
You may also set this parameter toauto, fixed or off.
Examples :
iwconfig eth0 frag 512
iwconfig eth0 frag off - key/enc[ryption]
- Used to manipulate encryption or scrambling keys and security mode.
To set the current encryption key, just enter the key in hex digits asXXXX-XXXX-XXXX-XXXX or XXXXXXXX.To set a key other than the current key, prepend or append[index]to the key itself (this won't change which is the active key). You canalso enter the key as an ASCII string by using thes:prefix. Passphrase is currently not supported.
To change which key is the currently active key, just enter[index](without entering any key value).
off and ondisable and reenable encryption.
The security mode may beopenorrestricted,and its meaning depends on the card used. With most cards, inopenmode no authentication is used and the card may also acceptnon-encrypted sessions, whereas inrestrictedmode only encrypted sessions are accepted and the card will useauthentication if available.
If you need to set multiple keys, or set a key and change the activekey, you need to use multiplekeydirectives. Arguments can be put in any order, the last one will takeprecedence.
Examples :
iwconfig eth0 key 0123-4567-89
iwconfig eth0 key [3] 0123-4567-89
iwconfig eth0 key s:password [2]
iwconfig eth0 key [2]
iwconfig eth0 key open
iwconfig eth0 key off
iwconfig eth0 key restricted [3] 0123456789
iwconfig eth0 key 01-23 key 45-67 [4] key [4] - power
- Used to manipulate power management scheme parameters and mode.
To set the period between wake ups, enterperiod `value'.To set the timeout before going back to sleep, entertimeout `value'.To set the generic level of power saving, entersaving `value'.You can also add themin and maxmodifiers. By default, those values are in seconds, append the suffixm or u to specify values in milliseconds or microseconds. Sometimes,those values are without units (number of beacon periods, dwell,percentage or similar).
off and ondisable and reenable power management. Finally, you may set the powermanagement mode toall(receive all packets),unicast(receive unicast packets only, discard multicast and broadcast) andmulticast(receive multicast and broadcast only, discard unicast packets).
Examples :
iwconfig eth0 power period 2
iwconfig eth0 power 500m unicast
iwconfig eth0 power timeout 300u all
iwconfig eth0 power saving 3
iwconfig eth0 power off
iwconfig eth0 power min period 2 power max period 4 - modu[lation]
- Force the card to use a specific set of modulations. Modern cards
support various modulations, some which are standard, such as 802.11bor 802.11g, and some proprietary. This command force the card to onlyuse the specific set of modulations listed on the command line. Thiscan be used to fix interoperability issues.
The list of available modulations depend on the card/driver and can bedisplayed usingiwlist modulation.Note that some card/driver may not be able to select each modulationlisted independently, some may come as a group. You may also set thisparameter toautolet the card/driver do its best.
Examples :
iwconfig eth0 modu 11g
iwconfig eth0 modu CCK OFDMa
iwconfig eth0 modu auto - commit
- Some cards may not apply changes done through Wireless Extensions
immediately (they may wait to aggregate the changes or apply it onlywhen the card is brought up viaifconfig).This command (when available) forces the card to apply all pendingchanges.
This is normally not needed, because the card will eventually applythe changes, but can be useful for debugging.
When using Managed mode, most often the Access Point dictates thechannel and the driver may refuse the setting of the frequency. InAd-Hoc mode, the frequency setting may only be used at initial cellcreation, and may be ignored when joining an existing cell.
You may also useofforautoto let the card pick up the best channel (when supported).
Examples :
iwconfig eth0 freq 2422000000
iwconfig eth0 freq 2.422G
iwconfig eth0 channel 3
iwconfig eth0 channel auto
DISPLAY
For each device which supports wireless extensions,iwconfigwill display the name of theMAC protocolused (name of device for proprietary protocols), theManual Alternate Wireless Mac Address Software
ESSID(Network Name), theNWID,thefrequency(or channel), thesensitivity,themodeof operation, theAccess Pointaddress, thebit-rate,theRTS threshold, the fragmentation threshold,theencryption keyand theManual Alternate Wireless Mac Address Xbox One
power managementsettings (depending on availability).The parameters displayed have the same meaning and values as theparameters you can set, please refer to the previous part for adetailed explanation of them.
Some parameters are only displayed in short/abbreviated form (such asencryption). You may useiwlist(8)to get all the details.
Some parameters have two modes (such as bitrate). If the value isprefixed by`=',it means that the parameter is fixed and forced to that value, if itis prefixed by`:',the parameter is in automatic mode and the current value is shown (andmay change).
- Link quality
- Overall quality of the link. May be based on the level of contentionor interference, the bit or frame error rate, how good the receivedsignal is, some timing synchronisation, or other hardware metric. Thisis an aggregate value, and depends totally on the driver and hardware.
- Signal level
- Received signal strength (RSSI - how strong the received signalis). May be arbitrary units or dBm,iwconfiguses driver meta information to interpret the raw value given by/proc/net/wirelessand display the proper unit or maximum value (using 8 bit arithmetic). InAd-Hocmode, this may be undefined and you should useiwspy.
- Noise level
- Background noise level (when no packet is transmitted). Similarcomments as forSignal level.
- Rx invalid nwid
- Number of packets received with a different NWID or ESSID. Used todetect configuration problems or adjacent network existence (on thesame frequency).
- Rx invalid crypt
- Number of packets that the hardware was unable to decrypt. This can beused to detect invalid encryption settings.
- Rx invalid frag
- Number of packets for which the hardware was not able to properlyre-assemble the link layer fragments (most likely one was missing).
- Tx excessive retries
- Number of packets that the hardware failed to deliver. Most MACprotocols 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 havemissed. Beacons are sent at regular intervals to maintain the cellcoordination, failure to receive them usually indicates that the cardis out of range.
AUTHOR
Jean Tourrilhes - jt [at] hpl.hp.comFILES
/proc/net/wirelessSEE ALSO
ifconfig(8),iwspy(8),iwlist(8),iwevent(8),iwpriv(8),wireless(7).Pages related to iwconfig
- iw (8) - show / manipulate wireless devices and their configuration
- iwdt (8) - display and set WatchDog Timer parameters
- iwevent (8) - Display Wireless Events generated by drivers and setting changes
- iwgetid (8) - Report ESSID, NWID or AP/Cell Address of wireless network
- iwhd_selinux (8) - Security Enhanced Linux Policy for the iwhd processes
- iwlist (8) - Get more detailed wireless information from a wireless interface